File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1616- 设置 Iptables 规则(这一步是必须设置的):
1717 - 一种方式:先关闭 iptables,防止出现拦截问题而测试不了:` service iptables stop `
1818 - 一种方式:在 iptables 中添加允许规则(Tomcat 默认端口是 8080):
19- - 添加规则:` sudo iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT`
20- - 保存规则:` sudo /etc/rc.d/init.d/iptables save`
21- - 重启 iptables:` sudo service iptables restart`
19+ - 添加规则:` iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT `
20+ - 保存规则:` /etc/rc.d/init.d/iptables save `
21+ - 重启 iptables:` service iptables restart `
2222- 测试安装好后的 Tomcat:
2323 - 启动 Tomcat:` sh /usr/program/tomcat8/bin/startup.sh ; tail -200f /usr/program/tomcat8/logs/catalina.out `
2424 - 访问:` http://服务器 IP 地址:8080/ `
3232## Tomcat 8 配置
3333
3434- 设置 Tomcat 相关变量:
35- - ` sudo vim /usr/program/tomcat8/bin/catalina.sh`
35+ - ` vim /usr/program/tomcat8/bin/catalina.sh `
3636 - 在配置文件的可编辑内容最上面(98 行开始),加上如下内容(具体参数根据你服务器情况自行修改):
3737 ``` ini
3838 JAVA_HOME=/usr/program/jdk1.8.0_72
You can’t perform that action at this time.
0 commit comments