進入 java
# cd /usr/local/tomcat redis
# wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-7/v7.0.94/bin/apache-tomcat-7.0.94-fulldocs.tar.gzapache
官網下載地址:http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-7/v7.0.94/bin/apache-tomcat-7.0.94-fulldocs.tar.gz
(若是下載有問題,請到官網:http://tomcat.apache.org/ 下載)
tomcat
解壓文件:tar -zxvf apache-tomcat-7.0.94-fulldocs.tar.gz
tcp
移動到根目錄下:mv apache-tomcat-7.0.82 /工具
運行 tomcat :./startup.shspa
關閉 tomcat: ./shutdowm.shrest
登陸 server
cd /usr/local/tomcat/bin 進入bin接口
./shutdown.sh 關閉
ps -ef|grep java 查看Tomcat是否以關閉
./startup.sh 啓動Tomcat
啓動防火牆:systemctl start firewalld.service
查開方端口:firewall-cmd --zone=public --list-ports
一、關閉firewall:
systemctl stop firewalld.service #中止firewall
systemctl disable firewalld.service #禁止firewall開機啓動
firewall-cmd --state #查看默認防火牆狀態(關閉後顯示notrunning,開啓後顯示running)
啓動一個服務:systemctl start firewalld.service
關閉一個服務:systemctl stop firewalld.service
重啓一個服務:systemctl restart firewalld.service
顯示一個服務的狀態:systemctl status firewalld.service
在開機時啓用一個服務:systemctl enable firewalld.service
在開機時禁用一個服務:systemctl disable firewalld.service
查看服務是否開機啓動:systemctl is-enabled firewalld.service
查看已啓動的服務列表:systemctl list-unit-files|grep enabled
查看啓動失敗的服務列表:systemctl --failed
3.配置firewalld-cmd
啓動Redis:/usr/local/bin/redis-server /usr/local/redis/redis.conf