Centos作業系統(六)-Jenkins安裝與使用
阿新 • • 發佈:2018-12-14
Jenkins安裝與使用
一、線上安裝
[[email protected] ~]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
[[email protected] ~]# rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
[[email protected] ~]# yum -y install jenkins
二、啟動Jenkins
啟動:
[[email protected] ~]# systemctl start jenkins
停止:
[ [email protected] ~]# systemctl stop jenkins
三、設定防火牆
[[email protected] ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
[[email protected] ~]# firewall-cmd --reload
三、瀏覽訪問
http://192.168.5.129:8080/ 查詢登入密碼: [[email protected] ~]# vi /var/lib/jenkins/secrets/initialAdminPassword
四、建立使用者
五、系統設定
1、JDK設定
JDK
JAVA_HOME:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64
2、Maven設定
Maven3
MAVEN_HOME:/usr/local/maven3/apache-maven-3.5.4
六、外掛安裝
1、Maven Integration
2、Deploy to container
3、Publish Over SSH
七、安裝GIT
[[email protected] ~]# yum install -y git
[[email protected] ~]# git --version
檢視安裝路徑:
[[email protected] ~]# whereis git
git: /usr/bin/git /usr/share/man/man1/git.1.gz
八、配置SSH
九、構建配置
pom.xml不在根目錄:
rx-shop-master/pom.xml
構建單模組:
clean install -pl rx-register -am