さくらVPSにjenkinsをインストールしてみた

やってみたよ

jenkins公式の yum リポジトリを使う

[bash]

wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo

rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key

[/bash]

#yum でインストール

[bash]

yum install jenkins

[/bash]

#自動起動をonに

[bash]

chkconfig jenkins on

[/bash]

#jdkが入っていないと service jenkins stop とかしたときに failed とかなったのでいれる

[bash]

yum install java-1.6.0-openjdk.x86_64

yum install java-1.6.0-openjdk-devel.x86_64

[/bash]

# start/stop は以下

[bash]

/etc/init.d/jenkins start

/etc/init.d/jenkins stop

[/bash]

#/etc/sysconfig/jenkins でポートを適宜変更する(portの80xxは自分の環境によって変更する)

[bash]

JENKINS_PORT="80xx"

[/bash]

#apacheの場合は httpd.conf に JENKINS_PORT を受けるようにしたりする

#そもそもport閉じてたら開ける

[bash]

NameVirtualHost *:80xx

Listen 80xx

<VirtualHost *:80xx>

ServerAdmin hoge@hoge.com

ServerName hoge.com

<Location />

ProxyPass http://localhost:80xx/

ProxyPassReverse http://localhost:80xx/

</Location>

</VirtualHost>

[/bash]

ほとんど以下を参考にしてます

CentOS/RedHatにJenkinsをインストールする手順 (yum, RPM)

#ついでにアップデートしろって画面にでてるのでアップデートもしておいた

[bash]

/etc/init.d/jenkins stop

cd /usr/lib/jenkins

mv jenkins.war jenkins.war.backup

wget jenkins.warの最新バージョンのURL

/etc/init.d/jenkins start

[/bash]

起動がうまくいかなかったら httpd 再起動すればよさそうでした