tomcat 7 添加管理員帳戶

系統:centos5.6_x64apache

tomcat版本:apache-tomcat-7.0.35.tarvim

打開文件:vim conf/tomcat-users.xmlcentos

找到tomcat

<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
-->

在下面添加ide

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="admin123" roles="admin-gui"/>  //用來登陸Host Manager
<user username="tomcat" password="tomcat" roles="manager-gui"/> //用來登陸Server Status和Manager App

或者也能夠把兩個權限寫在一塊兒:ui

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="admin123" roles="admin-gui,manager-gui"/>
//這樣admin這個用戶就能夠登陸Host Manager、Server Status和Manager App
相關文章
相關標籤/搜索