运维开发网

centos7+ jenkins持续集成工具快速部署

运维开发网 https://www.qedev.com 2021-04-28 16:54 出处:51CTO 作者:feko大魔王
yum安装yuminstall-yjava-1.8.0-openjdk#安装jenkins方法一wgethttps://prodjenkinsreleases.blob.core.windows.net/redhat-stable/jenkins-2.235.1-1.1.noarch.rpmrpm-ivhjenkins-2.235.1-1.1.noarch.rpm#安装jenkins方法二#wge

yum 安装

yum install -y java-1.8.0-openjdk 

# 安装jenkins方法一
wget https://prodjenkinsreleases.blob.core.windows.net/redhat-stable/jenkins-2.235.1-1.1.noarch.rpm
rpm -ivh jenkins-2.235.1-1.1.noarch.rpm

# 安装jenkins方法二
#wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo 
#rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key 
#yum clean all && yum makecache 
#yum install -y jenkins

# 安装jenkins方法三
# wget  https://mirrors.tuna.tsinghua.edu.cn/jenkins/war/2.244/jenkins.war
# mv jenkins.war  /data
# cd /data
# java -jar  jenkins.war

# 更换国内源
cat >/var/lib/jenkins/hudson.model.UpdateCenter.xml<<EOF
<?xml version='1.1' encoding='UTF-8'?>
<sites>
  <site>
    <id>default</id>
    <url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url>
  </site>
</sites>
EOF

# 升级替换
wget http://mirror.serverion.com/jenkins/war/2.252/jenkins.war
cp  /usr/lib/jenkins/jenkins.war /tmp/
\mv jenkins.war  /usr/lib/jenkins/jenkins.war
sed -i 's#www.google.com#www.baidu.com#g' default.json
systemctl start jenkins

初始化

浏览器访问地址: http://ip:8080

查看密码 cat /var/lib/jenkins/secrets/initialAdminPassword

创建admin用户密码

相关安装目录

rpm -ql jenkins

/etc/init.d/jenkins

/etc/logrotate.d/jenkins

/etc/sysconfig/jenkins 配置文件

/usr/lib/jenkins 安装目录

/usr/lib/jenkins/jenkins.war

/usr/sbin/rcjenkins

/var/cache/jenkins

/var/lib/jenkins

/var/log/jenkins 日志目录

安装中文插件

  • Locale plugin
  • Localization: Chinese (Simplified)
0

精彩评论

暂无评论...
验证码 换一张
取 消