Centos安装Jenkins

下载Jenkins安装包

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

yum install jenkins

Jenkins war包下载:

链接 提取码:qk0f

配置 Java 环境

JDK下载:

链接(提取码:uzhm)

vi /etc/profile

JAVA_HOME=/usr/local/jdk/jdk1.8.0_231
PATH=$JAVA_HOME%/bin:$PATH
export JAVA_HOME PATH

启动 jenkins服务,开机自启

systemctl start jenkins

systemctl enable jenkins

查看日志,找到管理页面解锁密码:

cat /var/log/jenkins/jenkins.log

%title插图%num

或者查看/var/lib/jenkins/secrets/initialAdminPassword