Install Jenkins on CentOS6.4

環境

  • CentOS 6.4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$ sudo yum groupinstall "Development Tools"
$ sudo rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
$ sudo yum install -y nginx
$ sudo service nginx start
$ sudo chkconfig nginx on
$ sudo yum install -y wget
$ sudo yum install -y java-1.7.0-openjdk java-1.7.0-openjdk-devel
$ 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 vim /etc/sysconfig/jenkins 

JENKINS_PORT="XXXXX"
JENKINS_ARGS="--prefix=/jenkins --httpPort=${JENKINS_PORT} --ajp13Port=${JENKINS_AJP_PORT}"

$ sudo vim /etc/nginx/conf.d/jenkins.conf

server {
    listen 80;
    server_name hoge.com;
    location /jenkins {
        proxy_pass http://localhost:XXXXX;
    }
}

$ sudo /etc/init.d/nginx restart

参考

Rails4とJenkinsとGitHubの設定

CentOS-6へ最新版のnginxを3分でインストールする方法