ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

centos 安装gitlab-ce 13

2021-07-22 11:05:48  阅读:27  来源: 互联网

标签:13 gitlab ce vim nginx ctl port listen


centos 安装gitlab-ce 13

# 添加yum源:
vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1

# 安装
yum makecache
yum -y install gitlab-ce

# 配置
vim /etc/gitlab/gitlab.rb
external_url 'http://ip\域名'

# 初始化并启动
gitlab-ctl reconfigure
gitlab-ctl start |stop |restart |status
gitlab-ctl service-list

# 访问
http://ip\域名    //默认80端口

# gitlab访问502
1、查看进程,端口是否被占用
gitlab-ctl tail [进程名] 
2、权限问题
chmod -R 755 /var/log/gitlab
3、内存不足
4、gitlab-rake gitlab:check
5、gitlab-ctl restart sidekiq 
   gitlab-ctl hup unicorn 

# 修改端口
1、gitlab.rb
vim /etc/gitlab/gitlab.rb
external_url 'http://ip:8082'
# unicorn['listen'] = 'localhost'
unicorn['listen'] = '127.0.0.1'
# unicorn['port'] = 8080
unicorn['port'] = 8082
# nginx['listen_addresses'] = ['*', '[::]']
nginx['listen_addresses'] = ['*']
# nginx['listen_port'] = nil
nginx['listen_port'] = 82

2、gitlab-rails
vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
 #host: gitlab.example.com
    host: 101.200.63.123
    #port: 80
    port: 82
    
vim /var/opt/gitlab/gitlab-rails/etc/puma.rb 
#bind 'tcp://127.0.0.1:8080'
bind 'tcp://127.0.0.1:8082'

3、gitlab nginx
vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
server {
  #listen *:80;
  listen *:82;


  #server_name gitlab.example.com;
  server_name ip;

4、gitlab-shell
vim var/opt/gitlab/gitlab-shell/config.yml
#gitlab_url: "http+unix://%2Fvar%2Fopt%2Fgitlab%2Fgitlab-workhorse%2Fsockets%2Fsocket"
gitlab_url: "http://127.0.0.1:8082"

标签:13,gitlab,ce,vim,nginx,ctl,port,listen
来源: https://blog.csdn.net/weixin_44906977/article/details/118993886

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有