Linux 中环境安装Jenkins
1、首先安装JDK 最低版本8.0
命令:yum -y install java-1.8.0-openjdk-devel
验证:java -version
2、安装Jenkins步骤
①添加Jenkins源
1)sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
2)sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
②通过yum命令安装Jenkins
sudo yum -y install jenkins
碰到问题:jenkins-2.222.4-1.1.noarch.rpm FAILED
解决方法: 参考链接 https://blog.csdn.net/yudelian/article/details/103878701
一、centos安装jenkins的rpm安装包分为yum安装和rpm安装已经下载好的jenkins包
jenkins安装包的下载路径:jenkins个版本的rpm安装包,下面主要说明rpm安装的流程:
1)获取rpm安装包的的地址,安装包:jenkins-2.213-1.1.noarch.rpm,如下在centos获取安装包下载命令:
wget https://prodjenkinsreleases.blob.core.windows.net/redhat/jenkins-2.213-1.1.noarch.rpm
2)安装下载好的rpm包
sudo rpm -ivh jenkins-2.213-1.1.noarch.rpm
③配置jenkins的端口,设置为:8085
④启动jenkins服务
sudo service jenkins start
3、配置jenkins服务
1) 在浏览器访问jenkins页面
http://localhost:8085/
2)根据页面提示位置/var/lib/jenkins/secrets/initialAdminPassword,获取初始密码
命令:cat /var/lib/jenkins/secrets/initialAdminPassword