注意:测试功能,成产环境不要用
原来访问Server Status时出现403错误,主要原因有两种
1.验证的用户名和密码被限制
2.授权地址被限制
vim /usr/local/tomcat8/conf/tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui,admin-gui"/>
在最后添加这三行 第三行username 和password后分别是用户名和密码
vim /usr/local/tomcat8/webapps/manager/META-INF/context.xml
把最后这两行注释掉
/usr/local/tomcat8/bin/shutdown.sh
/usr/local/tomcat8/bin/startup.sh
下次再点击Server Status时出现登录的账号密码
账号tomcat
密码tomcat
二。WEB站点部署
先上传JP
mv jpress-web-newest.war /usr/local/tomcat8/webapps/
yum -y install mariadb mariadb-server
systemctl start mariadb
mysql
MariaDB [(none)]> create database jp;
MariaDB [(none)]> grant all on jp.* to 'jp'@'localhost' identified by '123456' #jp用户名,主机名localhost,密码123456
MariaDB [(none)]> flush privileges;
/usr/local/tomcat8/bin/shutdown.sh
/usr/local/tomcat8/bin/startup.sh
http://192.168.200.112:8080/jpress-web-newest/ 登录测试
安装完登录http://192.168.200.112:8080/jpress-web-newest/admin #进入管理员模式账号admin,密码admin