CentOS7安装Gitlab完整步骤

1.安装相关依赖

yum -y install policycoreutils openssh-server openssh-clients postfix

2.启动ssh服务&设置为开机启动

systemctl enable sshd && sudo systemctl start sshd

3.设置postfix开机自启,并启动,postfix支持gitlab发信功能

systemctl enable postfix && systemctl start postfix

4.进入opt文件夹

cd /opt

5.安装jdk

安装网址:CentOS7 64位虚拟机安装JDK完整步骤_顶尖高中生的博客-CSDN博客_虚拟机centos7安装jdk

6.yum安装policycoreutils-python

yum install policycoreutils-python -y

7.安装gitlab

rpm -ivh gitlab-ce-12.4.2-ce.0.el6.x86_64.rpm

8.修改gitlab配置

vim /etc/gitlab/gitlab.rb

修改内容如下:

external_url 'http://主机地址:82'
nginx['listen_port'] = 82

9.重载配置及启动gitlab

gitlab-ctl reconfigure 
gitlab-ctl restart

10.关闭防火墙

systemctl stop firewalld

你可能感兴趣的:(Gitlab,linux,虚拟机,云计算)