`
wenxin2009
  • 浏览: 315037 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

GitLab私服安装

阅读更多

CentOS 7.4

 

GitLab布署:

1、官方文档有安装说明:

https://about.gitlab.com/install/#centos-7

可参考:

https://blog.csdn.net/ouyang_peng/article/details/72903221

创建用户、组参考:

https://www.cnblogs.com/lvchaoshun/p/9276514.html

https://blog.csdn.net/weinichendian/article/details/80964921

 

安装目录:/opt/gitlab

 

2、修改url

vi /etc/gitlab/gitlab.rb

external_url 'http://gitlab.test.com'

 

3、启动gitlab:

sudo gitlab-ctl reconfigure

sudo gitlab-ctl restart

sudo gitlab-ctl status

 

4、gitlab访问

http://gitlab.test.com/

 

----------------------------------------------------

 

常用的几个Gitlab命令:

# 重新应用gitlab的配置,每次修改/etc/gitlab/gitlab.rb文件之后执行

sudo gitlab-ctl reconfigure

 

# 启动gitlab服务

sudo gitlab-ctl start

 

# 重启gitlab服务

sudo gitlab-ctl restart

 

# 查看gitlab运行状态

sudo gitlab-ctl status

 

#停止gitlab服务

sudo gitlab-ctl stop

 

# 查看gitlab运行所有日志

sudo gitlab-ctl tail

 

#查看 nginx 访问日志

sudo gitlab-ctl tail nginx/gitlab_acces.log 

 

#查看 postgresql 日志

sudo gitlab-ctl tail postgresql 

 

# 停止相关数据连接服务

gitlab-ctl stop unicorn

gitlab-ctl stop sidekiq

 

# 系统信息监测

gitlab-rake gitlab:env:info       

 

 

安装过程问题:

1、解决FirewallD is not running问题:

https://www.cnblogs.com/wayneliu007/p/10372601.html

查看firewalld状态:systemctl status firewalld,如果是dead状态,即防火墙未开启。

开启防火墙:systemctl start firewalld

关闭防火墙:systemctl stop firewalld

 

2、修改Gitlab端口号:

vi /etc/gitlab/gitlab.rb

nginx['listen_port'] = 9999 #默认值即80端口 nginx['listen_port'] = nil

vi /var/opt/gitlab/nginx/conf/gitlab-http.conf

listen *:9999; #默认值listen *:80;

然后重启gitlab服务,gitlab-ctl restart

 

下载代码:

git clone http://用户名:密码@gitlab.lixingjy.com/jiuye/jiuye.git

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics