安装环境:
CentOS release 5.9 (Final)
一、安装java
下载jdk-6u30-linux-x64-rpm.bin
class="java" name="code">
chmod +x jdk-6u30-linux-x64-rpm.bin
./jdk-6u30-linux-x64-rpm.bin
二、安装maven
tar -zxvf apache-maven-3.0.4
sudo mkdir /opt/maven
sudo mv ~/software/apache-maven-3.0.4 /opt/maven
sudo vim /etc/profile
//在末尾加
MAVEN_HOME=/opt/maven/apache-maven-3.0.4
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin
//保存 :wq!
source /etc/profile
查看mvn
版本信息
mvn -v
三、安装jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
sudo yum install jenkins
更改权限
sudo chown -R admin /var/log/jenkins
sudo chgrp -R admin /var/log/jenkins
sudo chown -R admin /var/lib/jenkins
sudo chgrp -R admin /var/lib/jenkins
sudo chown -R admin /var/cache/jenkins
sudo chgrp -R admin /var/cache/jenkins
jenkins配置文件:
/etc/sysconfig/jenkins
jenkins启动命令
sudo service jenkins start/stop/restart
随系统启动:
sudo chkconfig jenkins on
jenkins系统设置中的maven设置:
参考:https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins
- 大小: 10.2 KB