最新公告
  • 本站一直秉承服务宗旨:履行“站长”责任,销售只是起点 服务永无止境!”的经营理念立即加入
  • Linux安装jenkins(war包方式安装)

    1.下载Jenkins
    网站:https://www.jenkins.io/download/
    直接下载war包
    Linux安装jenkins(war包方式安装)插图2.安装java并配置jenkins启动目录

    [root@nmhs-pp-mw049181 ~]# yum install java -y [root@nmhs-pp-mw049181 ~]# java -version openjdk version "1.8.0_91" OpenJDK Runtime Environment (build 1.8.0_91-b14) OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode [root@nmhs-pp-mw049181 ~]$ cat /etc/profile #Jenkins export JENKINS_HOME=/data/jenkins [root@nmhs-pp-mw049181 ~]$ source /etc/profile 

    3.修改jenkins插件下载为国内源

    [root@nmhs-pp-mw049181 ~]$ kill $(ps -ef | grep jenkins | grep -v grep | awk '{print $2}') [root@nmhs-pp-mw049181 ~]$ sed -i 's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' default.json [root@nmhs-pp-mw049181 ~]$ sed -i 's/https:\/\/updates.jenkins.io\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' default.json #如果是内网环境只能做单项路由才能访问的话需要添加 https: https: 的出口ip路由 [root@nmhs-pp-mw049181 ~]$ route add -net 110.242.68.66 netmask 255.255.255.255 gw 182.42.24.65 [root@nmhs-pp-mw049181 ~]$ route add -net 101.6.8.193 netmask 255.255.255.255 gw 182.42.24.65 [root@nmhs-pp-mw049181 ~]$ cat /etc/hosts #jenkins国内源插件 #jenkins国内源插件 110.242.68.66 www.baidu.com 101.6.8.193 mirrors.tuna.tsinghua.edu.cn 

    4.启动jenkins

    [root@nmhs-pp-mw049181 ~]# nohup java -jar /data/jenkins/jenkins.war --ajp13Рort=-1 --httpPort=8888 > /data/jenkins/jenkins.log & #自定义端口为8888 --ajp13Рort=-1 --httpPort=8888 [root@nmhs-pp-mw049181 ~]# ll /data/jenkins/ total 65860 drwxrwx--- 3 yundiao yundiao 4096 Jan 3 16:50 caches -rw-rw---- 1 yundiao yundiao 1644 Jan 3 16:45 config.xml -rw-rw---- 1 yundiao yundiao 156 Jan 3 16:30 hudson.model.UpdateCenter.xml -rw-rw---- 1 yundiao yundiao 1243 Jan 3 16:45 hudson.plugins.emailext.ExtendedEmailPublisher.xml -rw-rw---- 1 yundiao yundiao 370 Jan 3 16:42 hudson.plugins.git.GitTool.xml -rw------- 1 yundiao yundiao 1712 Dec 31 15:25 identity.key.enc -rw-rw---- 1 yundiao yundiao 7 Jan 3 16:45 jenkins.install.InstallUtil.lastExecVersion -rw-rw---- 1 yundiao yundiao 7 Jan 3 16:45 jenkins.install.UpgradeWizard.state -rw-rw---- 1 yundiao yundiao 49029 Jan 3 16:50 jenkins.log -rw-rw---- 1 yundiao yundiao 183 Jan 3 16:45 jenkins.model.JenkinsLocationConfiguration.xml -rw-rw---- 1 yundiao yundiao 171 Dec 31 15:25 jenkins.telemetry.Correlator.xml -rw-r--r-- 1 yundiao yundiao 67270143 Dec 30 15:33 jenkins.war drwxrwx--- 3 yundiao yundiao 4096 Jan 3 16:49 jobs drwxrwx--- 3 yundiao yundiao 4096 Dec 31 15:25 logs -rw-rw---- 1 yundiao yundiao 907 Jan 3 16:30 nodeMonitors.xml drwxrwx--- 2 yundiao yundiao 4096 Dec 31 15:25 nodes -rw-rw---- 1 yundiao yundiao 46 Jan 3 16:50 org.jenkinsci.plugins.workflow.flow.FlowExecutionList.xml drwxrwx--- 80 yundiao yundiao 12288 Jan 3 16:48 plugins -rw-rw---- 1 yundiao yundiao 129 Jan 3 16:50 queue.xml -rw-rw---- 1 yundiao yundiao 129 Jan 3 16:29 queue.xml.bak -rw-rw---- 1 yundiao yundiao 64 Dec 31 15:25 secret.key -rw-rw---- 1 yundiao yundiao 0 Dec 31 15:25 secret.key.not-so-secret drwx------ 4 yundiao yundiao 4096 Jan 3 16:50 secrets drwxrwx--- 2 yundiao yundiao 4096 Jan 3 16:49 updates drwxrwx--- 2 yundiao yundiao 4096 Dec 31 15:25 userContent drwxrwx--- 3 yundiao yundiao 4096 Jan 3 16:44 users drwxrwx--- 11 yundiao yundiao 4096 Dec 31 15:25 war drwxrwx--- 2 yundiao yundiao 4096 Jan 3 16:42 workflow-libs drwxrwx--- 4 yundiao yundiao 4096 Jan 3 16:50 workspace 

    原文链接:https://blog.csdn.net/weixin_42789427/article/details/112138668

    1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
    2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
    3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
    4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
    5. 如有链接无法下载、失效或广告,请联系管理员处理!
    6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
    7. 如有侵权麻烦联系邮箱2697381891@qq.com删除文章!

    源码库 » Linux安装jenkins(war包方式安装)
    • 3029会员总数(位)
    • 37685资源总数(个)
    • 586本周发布(个)
    • 102 今日发布(个)
    • 1171稳定运行(天)

    提供最优质的资源集合

    立即查看 了解详情