tomcat-users.xml 配置
一: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 配置的更多相关文章
- Tomcat web.xml配置参数详解
Apache Tomcat Configuration Reference - The Context Containerhttps://tomcat.apache.org/tomcat-5.5-do ...
- Tomcat server.xml配置示例
本文由 ImportNew 几乎所有容器类型的应用都会包含一个名为 server.xml 的文件结构.基本上,其中的每个元数据或者配置都是容器完成初始化所需要的.正是由于这些内容都是可配置的,使得软件 ...
- Tomcat server.xml配置
参考文献:http://www.cnblogs.com/xdp-gacl/p/3734395.html 一.Tomcat配置虚拟主机 方法:在conf/server.xml里配置Host元素,其中na ...
- tomcat web.xml配置
关于Tomcat 中 web.xml 文件的配置问题: 1.下面的配置是合法的 <servlet> <servlet-name>test</serv ...
- tomcat web.xml 配置
1<web-app> 2<error-page> 3<error-code>404</error-code> 4<location>/Not ...
- tomcat server.xml配置详解
由于 Tomcat 基于 Java,实际上在各种 Linux 发行版里的配置方法都大同小异,只是我看见在 Arch Linux 环境里搭建 Tomcat 的文章比较少,所以在 Arch Linux 实 ...
- tomcat server.xml 配置示例
规划: 网站网页目录:/web/www 域名:www.test1.com 论坛网页目录:/web/bbs URL:bbs.test1.com/bbs 网站管理 ...
- Tomcat server.xml 配置虚拟目录
对于Tomcat,打开..\Tomcat 6.0\conf\server.xml文件,找到下面的一行代码(Host)然后在这一行之间下面添加配置代码:<Context path="&q ...
- centos tomcat/resin安装配置 卸载系统自带的java tomcat安装配置 安装JDK resin安装配置 第二十八节课
centos tomcat/resin安装配置 卸载系统自带的java tomcat安装配置 安装JDK resin安装配置 第二十八节课 tomcat和java都不需要编译 tom ...
- tomcat——Server.xml
本机tomcat位置:D:\tomcat7\apache-tomcat-7.0.61 server.xml 位置:D:\tomcat7\apache-tomcat-7.0.61\conf 注意:ser ...
随机推荐
- 博客已经迁移到 http://imbotao.top 也会同步到这儿
完全是看到别人搭建的 hexo + github Pages 博客界面很好看,很简洁,自己也喜欢折腾,就鼓捣了一个. 也在阿里云买了自己的域名,个人感觉在博客的样式和功能上花费了太多的时间,不过现在终 ...
- Spring-Blog:个人博客(一)-Mybatis 读写分离
概述: 2018,在平(tou)静(lan)了一段时间后,开始找点事情来做.这一次准备开发一个个人博客,在开发过程之中完善一下自己的技术.本系列博客只会提出一些比较有价值的技术思路,不会像写流水账一样 ...
- ascii、unicode、utf-8、gbk区别及转换
一.编码 ascii: A:00000010 8位 一个字节 unicode: A:00000000 00000001 00000010 00000100 32位 四个字节 中:00000000 00 ...
- 在visual studio的工程项目应用中打开console控制窗口
在visual studio的工程项目应用中打开console控制窗口,这个可以方便我们在console中输出参数的值检查错误. 只需要在需要打开console的地方加入下面的代码即可. AllocC ...
- CTF---安全杂项入门第一题 丘比龙的最爱
丘比龙的最爱分值:10 来源: 2014HCTF 难度:易 参与人数:4498人 Get Flag:1366人 答题人数:1384人 解题通过率:99% 传说,丘比龙是丘比特的弟弟,丘比龙是一只小爱神 ...
- HDU 2084 数塔(简单DP入门)
数塔 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submiss ...
- 类A是公共的,应在名为A.java的文件中声明错误
第一种!!! “类A是公共的,应在名为A.java的文件中声明”这句话需要分两步来理解: 1.如果类A被声明为公共的(public),那么必须将类A保存在名为A.java的文件中: 2.反之,在一个文 ...
- CodeForces628-B.New Skateboard
B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- BC#65T4 ZYB's Tree
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5593 点分治被卡了TAT... 正解是dp,可以按层数考虑dp,先预处理跑一边dfs得到子树各层数点数大小 ...
- java 数据类型间的转换
byte a = (byte)129; 129已经超过了byte数据类型的存储上限,所以需要在值的前面加括号需要转换的数据类型名. 但是从高往低转的时候数值精度会有丢失; 所以最后结果为 a = -1 ...