CentOS 上 Jenkins 安装
原文:
http://blog.csdn.net/achang21/article/details/19122891 (yum安装)
http://www.360doc.com/content/14/0513/09/10058718_377145722.shtml (二进制安装)
http://my.oschina.net/hevakelcj/blog/261894 (rpm包安装)
http://www.cnblogs.com/yjmyzz/p/jenkins-tutorial-part-1.html (Jenkens配置使用)
https://segmentfault.com/a/1190000002895521 (「Jenkins+Git+Maven+Shell+Tomcat持续集成」经典教程)
1. 添加Jenkins的源(repository):
[root@localhost home]# sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo [root@localhost home]# sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
2. 安装/检查JDK:
[root@localhost home]# java -version
安装jdk,此处省去
3. 安装Jenkins:
[root@localhost home]# yum install jenkins
(3.1)/usr/lib/jenkins/:jenkins安装目录,WAR包会放在这里。
[root@localhost jenkins]#cd /usr/lib/jenkins
[root@localhost jenkins]# ll
(3.2) /etc/sysconfig/jenkins:jenkins配置文件,“端口”,“JENKINS_HOME”等都可以在这里配置。
(3.3)/var/lib/jenkins/:默认的JENKINS_HOME。
(3.4)/var/log/jenkins/jenkins.log:Jenkins日志文件。
4. 启动Jenkins
[root@localhost jenkins]# service jenkins start
问题1:Starting Jenkins bash: /dev/null: Permission denied
rm -rf /dev/null && mknod -m 0666 /dev/null c 1 3
搞定
[root@pretest ~]# service jenkins status
问题2: jenkins dead but pid file exists