virtualbox 虛擬centos7安裝gitlab簡略過程

centos安裝gitlablinux

參考安裝步驟
https://www.gitlab.com.cn/downloads/#centos7git

1. 安裝配置依賴項centos

如想使用Postfix來發送郵件,在安裝期間請選擇'Internet Site'. 您也能夠用sendmai或者 配置SMTP服務 並 使用SMTP發送郵件.瀏覽器

在 Centos 6 和 7 系統上, 下面的命令將在系統防火牆裏面開放HTTP和SSH端口.bash

sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
2. 添加GitLab倉庫,並安裝到服務器上服務器

curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
若是你不習慣使用命令管道的安裝方式, 你能夠在這裏下載 安裝腳本 或者 手動下載您使用的系統相應的安裝包(RPM/Deb) 而後安裝ssh

curl -LJO https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm
rpm -i gitlab-ce-XXX.rpm
3. 啓動GitLabcurl

sudo gitlab-ctl reconfigure
4. 使用瀏覽器訪問GitLabgitlab

首次訪問GitLab,系統會讓你從新設置管理員的密碼,設置成功後會返回登陸界面.post

默認的管理員帳號是root,若是你想更改默認管理員帳號,請輸入上面設置的新密碼登陸系統後修改賬號名.


遇到錯誤
Error executing action `run` on resource 'execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-7.2.0-ssh-keygen.pp]'

執行如下命令 sudo yum install libsemanage-static libsemanage-devel

相關文章
相關標籤/搜索