Centos 7搭建Gitlab服务器
在CentOS系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知) ,wget,以下这些命令也会打开系统防火墙中的HTTP和SSH端口访问。
1.安装ssh
sudo yum install -y curl policycoreutils-python openssh-server
安装 postfix 可以发送邮件
sudo yum install postfix
9.将postfix服务设置成开机自启动,安装命令:sudo systemctl enable postfix
10.启动postfix,命令:sudo systemctl start postfix
.添加gitlab镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
2.安装gitlab 安装命令:rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm
安装过程需要些时间
4.修改gitlab配置文件指定服务器ip和自定义端口:
vi /etc/gitlab/gitlab.rb
external_url ‘http://IP:8088’
5.重置并启动GitLab
执行:
gitlab-ctl reconfigure
gitlab-ctl restart