1.查看Java 是否安裝java
java -version瀏覽器
2.安裝Jenkinstcp
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -ide
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'函數
sudo apt-get update測試
sudo apt-get install jenkinsspa
3.將Jenkins的服務啓動.net
sudo /etc/init.d/jenkins startserver
4.因爲原來8080端口已經被佔用,全部更改其端口爲「8081」(修改兩個配置文件)blog
A.修改/etc/init.d/jenkins 文件do_start函數的check_tcp_port命令,端口號從8080換成8081
B.修改/etc/default/jenkins 文件,將端口從8080更換成8081
5.再次啓動服務
6.經過瀏覽器測試 http://servername or IP:8081
參考:
1.Installing Jenkins on Ubuntu
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
http://blog.csdn.net/csfreebird/article/details/9033443
3.基於 Jenkins 快速搭建持續集成環境
http://www.ibm.com/developerworks/cn/java/j-lo-jenkins/
4. How to Install Oracle Java JDK on Ubuntu Linux: 17 Steps
http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux
2014.05.13 By Jack.Mao