linux Jenkins搭建
安装jdk
下载jdk 解压
jdk1.8
vim /etc/profile
export JAVA_HOME=/usr/local/java/jdk1.8.0_111
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export M3_HOME=/opt/maven-3.0.5
export PATH=$JAVA_HOME/bin:$M3_HOME/bin:$PATH
生效配置 source /etc/profile
mvn -v 查看安装进度
安装maven
下载 wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
解压 编写路径、完成
安装Jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
更改端口 vim /etc/sysconfig/jenkins
添加jdk路径 vim /etc/init.d/jenkins
重启 service Jenkins restart
页面启动的秘钥 vim /var/lib/jenkins/secrets/initialAdminPassword
访问 ip+端口即可
页面点击 推荐配置
完成