[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]#
[root@localhost ~]# yum -y install gcc gcc-c++ httpd httpd-devel openssl-devel
上傳tomcat包
[root@localhost ~]# ls
apache-tomcat-7.0.47.tar.gz mod_jk_httpd_conf
etcprofile-tomcat tomcat-connectors-1.2.48-src.tar.gz
jdk-8u20-linux-x64.rpm workers.properties
[root@localhost ~]# rpm -ivh jdk-8u20-linux-x64.rpm
[root@localhost ~]# cat etcprofile-tomcat >> /etc/profile
[root@localhost ~]# source /etc/profile
[root@localhost ~]# java -version
安裝tomcat,直接啟動
[root@localhost ~]# tar xzf apache-tomcat-7.0.47.tar.gz
[root@localhost ~]# mv apache-tomcat-7.0.47 /opt/tomcat
[root@localhost ~]# /opt/tomcat/bin/startup.sh
Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.8.0_20
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
[root@localhost ~]# tar xzf tomcat-connectors-1.2.48-src.tar.gz
[root@localhost ~]# cd tomcat-connectors-1.2.48-src/native/
[root@localhost native]# ./configure --with-apxs=/usr/bin/apxs
[root@localhost native]# make && make install
[root@localhost ~]# cp workers.properties /etc/httpd/conf
[root@localhost ~]# cat mod_jk_httpd_conf >> /etc/httpd/conf/httpd.conf
[root@localhost ~]# vim /etc/httpd/conf/httpd.conf
163 <IfModule dir_module>
164 DirectoryIndex index.jsp
165 </IfModule>
[root@localhost ~]# systemctl restart httpd


轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/216211.html
標籤:其他
上一篇:shell腳本案例(初級)
