張家港網(wǎng)站建設(shè)培訓(xùn)班網(wǎng)站宣傳的方法有哪些
1.準備環(huán)境
gitlab只支持linux系統(tǒng),本人在虛擬機下使用Ubuntu作為操作系統(tǒng),gitlab鏡像要使用和操作系統(tǒng)版本對應(yīng)的版本,(ubuntu18.04,gitlab-ce_13.2.3-ce.0_amd64 .deb)
book@100ask:/$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
2.下載gitlab
gitlab官網(wǎng)下載速度較慢且后續(xù)配置較麻煩,所以使用清華大學鏡像,網(wǎng)址如下
Index of /gitlab-ce/ubuntu/pool/bionic/main/g/gitlab-ce/ | 清華大學開源軟件鏡像站 | Tsinghua Open Source Mirror
將gitlab鏡像放入ubuntu某個路徑下
3.安裝前先安裝依賴
安裝郵件服務(wù)的時候會出現(xiàn)郵件配置,使用左右鍵和回車鍵選擇確定、取消,彈出列表選項的時候,選擇Internet Site
sudo apt update
sudo apt install ca-certificates curl openssh-server postfix
4.在放鏡像的路徑操作如下命令安裝gitlab?
sudo pdkg -i gitlab-ce_13.2.3-ce.0_amd64
5.安裝成功提示
book@100ask:~$ sudo dpkg -i gitlab-ce_13.2.3-ce.0_amd64\ .deb
Selecting previously unselected package gitlab-ce.
(Reading database ... 133527 files and directories currently installed.)
Preparing to unpack gitlab-ce_13.2.3-ce.0_amd64 .deb ...
Unpacking gitlab-ce (13.2.3-ce.0) ...
Setting up gitlab-ce (13.2.3-ce.0) ...
It looks like GitLab has not been configured yet; skipping the upgrade script.*. *.*** ******** *****.****** *************** ********,,,,,,,,,***********,,,,,,,,,,,,,,,,,,,,*********,,,,,,,,,,,.,,,,,,,,,,,*******,,,,,,,,,,,,,,,,,,,,,*****,,,,,,,,,.,,,,,,,****,,,,,,.,,,***,,,,,*,._______ __ __ __/ ____(_) /_/ / ____ _/ /_/ / __/ / __/ / / __ `/ __ \/ /_/ / / /_/ /___/ /_/ / /_/ /\____/_/\__/_____/\__,_/_.___/Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:sudo gitlab-ctl reconfigureFor a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
6.安裝完配置網(wǎng)址
修改/etc/gitlab/gitlab.rb中的external_url配置訪問頁面,因為我是本地的虛擬機中安裝的,所以可配置虛擬機的IP地址 external_url ‘http://192.168.0.104’
book@100ask:/$ cd /etc/gitlab/
book@100ask:/etc/gitlab$ ls
gitlab.rb gitlab-secrets.json trusted-certsbook@100ask:/etc/gitlab$ sudo vim gitlab.rb
external_url 'http://192.168.0.104'
7.配置完,初始化gitlab
sudo gitlab-ctl reconfigure
8.檢查gitlab是否安裝好,用如下命令檢查
sudo gitlab-ctl status
正常提示如下?
book@100ask:/etc/gitlab$ sudo gitlab-ctl status
run: alertmanager: (pid 23499) 35390s; run: log: (pid 23133) 35508s
run: gitaly: (pid 23463) 35394s; run: log: (pid 22470) 35661s
run: gitlab-exporter: (pid 23445) 35394s; run: log: (pid 22995) 35532s
run: gitlab-workhorse: (pid 23422) 35396s; run: log: (pid 22897) 35571s
run: grafana: (pid 23596) 35389s; run: log: (pid 23355) 35425s
run: logrotate: (pid 56544) 3153s; run: log: (pid 22931) 35560s
run: nginx: (pid 22901) 35568s; run: log: (pid 22915) 35565s
run: node-exporter: (pid 23435) 35395s; run: log: (pid 22971) 35548s
run: postgres-exporter: (pid 23511) 35390s; run: log: (pid 23197) 35502s
run: postgresql: (pid 22597) 35647s; run: log: (pid 22605) 35646s
run: prometheus: (pid 23474) 35394s; run: log: (pid 23043) 35516s
run: puma: (pid 22781) 35587s; run: log: (pid 22795) 35584s
run: redis: (pid 22414) 35671s; run: log: (pid 22430) 35668s
run: redis-exporter: (pid 23454) 35395s; run: log: (pid 23014) 35521s
run: sidekiq: (pid 22798) 35581s; run: log: (pid 22810) 35578s
9.在本地window下的瀏覽器中輸入http://192.168.0.104
10.重新設(shè)置密碼
輸入兩次密碼后,點擊Change your password就可以了