原文:http://jingyan.baidu.com/article/925f8cb8f3d925c0dce05677.html
-
修改配置文件tomcat-users(該文件在Tomcat安裝程序根目錄中的conf文件夾中),添加一個admin設置權限,在<tomcat-users>中添加的內容如下:
<role rolename="admin-gui"/>
<user username="admin" password="1234" roles="manager-gui"/>
添加tomcat管理員帳戶
添加管理員賬戶tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="admin123" roles="admin,manager"/>
</tomcat-users> -
修改完成后,重啟Tomcat服務器,在瀏覽器中輸入URL(http://localhost:8080/),或http//IP:8080;
-
點擊【Sever-Status】
輸入
帳號:admin
密碼:1234
點擊確認,進入Tomcat status 頁面
-
基本信息主要包括3部分內容:JVM、HTTP和jk。
JVM的信息如下:
Free memory: 304.84 MB Total memory: 903.00 MB Max memory: 7273.00 MB
Free memory:空閑內存大小。
Total memory:總內存大小。
Max memory:最大內存大小。
-
HTTP相關信息如下:
Max threads: 200 Current thread count: 10 Current thread busy: 1 Keeped alive sockets count: 1Max processing time: 187 ms Processing time: 0.281 s Request count: 32 Error count: 3 Bytes received: 0.00 MB Bytes sent: 0.12 MB
Max threads:最大線程數。
Current thread count:最近運行的線程數。
Max processing time:最大CPU時間。
Processing time:CPU消耗總時間。
Request count:請求總數。
Error count:錯誤的請求數。
Bytes received:接收字節數。
Bytes sent:發送字節數。
-