yum -y install java-1.8.0-openjdk*
参照这个文章来做:https://pkg.jenkins.io/redhat-stable/
安装 wget
yum install wget
导入 key
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
启动安装 jenkins
yum install jenkins
至此jenkins安装完成。
systemctl start jenkins
这时打开网址:http://192.168.134.215:8080/ 就可以访问了。
下面还要注意防火墙的设置。
firewall-cmd --add-port=8080/tcp --permanent
firewall-cmd --reload
参考 https://www.jenkins.io/zh/doc/book/installing/ 进行启动前配置
Jenkins远程执行shell 出现 command not found
示例
source /etc/profile
cd /root/shell
sh erp-shop-h5-server.sh
https://www.jenkins.io/zh/doc/book/installing/ https://blog.csdn.net/gexiaoyizhimei/article/details/95374890 https://www.cnblogs.com/mmzs/p/12092982.html#_label1_0 https://blog.csdn.net/f820306455/article/details/84390444 https://www.cnblogs.com/phpshen/p/5842118.html