centos安装gitlab-ce

1、gitlab是什么
gitlab是git仓库的管理工具,提供web页面方便用户使用。
gitlab-ce和gitlab-ee,ce是社区版,ee是企业版,企业版有些功能需要付费使用。

2、从官方仓库上安装gitlab
添加官方仓库:
curl -L https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

3、安装postfix
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

4、安装gitlab
yum install gitlab-ce

5、安装完成后会有提示信息
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

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

GitLab now ships with a newer version of PostgreSQL (11.7), but it is not yet
enabled by default. To upgrade, please see:
https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server

6、编辑/etc/gitlab/gitlab.rb
将:
# nginx['listen_port'] = nil
修改为:
nginx['listen_port'] = 8888
将:
external_url 'http://gitlab.example.com'
修改为:
external_url 'http://你的IP地址:8888'
注:这里external_url需要加上端口,否则使用http克隆和查看文件,链接里会没有端口

继续阅读centos安装gitlab-ce