先把tomcat和jdk包下好
創(chuàng)新互聯(lián)公司是專業(yè)的金山網(wǎng)站建設(shè)公司,金山接單;提供成都網(wǎng)站設(shè)計、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè),網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行金山網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊,希望更多企業(yè)前來合作!
http://tomcat.apache.org/download-70.cgi
http://www.Oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
安裝jdk
[root@kurolz ~]# ls jdk* jdk-8u131-linux-x64.rpm [root@kurolz ~]# rpm -ivh jdk-8u131-linux-x64.rpm
配置環(huán)境變量
[root@kurolz ~]# vim /etc/profile export JAVA_HOME=/usr/java/default export JAVA_BIN=$JAVA_HOME/bin export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH [root@kurolz ~]# source /etc/profile [root@kurolz ~]# java -version java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
解壓安裝tomcat
[root@kurolz ~]# tar -zxvf apache-tomcat-7.0.77.tar.gz [root@kurolz ~]# cd apache-tomcat-7.0.77 [root@kurolz ~]# cd apache-tomcat-7.0.77/bin/ [root@kurolz bin]# ./startup.sh Using CATALINA_BASE: /root/apache-tomcat-7.0.77 Using CATALINA_HOME: /root/apache-tomcat-7.0.77 Using CATALINA_TMPDIR: /root/apache-tomcat-7.0.77/temp Using JRE_HOME: /usr/java/default Using CLASSPATH: /root/apache-tomcat-7.0.77/bin/bootstrap.jar:/root/apache-tomcat-7.0.77/bin/tomcat-juli.jar Tomcat started.
關(guān)閉防火墻或者加一條允許8080端口通過
/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
[root@kurolz bin]# service iptables stop iptables:清除防火墻規(guī)則: [確定] iptables:將鏈設(shè)置為政策 ACCEPT:filter [確定] iptables:正在卸載模塊: [確定]
瀏覽器測試:http://ip:8080
增加web管理賬號和角色,再
[root@kurolz ~]# vim apache-tomcat-7.0.77/conf/tomcat-users.xml