Centos7安裝gitlab
1. gitlab簡介。
GitLab 是一個用於倉庫管理系統的開源項目。使用Git作爲代碼管理工具,並在此基礎上搭建起來的web服務。
2. 安裝步驟。
安裝配置gitlab必要的依賴組件。
Sudo yum –y install curl openssh-server
如果出現如下錯誤信息,請按列出命令解決。
切換root 用戶
Su – root
修改sudoers文件的權限
chmod 777 /etc/sudoers
編輯文件,添加當前用戶
Vim /etc/sudoers
然後修改文件權限爲440
Chmod 440 /etc/sudoers
切換用戶回william
Su william
重新執行命令 Sudo yum –y install curl openssh-server
在服務中啓用ssh
sudo systemctl enable sshd
啓用ssh服務 sudo systemctl start sshd
安裝postfix郵件服務器
Sudo yum –y install postifx
啓用postfix服務
Sudo systemctl enable postfix
啓動postfix服務
Sudo systemctl start postfix
允許服務http通過防火牆
Sudo firewall-cmd –permanent –add-service=http
重新加載防火牆
Sudo systemctl reload firewalld
下載安裝gitlab的腳本,並且安裝
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
經過長時間的下載終於安裝完成。
配置並且開始gitlab
Sudo gitlab-ctl reconfigure
在瀏覽器中輸入服務器ip,會出現如下畫面。
用默認的用戶名密碼登陸
用戶名:root
密碼: 2iveL!fe