sudo yum install -y curl policycoreutils-python openssh-server perl
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
yum install postfix
systemctl enable postfix
systemctl start postfix
--------------------------------------------------------------------------------------------------------------------------------
#以下為安裝gitlab-ce
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
#接下來有兩種安裝方式,請選擇一種方式安裝
#自帶domain安裝,會順便幫你申請lets encryt憑證,如果無法出外網,則會幫你安裝自產
EXTERNAL_URL="https://gitlab2.fmt.com.tw" yum install -y gitlab-ce
#不自帶domain安裝,不會幫忙設定https
yum install -y gitlab-ce
gitlab-ctl reconfigure
--------------------------------------------------------------------------------------------------------------------------------
#以下為安裝gitlab-ee
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
#自帶domain安裝,會順便幫你申請lets encryt憑證,如果無法出外網,則會幫你安裝自產
EXTERNAL_URL="https://gitlab2.fmt.com.tw" yum install -y gitlab-ee
#不自帶domain安裝,不會幫忙設定https
yum install -y gitlab-ee
gitlab-ctl reconfigure
root密碼在
cat /etc/gitlab/initial_root_password
登入成功後,記得改密碼
如果要新增https
請修改 /etc/gitlab/gitlab.rb
external_url "https://gitlab.example.com" 記得使用https + 你的domain
關閉letsencrypt
letsencrypt['enable'] = false
http轉https
nginx['redirect_http_to_https'] = true
建立資料夾
sudo mkdir -p /etc/gitlab/ssl
sudo chmod 755 /etc/gitlab/ssl
sudo cp gitlab.example.com.key gitlab.example.com.crt /etc/gitlab/ssl/
如果使用自己的憑證,可以放在
[root@gitlab ssl]# ll /etc/gitlab/ssl
total 20
-rw-r--r--. 1 root root 5587 Sep 22 23:40 gitlab.abow.online.crt
-r--------. 1 root root 1704 Sep 22 23:40 gitlab.abow.online.key
放好憑證後,
gitlab-ctl reconfigure
gitlab-ctl restart
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates tzdata perl postfix
選擇 2. Internet Site
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
sudo EXTERNAL_URL="https://gitlab.fmt.tw" apt-get install gitlab-ee
gitlab-ctl reconfigure
cat /etc/gitlab/initial_root_password