這樣jenkins就安裝完成了。啟動jenkins,wget -q
-o- | sudo apt-key add -
sudo sh -c
'echo deb binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
service jenkins start
開始配置,開啟
網頁:http://』your server ip』:8080
根據提示找到密碼
cat /var/lib/jenkins/secrets/initialadminpassword
進行下一步外掛程式安裝:
安裝推薦外掛程式(這邊無所謂,有需要的外掛程式可以以後再安裝)
安裝完成後,新增admin賬號
這樣jenkins基本設定就安裝好了。
首先安裝nginx
安裝完成後,新增nginx配置檔案apt update
apt install nginx
輸入如下內容:cd /etc/nginx/conf.d
touch jenkins.conf
讓nginx載入最新配置:server }}
nginx -s reload
開啟jenkins配置檔案:
vim /etc/default/jenkins
修改jenkins埠,將8080 改為 8085
...重啟jenkins
service jenkins restart
通過配置的網域名稱即可開啟jenkins了。
ps:常用指令:
檢視jenkins狀態:
sudo systemctl status jenkins
root@iz25ckpu8szz:/etc/nginx/conf.d# sudo systemctl status jenkins
● jenkins.service - lsb: start jenkins at boot time
loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
active: active (exited) since mon 2018-01-22 13:13:16 cst; 1 day 21h ago
docs: man:systemd-sysv-generator(8)
jan 22 13:13:15 iz25ckpu8szz systemd[1]: stopped lsb: start jenkins at boot time.
jan 22
13:13:15 iz25ckpu8szz systemd[1]: starting lsb: start jenkins at boot time...
jan 22
13:13:15 iz25ckpu8szz jenkins[15016]: * starting jenkins automation server jenkins
jan 22
13:13:15 iz25ckpu8szz su[15038]: successful su for jenkins by root
jan 22
13:13:15 iz25ckpu8szz su[15038]: + ??? root:jenkins
jan 22
13:13:15 iz25ckpu8szz su[15038]: pam_unix(su:session): session opened for
user jenkins by (uid=0)
jan 22
13:13:16 iz25ckpu8szz jenkins[15016]: ...done.
jan 22
13:13:16 iz25ckpu8szz systemd[1]: started lsb: start jenkins at boot time.
Aliyun伺服器搭建Docker
首先安裝相應的軟體 apt update apt install software properties common curl fssl sudo apt key add add apt repository deb arch amd64 lsb release cs stable apt upd...
伺服器搭建
問題一 com無法訪問到伺服器 問題二 將 com 301重定向到 www.com 解決方案 在httpd.conf檔案中 追加 如下內容 options followsymlinks rewriteengine on rewritecond com rewriterule l,r 301 2 禁止...
搭建伺服器
零基礎搭建伺服器 我用的是ubuntu,所有 sudo apt get install apache2 配置php的時候已經配好了,這裡就不重複配置了 安裝apxs 安裝過php,所以這個也忽略掉 sudo apt get install apache2 dev apxs是乙個為apache超文字傳...