在Tomcat上发布war之前需要配置一个管理用户以进入上传页面,而配置就是通过修改/usr/local/tomcat6/conf/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"/>
<role rolename="manager"/>
<user username="president" password="123" roles="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
上面的
<role rolename="manager"/>
<user username="president" password="123" roles="manager"/>
这两句是新加入的,这两句就把管理用户配置上了。其它部分无需修改。
另外一点需要注意的是,有时
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<user username="president" password="123" roles="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
这一整段都被上面的<!-- 和下面的 -->包围着,致使中间的内容被屏蔽而不起作用,这在VI编辑器中不容易发现,需要人为多注意一下。
修改好tomcat-users.xml文件后,重启tomcat就能进去上传war的页面了。
配置Tomcat6的管理用户
发表于:2017-01-09
作者:网络转载
来源:
- 周排行
- 月排行
- 评论排行
-   iOS VPN开发的配置和管理
-   DCMP:基于etcd的配置管理系统
-   互联网行业的配置管理
-   配置管理规范(配置项标识和配置审计...
-   本地多用户下git使用ssh管理配置
-   使用etcd+confd管理nginx配置
-   服务器安全配置之用户管理
-   iOS VPN开发的配置和管理
-   配置管理规范(配置项标识和配置审计...
-   互联网行业的配置管理
-   DCMP:基于etcd的配置管理系统
-   配置管理工作流程
-   cmmi配置管理
-   配置管理不只解决软件版本受控的问题
-   从软件出发,非功能测试思考总结
-   展望2017,谁是网络技术头牌?
-   C/C++单元测试工具Visual Unit 4 介绍
-   国内外最好用的6款Bug跟踪管理系统
-   性能测试指标评估必读
-   百度软件测试方案模板
-   38张史上最全的IT工程师技能图谱
-   C/C++单元测试工具Visual Unit 4 介绍
-   2019年,你会选哪些安全测试工具?
-   十款Web服务器性能压力测试工具
-   软件测试入门指南:周期、模型和文档化
-   记自动化测试成神学习之路
-   软件测试全景图 -最全的思维导图