LoginSignup
8
7

More than 5 years have passed since last update.

Jenkins入門②〜Jenkins設定編

Posted at

はじめに

前回まででJenkinsのインストールが完了してるかと思います。
今回はJenkinsの設定編です。
JenkinsをインストールしてあるPCからの操作になります。
さくさくいきますよー。

前回までの記事

Jenkins入門①〜Jenkins概要とインストール編

Jenkins起動

以下のコマンドをターミナルから実行しましょう。

$ jenkins

そうすると以下のようなものが表示されます。

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

This may also be found at: /Users/hoge/.jenkins/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

xxxx...のとこが初期パスワードです。

ロック解除

http://localhost:8080/
を開きましょう。
初期設定画面が表示されます。スクショないです。ごめんなさい。
初期パスワード入れるところがあるので入力してContinue。

プラグインのインストール

こちらもスクショがありません。
「Install suggested plugins」を選択すればよいでしょう。
しばし待ちましょう。

管理者ユーザー作成

もちろんこちらもスクショがありません。
必要事項を入力しましょう。

ブラウザはこれで終了。ここからMacの設定です。

自動起動設定

$ cp /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents

ネットワーク設定

LAN内からアクセスできるようにしましょう
・システム環境設定→ ネットワーク→詳細→TCP/IP→IPv4の設定→DHCPサーバを使用(アドレスは手入力)を選択
IPv4アドレス欄に任意のIPアドレスを。

・~/Library/LaunchAgents/homebrew.mxcl.jenkins.plistを編集
ついでに文字コードの設定も

homebrew.mxcl.jenkins.plist
// これ削除
<string>--httpListenAddress=127.0.0.1</string>

// これ追加
<string>-Dfile.encoding=UTF-8</string>
<string>-Dsun.jnu.encoding=UTF-8</string>

Jenkins再起動

$ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist

今回はここまで!
とりあえずLAN内からアクセスできるようになりましたね!

8
7
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
8
7