在 CentOS 6 下安装 Jenkins

来源:互联网 发布:python远程兼职 编辑:程序博客网 时间:2024/05/19 04:03

转自:https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+RedHat+distributions

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 就可以了