LoginSignup
3
3

More than 5 years have passed since last update.

CentOS5.4にJenkinsをyumでインストール

Last updated at Posted at 2014-12-01

環境

OS : CentOS release 5.4 (Final)

リポジトリ情報の登録

$ 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
http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key: インポート読み込みに失敗しました(-1)
とかエラーが出る場合、
一旦落としてから。
$ wget http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
やると
$ sudo rpm --import jenkins-ci.org.key
うまくいくかも

Jenkinsインストール

$ sudo yum install jenkins

Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * addons: centos.mirror.secureax.com
 * base: centos.mirror.secureax.com
 * extras: centos.mirror.secureax.com
 * rpmforge: archive.cs.uu.nl
 * updates: ftp.iij.ad.jp
117 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package jenkins.noarch 0:1.592-1.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch                  Version                  Repository              Size
====================================================================================================
Installing:
 jenkins                noarch                1.592-1.1                jenkins                 59 M

Transaction Summary
====================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total size: 59 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : jenkins                                                                      1/1

Installed:
  jenkins.noarch 0:1.592-1.1

Complete!

Jenkins設定変更

$ sudo vi /etc/sysconfig/jenkins

# ポート変更
JENKINS_PORT="8090"
JENKINS_AJP_PORT="8010"

# URLを{myserver}:8090/jenkinsで接続出来るようにする
JENKINS_ARGS="--prefix=/jenkins"

Jenkinsのサービスを起動

$ sudo service jenkins start
or
$ sudo /etc/init.d/jenkins start

起動確認

http://{myserver}:8090/jenkins/

Jenkinsの常駐化

$ sudo chkconfig jenkins on

常駐化確認

$ sudo chkconfig --list | grep jenkins

Jenkinsの構成

name path
本体 /var/lib/jenkins
設定ファイル /etc/sysconfig/jenkins
起動スクリプト /etc/init.d/jenkins
ログ /var/log/jenkins

参考リンク

Jenkins本家

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3