您好,登錄后才能下訂單哦!
這篇文章主要介紹了Linux怎么搭建GitLab的相關(guān)知識,內(nèi)容詳細(xì)易懂,操作簡單快捷,具有一定借鑒價值,相信大家閱讀完這篇Linux怎么搭建GitLab文章都會有所收獲,下面我們一起來看看吧。
sudo yum install -y curl policycoreutils-python openssh-server 2.開啟SSH 開機自啟動 sudo systemctl enable sshd sudo systemctl start sshd3.防火墻永久開放http sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld(注釋防火墻停止重啟:systemctl start/stop/reload firewalld) 4.
安裝postfix,設(shè)置postfix開機自啟,并啟動,postfix支持gitlab發(fā)信功能
yum install postfix
systemctl enable postfix
systemctl start postfix
下載gitlab:
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
安裝(linux內(nèi)存至少2g官方建議4g內(nèi)存你配置linux內(nèi)存的時候): mkdir /usr/local/gitlab
rpm -ivh gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
修改gitlab配置文件的服務(wù)器地址和端口,配置項:external_url,注意端口占用問題以及防火墻開通端口8989:
vi /etc/gitlab/gitlab.rb
## GitLab URL ##! URL on which GitLab will be reachable. ##! For more details on configuring external_url see: ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab external_url ‘http://192.168.81.129:8989‘
永久開放端口8989:
firewall-cmd –permanent –add-port=8989/tcp
重啟防火墻,運行命令: firewall-cmd –reload
查看端口號是否開啟,運行命令: firewall-cmd –query-port=8989/tcp
重新啟動gitlab配置文件
gitlab-ctl reconfigure gitlab-ctl restart
以上兩個完成現(xiàn)實分別如下:
Running handlers: Running handlers complete Chef Client finished, 362/515 resources updated in 04 minutes 18 seconds gitlab Reconfigured!
[root@hostuser gitlab]# gitlab-ctl restart ok: run: gitaly: (pid 26240) 1s ok: run: gitlab-monitor: (pid 26261) 0s ok: run: gitlab-workhorse: (pid 26264) 1s ok: run: logrotate: (pid 26314) 0s ok: run: nginx: (pid 26322) 1s ok: run: node-exporter: (pid 26334) 0s ok: run: postgres-exporter: (pid 26341) 0s ok: run: postgresql: (pid 26350) 0s ok: run: prometheus: (pid 26359) 0s ok: run: redis: (pid 26375) 1s ok: run: redis-exporter: (pid 26379) 0s ok: run: sidekiq: (pid 26387) 0s ok: run: unicorn: (pid 26397) 0s
進(jìn)入頁面地址欄點擊你設(shè)置的ip:8989
密碼至少8位 adminadmin建議
默認(rèn)用戶名root ,輸入密碼adminadmin
關(guān)于“Linux怎么搭建GitLab”這篇文章的內(nèi)容就介紹到這里,感謝各位的閱讀!相信大家對“Linux怎么搭建GitLab”知識都有一定的了解,大家如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。