Linux搭建Gitlab服务(version 12.12.15)

E&T: CentOS_7.4 64位;

M0. 准备

① ssh

查看系统ssh版本:  # ssh -V

若未安装, 则需要安装ssh服务:

# sudo yum install -y curl policycoreutils-pythonopenssh-server

# sudo systemctl enable sshd     将SSH服务设置成开机自启动

# sudo systemctl start sshd    启动SSH服务

② firewalld

打开系统防火墙 HTTP的访问:

# sudo firewall-cmd --permanent --add-service=http

# sudo systemctl reload firewalld    重启防火墙

③ postfix  用于发送邮件通知

# sudo yum install postfix   安装postfix

# sudo systemctl enable postfix     将postfix服务设置成开机自启动

# sudo systemctl start postfix        

若启动报错:

④ wget     用于从外网上下载插件

查看版本:

 若未安装, yum -y install wget

M1. 添加GitLab镜像源

① 添加gitlab镜像

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

② 安装Gitlab

rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

过程中若报错,根据提示安装依赖即可:

 出现下图,则为安装成功:

③ 修改gitlab配置文件指定服务器ip和自定义端口:

vim  /etc/gitlab/gitlab.rb

例如使用8090:

 另外:

④ 重置并启动Gitlab

# gitlab-ctl reconfigure

# gitlab-ctl restart

提示  "ok: run:"表示启动成功

 

参考: https://blog.csdn.net/duyusean/article/details/80011540; https://my.oschina.net/uwith/blog/2236852 等出处

猜你喜欢

转载自www.cnblogs.com/Azi-mi/p/11442804.html