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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Jenkins CentOS 安裝JenkinsCentOS
- Centos 安裝 JenkinsCentOSJenkins
- JENKINS安裝配置Jenkins
- docker 安裝 jenkinsDockerJenkins
- Mac 安裝 JenkinsMacJenkins
- 一. 安裝jenkinsJenkins
- Ubuntu安裝JenkinsUbuntuJenkins
- yum 安裝 jenkinsJenkins
- docker安裝jenkinsDockerJenkins
- ubuntu 安裝jenkinsUbuntuJenkins
- Jenkins安裝及配置Jenkins
- Jenkins快速上手安裝Jenkins
- centos下安裝jenkinsCentOSJenkins
- Jenkins安裝部署(一)Jenkins
- Jenkins安裝 CentOS 7.2JenkinsCentOS
- Jenkins安裝與使用Jenkins
- 【Jenkins】基於Windows系統安裝JenkinsJenkinsWindows
- Centos系統安裝JenkinsCentOSJenkins
- 使用Docker方式安裝JenkinsDockerJenkins
- Jenkins 安裝簡記錄Jenkins
- Jenkins : 安裝 master 和 slaveJenkinsAST
- Ubuntu 16.04 安裝 JenkinsUbuntuJenkins
- 【轉】Jenkins 安裝與配置Jenkins
- aws安裝jenkins步驟Jenkins
- docker 安裝最新的 jenkinsDockerJenkins
- Jenkins 安裝外掛慢,提速Jenkins
- Jenkins外掛安裝失敗Jenkins
- docker下安裝部署jenkins(一)DockerJenkins
- jenkins安裝與配置學習Jenkins
- jenkins2 外掛安裝Jenkins
- k8s安裝jenkinsK8SJenkins
- k8s 中安裝 jenkinsK8SJenkins
- Jenkins 自動化安裝外掛Jenkins
- Docker學習(二)- Docker 安裝 JenkinsDockerJenkins
- ubuntu18.04 安裝jenkinsUbuntuJenkins
- [ci]安裝配置jenkins及其外掛Jenkins
- Jenkins 從零開始-安裝(一)Jenkins
- Jenkins 一: 環境安裝以及配置Jenkins