本文共 855 字,大约阅读时间需要 2 分钟。
1.yum install -y tomcat (jdk,依赖自动给装好了)
2.systemctl start tomcat(打开tomcat)3.ps -aux | grep tomcat(查询是否打开)4.systemctl stop firewalld.service(关闭防火墙)5.systemctl disable firewalld.service(关闭防火墙开机自启动)6.vim /etc/sysconfig/selinux(永久关闭selinux)将SELINUX=enforcing 改为 SELINUX=disabled7.reboot(重启)8.vim /etc/profile (在环境配置文件最下面,添加你的文件位置)主程序/软件存放webapp位置
/var/lib/tomcat/webapps在Centos使用yum安装后,Tomcat相关的目录都已采用符号链接到/usr/share/tomcat目录,包含webapps等,这很方便我们配置管理
/usr/share/tomcat6日志记录位置
/var/log/tomcat12.文件存放可以将文件或者你自己写的文件存放在/usr/share/tomcat/webapps下最好建个目录例:cd /usr/share/tomcat/webappsmkdir/testvim/index.html在里面随便写点东西,在浏览器中输入你的ip地址+端口号+文件地址列如:192.168.1.1:8080/test/index.html就可以显示出来了转载于:https://blog.51cto.com/13859849/2175197