安裝依賴
yum install curl policycoreutils openssh-server openssh-clients -y
設定postfix開機啟動
chkconfig postfix on && service postfix start
系統防火牆開啟http 和ssh
關閉防火牆
chkconfig iptables off
wget
可能報錯,再次安裝依賴
yum install policycoreutils-python -y
安裝rpm -i gitlab-ce-11.4.4-ce.0.el6.x86_64.rpm
修改埠:
vi /etc/gitlab/gitlab.rb
#unicorn['port'] = 8080 修改 8070 預設是注釋的去掉前面的
unicorn['port'] = 8070
#nginx['listen_port'] = nil 修改 8090 預設是注釋的去掉前面的
nginx['listen_port'] = 8090
配置監聽
vi /var/opt/gitlab/gitlab-rails/etc/unicorn.rb
#listen "127.0.0.1:8080", :tcp_nopush => true
listen "127.0.0.1:8070", :tcp_nopush => true
監聽埠
修改預設的gitlab nginx的web服務80端 /var/opt/gitlab/nginx/conf/gitlab-http.conf
執行新配置
gitlab-ctl reconfigure
執行重啟gitlab
gitlab-ctl status
vi /etc/gitlab/gitlab.rb
修改:gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "***@公司.com"
gitlab_rails['smtp_password'] = "(授權碼或密碼)"
gitlab_rails['smtp_domain'] = "公司.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false
gitlab_rails['gitlab_email_from'] = "***@公司.com"
gitlab_rails['gitlab_email_reply_to'] = "***@公司.com"
user["git_user_email"] = "***@公司.com"
儲存,生效
sudo gitlab-ctl reconfigure
重啟服務
配置虛擬機器開機啟動(虛擬機器名稱xp)
@echo off
:: by oicu
cd /d "d:\program files\oracle\virtualbox"
vboxheadless --startvm "xp"
:: vboxmanage startvm "xp" --type headless
關機指令碼
@echo off
:: by oicu
cd /d "d:\program files\oracle\virtualbox"
vboxmanage controlvm "xp" acpipowerbutton
:: send to vm, for windows guest os only.
vboxmanage controlvm "xp" keyboardputscancode 1c
將指令碼bat檔案配置到使用者登入登出項
開啟gpedit.msc組策略,在使用者的登入/登出指令碼裡
設定linux開機啟動
vim /etc/rc.d/rc.local
新增內容:
sudo gitlab-ctl start
gitlab郵箱驗證 郵箱提醒設定
gitlab郵件提醒方便跟蹤專案進度,在這裡介紹兩種方式,一種是用系統的sendmail傳送郵件,另一種是gmail的stmp來傳送郵件 第一種 用系統的sendmail傳送郵件 cd home gitlab gitlab vi config environments production.rb 將...
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...