首页 技术 正文
技术 2022年11月6日
0 收藏 827 点赞 1,079 浏览 1738 个字
jekins自动部署tomcat注意事项千万不要用下面插件推送,报错很多, 要用脚本,一篇博客说的:“我们都是用的脚本,插件报错太多,也不完善”Deploy to container Plugin”,连接tomcat报错解决Jenkins部署:The username and password you provided are not correct (error )解决:https://blog.csdn.net/nxw_tsp/article/details/77326244build成功后会抱一个401的错误点击报错里面的链接会跳出页面,让输入tomcat的用户名和密码,这时候点击取消点击取消后会有提示意思大概是:“您没有权限查看此页。如果你没有更改任何配置文件,请检查您的安装文件conf/tomcat-users.xml。该文件必须包含证书让你使用这个程序。例如,添加manager-gui作用一个用户名为tomcat的密码的s3cret,添加以下上面列出的配置文件。” 那么我们就按照提示去Tomcat文件夹找到相应的文件conf/tomcat-users.xml然后修改它。 我们可以看到,当我们第一次打开tomcat-users.xml这个文件的时候它的标签中间部分是被注释掉的,我们需要做的就是把注释打开并添加manager-gui 添加如下内容,密码必须是tomcat  账号随便,把注释去掉[root@kube-node1 ~]# vi /usr/local/apache-tomcat-8.5./conf/tomcat-users.xml  <role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="zihao" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status"/>注释去掉后如下[root@kube-node1 ~]# cat /usr/local/apache-tomcat-8.5./conf/tomcat-users.xml<!--
NOTE: The sample user and role entries below are intended for use with the
examples web application. They are wrapped in a comment and thus are ignored
when reading this file. If you wish to configure these users for use with the
examples web application, do not forget to remove the <!.. ..> that surrounds
them. You will also need to set the passwords to something appropriate.
-->
<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"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="zihao" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
</tomcat-users>
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,082
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,557
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,406
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,179
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,815
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,898