|
作者:廖剑曦 日期:2017年11月21日 天气:多云
为啥弄这个呢?
Gitlab是一个管理系统
1. 在CentOS系统上,下面的命令将会打开系统防火墙HTTP和SSH访问。
1. sudo yum install curl policycoreutils openssh-server openssh-clients
1. sudo systemctl enable sshd
1. sudo systemctl start sshd
1. sudo yum install postfix
1. sudo systemctl enable postfix
1. sudo systemctl start postfix
1. sudo firewall-cmd --permanent --add-service=http
1. sudo systemctl> 2。添加GitLab镜像源并安装
1. curl -sS http://packages.gitlab.com.cn/install/gitlab-ce/script.rpm.sh | sudo bash
1. 这是官方的yum源,安装速度会比较慢,可以使用国内源,修改如下文件即可:
1. vim /etc/yum.repos.d/gitlab_gitlab-ce.repo
1. 修改内容如下:
1. [gitlab-ce]
1. name=gitlab-ce
1. baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
1. repo_gpgcheck=0
1. gpgcheck=0
1. enabled=1
1. gpgkey=https://packages.gitlab.com/gpg.key
1. 然后执行:
1. sudo yum install gitlab-ce
1. #配置并启动 GitLab
1. sudo gitlab-ctl reconfigure
安装成功会有如下提示:
It looks like GitLab has not been configured yet; skipping the upgrade script.
```
1.
1. *. *.
1. *** ***
1. ***** *****
1. .****** *******
1. ******** ********
1. ,,,,,,,,,***********,,,,,,,,,
1. ,,,,,,,,,,,*********,,,,,,,,,,,
1. .,,,,,,,,,,,*******,,,,,,,,,,,,
1. ,,,,,,,,,*****,,,,,,,,,.
1. ,,,,,,,****,,,,,,
1. .,,,***,,,,
1. ,*,.
1.
1.
1.
1. _______ __ __ __
1. / ____(_) /_/ / ____ _/ /_
1. / / __/ / __/ / / __ \`/ __ \
1. / /_/ / / /_/ /___/ /_/ / /_/ /
1. \____/_/\__/_____/\__,_/_.___/
```
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
sudo gitlab-ctl reconfigure |
|