搭建私有工作环境之 centos7下gitlab的搭建
centos7下gitlab的搭建
1.开放防火墙端口8090
2.配置yum源
cd /etc/yum.repos.d找到base.repo,最末端添加如下:
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
3.下载并安装
yum install -y gitlab-ce
4.安装postfix
yum install postfix
systemctl start postfix.service
chkconfig postfix on
5.修改默认端口号
vim /etc/gitlab/gitlab.rb
#放开注释,并修改unicorn的默认端口号
unicorn['port'] = 8091
#放开注释,并修改nginx的默认端口号
external_url 'http://localhost:8090'
6.保存修改后的配置并启动
gitlab-ctl reconfigure
gitlab-ctl start
7.注意事项
- 常用日志:
/var/log/gitlab/unicorn/unicorn_stderr.log
/var/log/gitlab/nginx/error.log
还没有评论,来说两句吧...