系统相关
首页 > 系统相关> > centos8.2安装gitlab

centos8.2安装gitlab

作者:互联网

gitlab比较吃内存建议4G以上的内存

1.安装gitlab的依赖,如果报错不用管,centos8没有policycoreutils-python yum源

yum install -y curl policycoreutils-python openssh-server

2.启动ssh并设置为开机自启动
systemctl enable sshd
systemctl start sshd

3.下载postfix
yum -y install postfix
systemctl start postfix 
systemctl enable postfix

4.添加http服务到firewalld,pemmanent表示永久生效,若不加–permanent系统下次启动后就会失效
systemctl start firewalld
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=ssh
systemctl reload firewalld

5.下载gitlab
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm

6.安装
rpm -i gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm

7.编辑ip和端口,ip:自己服务器Ip,端口:只要不重复随便定义
vim /etc/gitlab/gitlab.rb
external_url 'ip:port' 
nginx['listen_port'] = port
gitlab-ctl reconfigure#比较费时间耐心等待
gitlab-ctl restart

7.修改端口后还要去修改防火墙
firewall-cmd --zone=public --add-port=port/tcp --permanent
firewall-cmd --reload

到此全部安装完毕,可以直接访问啦!

 

 后面再补充关于汉化的方法

标签:cmd,--,centos8.2,gitlab,add,permanent,安装,port
来源: https://www.cnblogs.com/hniu/p/14704828.html