一: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. C/C++知识点清单01

    第一章 C/C++程序基础 一.一般赋值语句: 考察一般赋值语句的概念和方法. 1.程序: #include<stdio.h> int main(void) { ,y,z; x*=(y=z ...

  2. selenium获取动态网页信息(某东)-具体配置信息

    需要安装的包: selenium 关于软件的驱动:selenium之 驱动环境配置chrome.firefox.IE 1 # encoding:utf-8 2 # Author:"richi ...

  3. Java实现 中文转换成Unicode编码 和 Unicode编码转换成中文

    想要实现中文字符转换为Unicode编码的话主要用到的是一个这样的包,自己可以去API文档里面查看下的 java.util.Properties; 直接进入主题吧,主要是 package Test01 ...

  4. Lottie的使用

    一.简介 Lottie是Airbnb开源的一个面向IOS.Android.React Native的动画库,能分析Adobe After Effects导出的动画,并且能让原生App像使用静态素材一样 ...

  5. --------驱动开发之 ObReferenceObjectByName() 故障排查--------

    ------------------------------------------------------ 在写 filter driver 或 rootkit 时,经常需要 attach 到设备栈 ...

  6. AdaBoostRegressor

    class sklearn.ensemble.AdaBoostRegressor(base_estimator=None, n_estimators=50, learning_rate=1.0, lo ...

  7. JavaScript数组forEach()、map()、reduce()方法

    1.  js 数组循环遍历. 数组循环变量,最先想到的就是 for(var i=0;i<count;i++)这样的方式了. 除此之外,也可以使用较简便的forEach 方式 2.  forEac ...

  8. FWT模板

    代码来自51nod1570 #include<cstdio> #include<cstring> #include<algorithm> #define MN 50 ...

  9. [ZOJ3494]BCD Code

    AC自动机+数位DP. 大致题意: BCD码就是把一个数十进制下的每一位分别用4位的二进制表示. 给你一坨01串,问你在一个区间内,有多少个数的BCD码不包含任何一个字符串. 因为涉及到多个串的匹配问 ...

  10. Linux 文件操作命令-Linux基础环境命令学习笔记

    1.文件目录操作 1)路径识别 a.绝对路径,以根目录开始 b.相对路径,以当前目录开始,不需从根目录开始写起 2)命令 man ls 查看ls命令帮助 cd /var/log 切换进入log目录(. ...