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"