【Devops】Jenkins 安裝教學(CentOS)

【Devops】Jenkins 安裝教學(CentOS)

更新於 發佈於 閱讀時間約 4 分鐘

CentOS 7 安裝及設定Jenkins

介紹

開源且免費的CI工具,由Java編寫的,提供了持續整合、構建以及部署的功能,是一個自動化的server

環境

  • CentOS 7

安裝步驟

1. 添加Jenkins Repository

[root@jenkins ~]# wget --no-check-certificate  -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo

[root@jenkins ~]# rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key

2. 安裝Jenkins以及Java

[root@jenkins ~]# yum install -y jenkins java-1.8.0-openjdk

3. 啟動並啟用Jenkins

[root@jenkins ~]# systemctl start jenkins*

[root@jenkins ~]# systemctl enable jenkins*

4. 在防火牆開啟80以及8080 的port

[root@jenkins ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
[root@jenkins ~]# firewall-cmd --zone=public --add-service=http --permanent
success
[root@jenkins ~]# firewall-cmd --reload
success

5. 透過網頁打開Jenkins

存取URL:http://localhost:8080

raw-image

管理員密碼創建並存儲在日誌文件 /var/log/jenkins/jenkins.log 中。接著透過以下指令取得初始密碼

[root@localhost ~]# grep -A 5 password /var/log/jenkins/jenkins.log
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

Admin password

This may also be found at: /var/lib/jenkins/secrets/initialAdminPassword

接著安裝插件,可直接選Install suggested plugins

raw-image
raw-image

接著來建立管理者帳號

raw-image
raw-image
raw-image

到此所有設定都已完成,即可開始使用Jenkins

參考資料

How to install and Configure Jenkins on CentOS 7 and RHEL 7 (linuxtechi.com)

avatar-img
Alan的開發者天地
18會員
83內容數
golang
留言
avatar-img
留言分享你的想法!
Alan的開發者天地 的其他內容
本文介紹如何使用 MongoDB 的命令行工具 Mongorestore 將先前備份的資料還原到資料庫中。Mongorestore 支援資料庫的整體恢復、特定集合的恢復,以及從遠端伺服器進行恢復等功能。無論是初學者還是有經驗的使用者,都能夠快速掌握如何使用 Mongorestore 工具。
👨‍💻簡介 在資料庫管理和系統維護中,備份是非常重要的一環。對於使用 MongoDB 的開發者和資料庫管理員來說,mongodump 是一個非常實用的命令行工具,能夠快速且輕鬆地完成資料庫的備份和恢復。無論是進行資料遷移、系統升級,還是面對突發的故障,mongodump 都能提供穩定的資料保護
本文介紹如何對 Telegram 憑證監控機器人的代碼進行優化,包括新增指令、讀取變數、提高可讀性和可維護性。
本文介紹如何使用 MongoDB 的命令行工具 Mongorestore 將先前備份的資料還原到資料庫中。Mongorestore 支援資料庫的整體恢復、特定集合的恢復,以及從遠端伺服器進行恢復等功能。無論是初學者還是有經驗的使用者,都能夠快速掌握如何使用 Mongorestore 工具。
👨‍💻簡介 在資料庫管理和系統維護中,備份是非常重要的一環。對於使用 MongoDB 的開發者和資料庫管理員來說,mongodump 是一個非常實用的命令行工具,能夠快速且輕鬆地完成資料庫的備份和恢復。無論是進行資料遷移、系統升級,還是面對突發的故障,mongodump 都能提供穩定的資料保護
本文介紹如何對 Telegram 憑證監控機器人的代碼進行優化,包括新增指令、讀取變數、提高可讀性和可維護性。