美文网首页
centos7.5安装jenkins

centos7.5安装jenkins

作者: iamChel | 来源:发表于2020-05-21 17:34 被阅读0次

    #看是否安装java

    [root@localhost ~]# java -version

    -bash: java:未找到命令


    #安装openjdk

    [root@localhost ~]# yum install java-1.8.0-openjdk

    已安装:

      java-1.8.0-openjdk.x86_64 1:1.8.0.161-2.b14.el7                                          

    作为依赖被安装:

      copy-jdk-configs.noarch 0:3.3-2.el7                                                       

      giflib.x86_64 0:4.1.6-9.el7                                                               

      java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-2.b14.el7                                  

      javapackages-tools.noarch 0:3.4.1-11.el7                                                  

      libXfont.x86_64 0:1.5.2-1.el7                                                             

      libXtst.x86_64 0:1.2.3-1.el7                                                              

      libfontenc.x86_64 0:1.1.3-3.el7                                                           

      lksctp-tools.x86_64 0:1.0.17-2.el7                                                        

      python-javapackages.noarch 0:3.4.1-11.el7                                                 

      python-lxml.x86_64 0:3.2.1-4.el7                                                          

      ttmkfdir.x86_64 0:3.0.9-42.el7                                                            

      tzdata-java.noarch 0:2018c-1.el7                                                          

      xorg-x11-font-utils.x86_64 1:7.5-20.el7                                                   

      xorg-x11-fonts-Type1.noarch 0:7.5-9.el7                                                  

    完毕!


    #查看java版本

    [root@localhost ~]# java -version

    openjdk version "1.8.0_161"

    OpenJDK Runtime Environment (build 1.8.0_161-b14)

    OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)


    #安装wget软件

    [root@localhost ~]# yum install wget

    已安装:

      wget.x86_64 0:1.14-15.el7_4.1                                                            

    完毕!


    #下载jenkins软件包

    [root@localhost ~]# wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/redhat-stable/jenkins-2.222.3-1.1.noarch.rpm


    #查看是否有jenkins软件包

    [root@localhost ~]# rpm -qa | grep jenkins


    #安装jenkins

    [root@localhost ~]# rpm -ivh jenkins-2.190.3-1.1.noarch.rpm

    警告:jenkins-2.190.3-1.1.noarch.rpm:头V4 DSA/SHA1 Signature, 密钥 ID d50582e6: NOKEY

    准备中...                          ################################# [100%]

    正在升级/安装...

       1:jenkins-2.190.3-1.1              ################################# [100%]


    #查看是否有jenkins软件包

    [root@localhost ~]# rpm -qa | grep jenkins

    jenkins-2.190.3-1.1.noarch


    #启动jenkins

    [root@localhost ~]# systemctl start jenkins

    [root@localhost ~]# systemctl enable jenkins

    jenkins.service is not a native service, redirecting to /sbin/chkconfig.

    Executing /sbin/chkconfig jenkins on

    [root@localhost ~]# systemctl status jenkins

    ● jenkins.service - LSB: Jenkins Automation Server

       Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)

    Active: active (running) since日 2020-05-10 21:24:46 CST; 51s ago

         Docs: man:systemd-sysv-generator(8)

      Process: 1713 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)

       CGroup: /system.slice/jenkins.service

               └─1734 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.hea...

    5月 10 21:24:45 localhost.localdomain systemd[1]: Starting LSB: Jenkins Automation Ser.....

    5月 10 21:24:45 localhost.localdomain runuser[1718]: pam_unix(runuser:session): session...)

    5月 10 21:24:46 localhost.localdomain jenkins[1713]: Starting Jenkins [  确定  ]

    5月 10 21:24:46 localhost.localdomain systemd[1]: Started LSB: Jenkins Automation Server.

    Hint: Some lines were ellipsized, use -l to show in full.


    #查看jenkins进程

    [root@localhost ~]# ps -aux | grep java

    jenkins    1734  149 15.8 3059984 296288 ?      Ssl  21:24   0:22 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20

    相关文章

      网友评论

          本文标题:centos7.5安装jenkins

          本文链接:https://www.haomeiwen.com/subject/mejtahtx.html