jenkins episode ---- tomcat username configuration

         During the construction of jenkins, it is always found that tomcat cannot be accessed. Later, it is known that it is a problem of user permissions. Moreover, the role names of tomcat versions 6 and 7 are different and need to be treated differently.

  1. tomcat6 configuration administrator

   Open the ~/conf/tomcat-users.xml file under tomcat6, and add the following content under the configuration file <tomcat-users> node
   <role rolename="admin"/>
  <role rolename="manager"/>
  <user username= "admin" password="123456" roles="admin,manager"/>

 

    Start tomat6, enter: username and password to log in to the administrator interface.
 
   2. The tomcat7 configuration administrator
   opens the ~/conf/tomcat-users.xml file under tomcat7, and adds the following content under the <tomcat-users> node of the configuration file:
   <role rolename="admin-gui"/>
   <role rolename= "manager-gui"/> (Access console permission)

   <role rolename="manager-script"/>(部署的权限)
   <user username="admin" password="123456" roles=" admin-gui , manager-gui,manager-script "/>

 

   Start tomat7, enter: username and password to log in to the administrator interface.

   Note: After modifying tomcat-user.xml, restart tomcat to take effect.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326449702&siteId=291194637