一: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. Django之cookie验证

    先不用太多的蚊子描述什么是cookie,先做一个小实验: 此时我们在谷歌浏览器(一个客户端)和IE浏览器(另一个用户)测试: 刺客我们发现在两台浏览器都可以访问,而且不用进入login验证就可以登录, ...

  2. 2017 ICPC区域赛(西安站)--- J题 LOL(DP)

    题目链接 problem description 5 friends play LOL together . Every one should BAN one character and PICK o ...

  3. Vijos P1066 弱弱的战壕【多解,线段树,暴力,树状数组】

    弱弱的战壕 描述 永恒和mx正在玩一个即时战略游戏,名字嘛~~~~~~恕本人记性不好,忘了-_-b. mx在他的基地附近建立了n个战壕,每个战壕都是一个独立的作战单位,射程可以达到无限(“mx不赢定了 ...

  4. [hdu5225][BC#40]Tom and permutation

    好久没写题解了..GDKOI被数位DP教做人了一发,现在终于来填数位DP的大坑了>_<. 发现自己以前写的关于数位DP的东西...因为没结合图形+语文水平拙计现在已经完全看不懂了嗯. 看来 ...

  5. POJ1163-The Triangle-动态规划

    The Triangle Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 50122   Accepted: 30285 De ...

  6. MongoDB模拟多文档事务操作

    Mongodb不支持多文档原子性操作,因此依据两阶段提交协议(Two Phase Commits protocol)来模拟事务. 以两个银行账户之间的转账行为为例,来说明如何实现多文档间的事务操作. ...

  7. [国嵌攻略][109][Linux系统调用]

    系统调用 函数实现体在内核空间,提供给应用程序来使用,就是一个系统调用. 工作流程 1.通过软中断(swi)从用户空间切换到内核空间.entry-common.S中的ENTRY(vector_swi) ...

  8. ASP.NET CORE中使用Cookie身份认证

    大家在使用ASP.NET的时候一定都用过FormsAuthentication做登录用户的身份认证,FormsAuthentication的核心就是Cookie,ASP.NET会将用户名存储在Cook ...

  9. v-for并判断当前元素是否选中:$set实现响应添加属性

    前言 一直纠结着使用v-for进行列表渲染时如何为当前的元素添加是否选中的标识. 1.v-for进行列表渲染 <div class="lists"> <ul> ...

  10. reduceByKeyLocally

    2017年3月15日, 星期三 reduceByKeyLocally--Transformation类算子 代码示例