Jenkins Installation and Configuration
環境需求
OS
硬體
軟體
安裝步驟
進入專家模式
按照下列步驟操作,其餘皆使用預設值:
- Advanced options -> Expert install
- 語言 English
- 國家 Taiwan
- 附加語系 zh_TW.UTF-8
- 預設語系 en_US.UTF-8
- 禁止 root 登入
- linux-image-amd64
- 安裝所有驅動程式 (generic)
- 鏡像站 http://cdn.debian.net
- 不使用非自由軟體 (non-free)
- 不使用協力軟體 (contrib)
- 只安裝 SSH server 和 Standard system utilities
- 安裝 GRUB 開機程式
新增使用者
- useradd -m -g users -s /bin/bash <username>
- passwd <username>
- 安裝 Docker
- # apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
- # echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
- # apt-get install apt-transport-https
- # apt-get update
- # apt-get install lxc-docker
- 安裝 Jenkins
- # wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | apt-key add -
- # vi /etc/apt/sources.list
- deb http://pkg.jenkins-ci.org/debian-stable binary/
- # apt-get update
- # apt-get install -y jenkins
- # netstat -antlp | grep 8080
- tcp6 0 0 :::8080 :::* LISTEN 3973/java
設定步驟
- 啟用安全性
- 匿名使用者只能檢視部分內容。
- 所有修改都需要登入才能操作。
- 啟用 CSRF 功能。
- 安裝與更新外掛
- GitHub Plugin
- Docker Plugin
- AnsiColor Plugin
- Next Build Number Plugin
- Role Strategy Plugin
主機資訊
Hostname: yanxen.no-ip.org
Jenkins port: 48080
OpenSSH port: 40822
http://h4-ci.yanxen.h4ck3d.me/