六、問題記錄
3、403 forbidden
yum -y install curl policycoreutils-python openssh-server openssh-clients postfix cronie wget
systemctl start postfix
systemctl enable postfix
systemctl start sshd
systemctl enable sshd
# 如果沒有安裝防火牆
yum -y install firewalld systemd
systemctl start firewalld
systemctl enable firewalld
# 新增 http 服務到防火牆
gitlab-ctl start
# 一路 enter 就可以
ssh-keygen
# 建立專案,然後 add ssh key
cat/root/
.ssh/id_rsa.pub
gitlab_rails[『gitlab_email_from』] = 『*****@qq.com』
gitlab_rails[『smtp_enable』] = truegitlab_rails[『smtp_address』] = 「smtp.qq.com」
gitlab_rails[『smtp_port』] = 465
gitlab_rails[『smtp_user_name』] = 「***********@qq.com」
gitlab_rails[『smtp_password』] = 「****」 # qq郵箱授權碼
gitlab_rails[『smtp_domain』] = 「qq.com」
gitlab_rails[『smtp_authentication』] = 「login」
gitlab_rails[『smtp_enable_starttls_auto』] = true
gitlab_rails[『smtp_tls』] = true
user[『git_user_email』] = 「*******@qq.com」
gitlab-ctl reconfiguregitlab-ctl restart
gitlab-rails consolenotify.test_email(』*****@163.com』, 『ssssss subject』, 『bbb body』).deliver_now
vim /etc/gitlab/gitlab.rb# 減少資料庫快取,預設 256mb,可適當改小
postgresql[『shared_buffers』] = 「256mb」
# 減少資料庫併發,預設 8,可適當改小
postgresql[『max_worker_processes』] = 8
# 減少 sidekiq 併發數,預設 25,可適當改小
sidekiq[『concurrency』] = 25
unicorn[『worker_processes』] = 2
gitlab-ctl reconfiguregitlab-ctl restart
vim /etc/gitlab/gitlab.rb# unicorn[『port』] = 8080
chmod -r 755 /var/log/gitlab/
cat
/proc/swaps
free
dd if=/dev/zero of=/mnt/swap bs=512 count=8388616 # 這個步驟會很慢
mkswap /mnt/swap
swapon /mnt/swap
echo
"/mnt/swap swap swap defaults 0 0" >> /etc/fstab
gitlab-ctl restart
vim /etc/gitlab/gitlab.rbgitlab_rails[『rack_attack_git_basic_auth』] =
GitLab服務搭建
1 檢視自己的系統版本,在官網中選擇適配的系統 cat etc redhat release centos linux release 7.5.1804 core 2 安裝和配置必要的依賴 yum install y curl policycoreutils python openssh serve...
搭建gitlab服務
sudo yum install y curl policycoreutils python openssh server sudo yum install postfix 安裝 sudo systemctl enable postfix 開機自啟動 sudo systemctl start pos...
GitLab伺服器搭建
這幾天有個同事在搭建gitlab伺服器,按照官網的教程搭建好之後clone時總是找不到倉庫,各種嘗試都不行,最後用下面的方案解決了。sudo yum install curl openssh server openssh clients postfix cronie sudo service pos...