Skip to content

Jenkins持续集成工具

Centos7安装与配置Jenkins

# 安装java
yum install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64 -y

# 下载Jenkins
wget https://pkg.jenkins.io/redhat-stable/jenkins-2.176.2-1.1.noarch.rpm

# 安装Jenkins
rpm -ivh jenkins-2.176.2-1.1.noarch.rpm

配置Jenkins

vim /etc/sysconfig/jenkins

JENKINS_USER="root" # 这么做仅限于测试环境,为了出现调试各种权限问题;生产不允许这么做
# 修改目录权限
chown -R root:root /var/lib/jenkins
chown -R root:root /var/cache/jenkins
chown -R root:root /var/log/jenkins

# 启动服务
systemctl start jenkins.service

# 密码文件
cat /var/lib/jenkins/secrets/initialAdminPassword

访问8080端口

http://10.10.10.14:8080

jenkins_1