CenterOS7安装jenkins

jupiter
2024-07-09 / 0 评论 / 4 阅读 / 正在检测是否收录...

1.准备工作

1.1 安装java环境

参考:CenterOS7安装java环境 - jupiter's blog (inat.top)

1.2 安装git

如果你的系统没有自带git,那么也需要安装一个

yum install git

2.通过下载war包安装

2.1 war包下载

官网下载地址:https://www.jenkins.io/zh/download/

阿里云镜像站下载地址:https://mirrors.aliyun.com/jenkins/war/latest/

清华大学开源软件镜像站 (☆☆☆推荐):https://mirrors.tuna.tsinghua.edu.cn/jenkins/war/latest/

wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/war/latest/jenkins.war

2.2 启动jenkins(报错)

 java -jar jenkins.war

2.3 错误修复

#CentOS 7
yum install fontconfig
 java -jar jenkins.war
  • 启动日志
2024-07-09 15:09:23.538+0000 [id=31]    INFO    jenkins.install.SetupWizard#init:

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

9bd6e45ed26c47fd83903af49ef79997

This may also be found at: /root/.jenkins/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

  • 等待初始化完成

    输入启动日志中的密码即可顺利进入,选择安装默认插件

部署jenkins一直显示Please wait while Jenkins is getting ready to work …

vim ~/.jenkins/hudson.model.UpdateCenter.xml

https://updates.jenkins.io/update-center.json更换为更改为https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

<?xml version='1.1' encoding='UTF-8'?>
<sites>
  <site>
    <id>default</id>
    <url>https://updates.jenkins.io/update-center.json</url>
  </site>
</sites>

2.4 创建用户使用

参考资料

  1. CenterOS7安装java环境 - jupiter's blog (inat.top)
  2. 解决jenkins报错:AWT is not properly configured on this server-CSDN博客
  3. 部署jenkins一直显示Please wait while Jenkins is getting ready to work-CSDN博客
0

评论 (0)

打卡
取消