您好,登錄后才能下訂單哦!
聲明:因為運(yùn)行環(huán)境是基于Linux系統(tǒng)的,在做此框架之前需要做一些前期的環(huán)境準(zhǔn)備工作
CentOs下安裝Tomcat7網(wǎng)上很多實例,因為博客后期作為框架的原生教程,故這邊做詳細(xì)的安裝記錄,我這邊已經(jīng)下載好了Tomcat7,通過ssh已經(jīng)上傳到指定的目錄,這里直接講解安裝的過程。
1. 安裝tomcat
通過ssh將apache-tomcat-7.0.61.tar.gz文件上傳到/usr/local中執(zhí)行以下操作:
[root@cloud /]cd /usr/local
[root@cloud /]tar -zxvfapache-tomcat-7.0.61.tar.gz
[root@cloud /]mv apache-tomcat-7.0.61 tomcat
2. 啟動Tomcat
[root@cloud ~]# /usr/local/tomcat/bin/startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /home/Java/jdk1.7/
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
出現(xiàn)以上信息說明已成功啟動。
3. 防火墻開放8080端口
[root@cloud /]vi + /etc/sysconfig/iptables
#增加以下代碼
#Tomcat 8080
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
4. 重啟防火墻
[root@cloud /]service iptables restart
5. 檢驗Tomcat安裝運(yùn)行,通過你自己的服務(wù)器IP查看tomcat是否運(yùn)行正常:
http://xxx.xxx.xxx.xxx:8080/
看到tomcat系統(tǒng)界面,說明安裝成功!
6. 停止Tomcat
[root@cloud ~]#/usr/local/tomcat/bin/shutdown.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /home/Java/jdk1.7
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
7. 查看啟動、停止日志
[root@cloud ~]#cd /usr/local/tomcat/logs/
[root@cloud logs]# ls
catalina.2016-02-13.log catalina.out host-manager.2016-02-14.log localhost.2016-02-14.log localhost_access_log.2016-02-14.txt manager.2016-02-14.log
catalina.2016-02-14.log host-manager.2016-02-13.log localhost.2016-02-13.log localhost_access_log.2016-02-13.txt manager.2016-02-13.log
[root@cloud logs]# tail -f catalina.out
Feb 14, 2016 1:25:33 AMorg.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Feb 14, 2016 1:25:33 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
想了解更多詳細(xì)請點(diǎn)擊源碼地址獲?。?strong>mingli.com
有興趣的朋友們可以前往球球哦~一起分享學(xué)習(xí)技術(shù):2042849237
請大家持續(xù)關(guān)注搭建分布式架構(gòu)3--CentOs下安裝MySQL(環(huán)境準(zhǔn)備)
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。