首先在ubantu下安装jdk1.7以上的版本 安装教程:ubantu下安装jdk1.7
安装jenkins:
1.添加源:
wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
2.更新源. 安装jenkinssudo apt-get update sudo apt-get install jenkins
Upgrade
Once installed like this, you can update to the later version of Jenkins (when it comes out) by running the following commands:
sudo apt-get update sudo apt-get install jenkins
(aptitude or apt-get doesn't make any difference.)
If your /etc/init.d/jenkins file fails to start jenkins, edit the /etc/default/jenkins to replace the lineHTTP_PORT=8080
by
HTTP_PORT=8081
Here, 8081 was chosen but you can put another port available.
参考官方wiki,只不过我们安装的是stable版本--》官方wiki