码迷,mamicode.com
首页 > 系统相关 > 详细

linux安装Jenkins

时间:2019-06-12 10:59:43      阅读:423      评论:0      收藏:0      [点我收藏+]

标签:conf   安装文件   amd   命令   start   cal   -o   sysconf   sbin   

下载安装包

https://pkg.jenkins.io/redhat-stable/

安装

  1. 本地安装
    yum -y localinstall jenkins-2.176.1-1.1.noarch.rpm
  2. 查看jenkins安装文件
    [root@jenkins ~]# 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
  3. 查看java命令目录
    [root@jenkins ~]# which java
    /usr/java/jdk1.8.0_212/bin/java
  4. 修改配置文件,在candidates中添加java目录
    [root@jenkins ~]# vim /etc/init.d/jenkins
    candidates="
    /etc/alternatives/java
    /usr/lib/jvm/java-1.8.0/bin/java
    /usr/lib/jvm/jre-1.8.0/bin/java
    /usr/lib/jvm/java-1.7.0/bin/java
    /usr/lib/jvm/jre-1.7.0/bin/java
    /usr/lib/jvm/java-11.0/bin/java
    /usr/lib/jvm/jre-11.0/bin/java
    /usr/lib/jvm/java-11-openjdk-amd64
    /usr/bin/java
    /usr/java/jdk1.8.0_212/bin/java
    "
  5. 启动jenkins
    [root@jenkins ~]# systemctl start jenkins
    [root@jenkins ~]# ss -tlnp | grep 8080
    LISTEN     0      50          :::8080                    :::*                   users:(("java",pid=17646,fd=165))

验证

访问http://ip:8080/

linux安装Jenkins

标签:conf   安装文件   amd   命令   start   cal   -o   sysconf   sbin   

原文地址:https://blog.51cto.com/jinkcloud/2407482

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!