一:tomcat6配置管理员信息

1:打开tomcat6下的~/conf/tomcat-users.xml文件,关于用户角色、管理员的信息都在这个配置文件中。

2:在配置文件<tomcat-users>节点下添加如下xml

  <role rolename="admin"/>
<role rolename="manager"/>
<user username="admin" password="admin" roles="admin,manager"/>

3:启动tomat6,输入:用户名:admin 密码:admin 登陆到管理员界面。

二:tomcat7配置管理员信息

1:打开tomcat7下的~/conf/tomcat-users.xml文件,关于用户角色、管理员的信息都在这个配置文件中。

2:在配置文件<tomcat-users>节点下添加如下xml

<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles=" admin-gui , manager-gui "/>

3:启动tomat7,输入:用户名:admin 密码:admin 登陆到管理员界面。

附:

[root@localhost conf]# cat tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<tomcat-users>
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->
<!--
<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"/>
-->
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>

tomcat-users.xml 配置的更多相关文章

  1. Tomcat web.xml配置参数详解

    Apache Tomcat Configuration Reference - The Context Containerhttps://tomcat.apache.org/tomcat-5.5-do ...

  2. Tomcat server.xml配置示例

    本文由 ImportNew 几乎所有容器类型的应用都会包含一个名为 server.xml 的文件结构.基本上,其中的每个元数据或者配置都是容器完成初始化所需要的.正是由于这些内容都是可配置的,使得软件 ...

  3. Tomcat server.xml配置

    参考文献:http://www.cnblogs.com/xdp-gacl/p/3734395.html 一.Tomcat配置虚拟主机 方法:在conf/server.xml里配置Host元素,其中na ...

  4. tomcat web.xml配置

    关于Tomcat 中 web.xml 文件的配置问题: 1.下面的配置是合法的     <servlet>        <servlet-name>test</serv ...

  5. tomcat web.xml 配置

    1<web-app> 2<error-page> 3<error-code>404</error-code> 4<location>/Not ...

  6. tomcat server.xml配置详解

    由于 Tomcat 基于 Java,实际上在各种 Linux 发行版里的配置方法都大同小异,只是我看见在 Arch Linux 环境里搭建 Tomcat 的文章比较少,所以在 Arch Linux 实 ...

  7. tomcat server.xml 配置示例

    规划:     网站网页目录:/web/www      域名:www.test1.com     论坛网页目录:/web/bbs     URL:bbs.test1.com/bbs     网站管理 ...

  8. Tomcat server.xml 配置虚拟目录

    对于Tomcat,打开..\Tomcat 6.0\conf\server.xml文件,找到下面的一行代码(Host)然后在这一行之间下面添加配置代码:<Context path="&q ...

  9. centos tomcat/resin安装配置 卸载系统自带的java tomcat安装配置 安装JDK resin安装配置 第二十八节课

    centos  tomcat/resin安装配置  卸载系统自带的java  tomcat安装配置  安装JDK   resin安装配置    第二十八节课 tomcat和java都不需要编译 tom ...

  10. tomcat——Server.xml

    本机tomcat位置:D:\tomcat7\apache-tomcat-7.0.61 server.xml 位置:D:\tomcat7\apache-tomcat-7.0.61\conf 注意:ser ...

随机推荐

  1. [UWP]如何使用Fluent Design System (下)

    4. 兼容旧版本 FDS最常见的问题之一是如何与Fall Creators Update之前的版本兼容,其实做起来也挺简单的,ColorfulBox就实现了Creators Update与Fall C ...

  2. islider结合react的简单实用

    我用islider都是结合react来使用,主要运用在移动端,做首页轮播图,或者是手机图片预览,左右滑动 首先需要 npm install islider.js --save 让后在jsx文件头部引入 ...

  3. [已解决]pip安装包时报错:Read time out

    有一些包在源在国外,因为某些原因,网络并不是很好,常常会发生Read time out安装失败的问题. 一般解决方法有:修改国内的安装源,如果能够获取只是慢的话,还有中比较懒的方法就是增加读取的时间. ...

  4. Python模块学习系列

    python模块-time python模块-datetime python模块-OS模块详解

  5. Shell脚本之反引号【``】和 $()

    一.奇怪的返回 今天在搞监控的时候,修改一个老脚本,主要是通过对操作系统进行判断来获取不同的监控参数.(获取top参数在不同操作系统上也有个坑,会在另外一篇里面写) 脚本如下,非常简单: #处理Cen ...

  6. MYBATIS常用的sql事例

    今天整理了一下在项目中经常用到的mybatis的xml文件的sql语句: 读者:有sql基础. <?xml version="1.0" encoding="UTF- ...

  7. UINavigationController 返回手势与 leftBarButtonItem

    UINavigationController 返回手势与 leftBarButtonItem UINavigationController 自带从屏幕左侧边缘向右滑动的返回手势,可以通过这个手势实现 ...

  8. 洛谷 P1019 单词接龙【经典DFS,温习搜索】

    P1019 单词接龙 题目描述 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在 ...

  9. NYoj_20吝啬的国度

    吝啬的国度 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 在一个吝啬的国度里有N个城市,这N个城市间只有N-1条路把这个N个城市连接起来.现在,Tom在第S号城市,他有 ...

  10. Big Event in HDU(多重背包套用模板)

    http://acm.hdu.edu.cn/showproblem.php?pid=1171 Big Event in HDU Time Limit: 10000/5000 MS (Java/Othe ...