Installation
- 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
Start/Stop
- sudo service jenkins start/stop/restart
注意,可能要安装Java,要不不能启动Jenkins。
安装Java:
yum list jdk,然后yum install xxx,xxx可能长得类似java-1.6.0-openjdk.x86_64
安装Java后,可能还会遇到下面的问题。
/tmp 目录挂载时使用了noexec选项:
Jenkins启动失败,java.lang.unsatisfiedlinkerror failed to map segment from shared object operation not permitted
失败原因是,/tmp directory is mounted with the noexec option
解决办法是,Removing the noexec option from our /tmp in our /etc/fstab and remounting it
具体来说,(要用root身份)先vi /etc/fstab,将 /tmp 挂载点的option 中的noexec 改成 exec,然后reboot,再 sudo service jenkins start 就可以了
别忘了防火墙的设置
在浏览器中显示http://IP:8080
参考http://blog.csdn.net/yasi_xi/article/details/8593520