Linux中部署Jenkins

廢話很少說,直接上乾貨java

1.jdk是必須的,,我用1.8apache

        yum -y install java-1.8.0-openjdk.x86_64  瀏覽器

2.Maven也要有,maven

        https://blog.csdn.net/qq_39871625/article/details/78067466.net

3.而後就是Jenkins了rest

 

           下載blog

        a:       wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repoci

            

 

           b:    wget http://pkg.jenkins-ci.org/redhat-stable/jenkins-2.89.4-1.1.noarch.rpmget

            安裝依賴jenkins

            c:     yum -y install apache-maven

 

          d:    rpm -ivh jenkins-2.89.4-1.1.noarch.rpm

 

            e:    修改配置,根據自身狀況而定,主要是看端口號是否被佔用,默認的端口爲8080  

                   vi /etc/sysconfig/jenkins

            f:     到這一步通常會選擇將Jenkins移動到掛載硬盤的目錄下,便於使用,好比:

 

                    mv /var/lib/jenkins /data/

                    

            g:    軟鏈接: sudo ln -s /data/jenkins /var/lib/jenkins

            

             h:     如今就基本能夠啓動了,可是第一次啓動的時候回要一個默認密碼

                        vi /var/lib/jenkins/secrets/initialAdminPassword 


            啓動服務:

                         service jenkins restart

 

            瀏覽器中訪問localhost:8080,便可訪問Jenkins,而後根據提示輸入密碼即可進入Jenkins

相關文章
相關標籤/搜索