一、准备工作:
192.168.16.208
先安装git
yum install git
二、安装
sudo curl -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
yum install jenkins
三、配置
vim /etc/sysconfig/jenkins
#监听端口
JENKINS_PORT="8080"
四、启动
systemctl start jenkins
启动失败了
错误信息为Starting Jenkins bash: /usr/bin/java: No such file or directory是java环境配置的问题。
找到你的jdk目录,我是在/usr/java/jdk1.8.0_181-cloudera/下,创建软链接即可:
ln -s /usr/java/jdk1.8.0_181-cloudera/bin/java /usr/bin/java
然后重新启动
五、网页访问配置jenkins
http:192.168.16.208:8080
执行命令查看密码:
cat /var/lib/jenkins/secrets/initialAdminPassword
安装推荐的插件
安装完成后创建管理员用户