安装配置gitlab
0.1. 安装依赖包
#我们采用的是 gitlab-ce 11.1.6版本
yum install -y curl openssh-server openssh-clients postfix cronie policycoreutils-python
0.2. 启动postfix,并设置开机自启
systemctl start postfix
systemctl enable postfix
0.3. 设置防火墙
firewall-cmd --add-service=http --permanent
firewall-cmd --reload
或者
关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
0.4. 下载安装gitlab rpm包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.1.6-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-11.1.6-ce.0.el7.x86_64.rpm
## 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://gitlab.example.com'
# 修改这里为自己的外网IP地址,可以添加端口也可以不添加端口
external_url 'http://111.***.**.133'
0.6. 重新加载配置文件
gitlab-ctl reconfigure
gitlab-ctl restart
0.7. 查看gitlab版本
head -1 /opt/gitlab/version-manifest.txt
访问地址 http://111.*..133