CentOS7 安装和配置Tomcat
1.官网下载Tomcat的压缩包
https://tomcat.apache.org/download-70.cgi
2.使用Xftp5把下载的压缩包上传到 /usr/soft (soft文件夹自己新建的)
3.解压后 apache-tomcat-7.0.85
tar -xvf apache-tomcat-7.0.85.tar.gz
4.修改Tomcat的server.xml文件,把默认的8080端口,修改为 80
终端输入:vi server.xml
5.配置防火墙,开放80端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
6.启动tomcat
[root@localhost apache-tomcat-7.0.85]# ./bin/startup.sh
Using CATALINA_BASE: /usr/soft/apache-tomcat-7.0.85
Using CATALINA_HOME: /usr/soft/apache-tomcat-7.0.85
Using CATALINA_TMPDIR: /usr/soft/apache-tomcat-7.0.85/temp
Using JRE_HOME: /usr/soft/jdk1.8.0_162
Using CLASSPATH: /usr/soft/apache-tomcat-
7.0.85/bin/bootstrap.jar:/usr/soft/apache-tomcat-7.0.85/bin/tomcat-juli.jar
Tomcat started.
7.在浏览器测试
地址栏输入:http://192.168.33.128/
centos镜像地址
http://isoredirect.centos.org/centos/7/isos/x86_64/