centos下安装jenkins

87447100 2011-10-24

1.安装jdk

cd ~/software

wget http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-i586-rpm.bin

sudo chmod u+x jdk-6u27-linux-i586-rpm.bin

sudo rpm -ivh jdk-6u27-linux-i586.rpm

java -version

2.安装maven

cd ~/software

wget http://labs.renren.com/apache-mirror//maven/binaries/apache-maven-3.0.3-bin.tar.gz

tar -xzvf apache-maven-3.0.3-bin.tar.gz

cd /opt

sudo mkdir maven

sudo chown/chgrp admin maven

mv ~/software/apache-maven-3.0.3 /opt/maven

3.配置maven

M2_HOME=/opt/maven/apache-maven-3.0.3

PATH=$PATH:@M2_HOME/bin

mvn -version

3.安装jenkins

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo

sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key

sudo yum install jenkins

rpm -ql jenkins

4.配置jenkins

// edit JENKINS_PORT, JENKINS_USER
sudo vi /etc/sysconfig/jenkins

5.修改jenkins权限(如果修改JENKINS_USER情况下)

sudo chown/chgrp admin /usr/lib/jenkins
sudo chown/chgrp admin /var/log/jenkins
sudo chown/chgrp admin /var/cache/jenkins

6.启动jenkins

sudo /sbin/service jenkins start

相关推荐