Jenkins安裝
[osboxes@ansiblecontroller ~]$ sudo su -
[sudo] password for osboxes:
安裝java
yum install java-1.8.0-openjdk-devel.x86_64
檢視java版本
java -version
檢視java安裝路徑
find /usr/lib/jvm/java-1.8* | head -n 3
設定JAVA_HOME
[root@ansiblecontroller ~]# cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
JAVA_HOME=/usr/lib/jvm/java-1.8.0
PATH=$PATH:$HOME/bin:$JAVA_HOME
export PATH
[root@ansiblecontroller ~]#
安裝Jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo
sudo rpm --import
yum install jenkins
也可以下載到本地伺服器進行安裝
下載 ,傳到server上。
yum localinstall jenkins-2.277.1-1.1.noarch.rpm
檢視jenkins的狀態
[root@ansiblecontroller ~]# systemctl status jenkins
啟動jenkins
[root@ansiblecontroller ~]# systemctl start jenkins
檢視jenkins的狀態
[root@ansiblecontroller ~]# systemctl status jenkins
防火牆已經開啟
[root@ansiblecontroller ~]# systemctl status firewalld
防火牆8080埠沒有開啟
[root@ansiblecontroller ~]# firewall-cmd --query-port=8080/tcp
開啟8080埠防火牆
firewall-cmd --add-port=8080/tcp --permanent
firewall-cmd --reload
firewall-cmd --query-port=8080/tcp
修改Jenkins的密碼
http://192.168.1.111:8080/user/admin/configure
修改完成以後重新用admin這個使用者登入
http://192.168.1.111:8080/
在Jenkins中設定JAVA_HOME
http://192.168.1.111:8080/manage
Global Tool Configuration
在Linux上安裝git
yum install git
在Jenkins上配置git
http://192.168.1.111:8080/
Manage Jenkins -> System Configuration -> Manage Plugins
Manage Jenkins -> Global Tool Configuration -> Git
下載並安裝Maven
cd /opt
wget
tar -xvzf apache-maven-3.6.3-bin.tar.gz
mv apache-maven-3.6.3 maven
設定Maven環境變數
vi ~/.bash_profile
M2_HOME=/opt/maven
M2=$M2_HOME/bin
PATH=<Existing_PATH>:$M2_HOME:$M2
檢查Maven的版本
mvn --version
在Jenkins中安裝Maven plugin
Manage Jenkins > Jenkins Plugins > available > Maven Invoker
Manage Jenkins > Jenkins Plugins > available > Maven Integration
Install maven plugin without restart
在Jenkins中配置maven path
Manage Jenkins > Global Tool Configuration > Maven
建一個Maven Build
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/725820/viewspace-2763682/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ubuntu 安裝jenkinsUbuntuJenkins
- yum 安裝 jenkinsJenkins
- docker安裝jenkinsDockerJenkins
- Centos 安裝 JenkinsCentOSJenkins
- Mac 安裝 JenkinsMacJenkins
- Jenkins CentOS 安裝JenkinsCentOS
- docker 安裝 jenkinsDockerJenkins
- JENKINS安裝配置Jenkins
- Jenkins安裝與使用Jenkins
- Jenkins快速上手安裝Jenkins
- Jenkins安裝及配置Jenkins
- Jenkins安裝部署(一)Jenkins
- 【Jenkins】基於Windows系統安裝JenkinsJenkinsWindows
- 安裝Jenkins常用外掛Jenkins
- docker 安裝最新的 jenkinsDockerJenkins
- aws安裝jenkins步驟Jenkins
- Centos系統安裝JenkinsCentOSJenkins
- 使用Docker方式安裝JenkinsDockerJenkins
- ubuntu18.04 安裝jenkinsUbuntuJenkins
- k8s安裝jenkinsK8SJenkins
- Jenkins外掛安裝失敗Jenkins
- Jenkins 安裝外掛慢,提速Jenkins
- jenkins安裝與配置學習Jenkins
- docker下安裝部署jenkins(一)DockerJenkins
- jenkins安裝提示無法啟動Jenkins
- Centos7.6下安裝配置JenkinsCentOSJenkins
- Jenkins 自動化安裝外掛Jenkins
- Docker學習(二)- Docker 安裝 JenkinsDockerJenkins
- k8s 中安裝 jenkinsK8SJenkins
- Jenkins 安裝+修改初始密碼 mac版Jenkins密碼Mac
- 持續整合工具之Jenkins安裝部署Jenkins
- CI與CD之Docker上安裝JenkinsDockerJenkins
- Day0: 在RaspberryPi上安裝JenkinsJenkins
- Jenkins入門系列之——02第二章 Jenkins安裝與配置Jenkins
- 如何在LInux上安裝並執行JenkinsLinuxJenkins
- 記錄---docker安裝及配置jenkins全流程DockerJenkins
- jenkins簡單安裝及配置(Windows環境JenkinsWindows
- Centos7安裝jenkins+docker部署tomcatCentOSJenkinsDockerTomcat