1提供jdk环境
[root@open ~]# yum install -y java-1.7.0-openjdk java-1.7.0-openjdk-devel
[root@open ~]# vim /etc/profile.d/java.sh
export JAVA_HOME=/usr
[root@open ~]# . /etc/profile.d/java.sh
[root@open ~]# java -version
2.安装tomcat
[root@open ~]# yum install tomcat tomcat-lib tomcat-webapps tomcat-admin-webapps
3.启动tomcat服务
[root@open ~]# systemctl start tomcat.service
[root@open ~]# netstat -tnlp|grep java
tcp6 0 0 :::8009 :::* LISTEN 31680/java
tcp6 0 0 :::8080 :::* LISTEN 31680/java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 31680/java
4.访问tomcat页面
http://192.168.123.207:8080/
5.tomcat配置文件
[root@open ~]# ls /etc/tomcat/
Catalina catalina.properties context.xml logging.properties tomcat.conf web.xml
catalina.policy conf.d log4j.properties server.xml tomcat-users.xml
[root@open ~]# ls /usr/share/tomcat/
bin conf lib logs temp webapps work
网友评论