安装GitLab

rpm包下载:Index of /gitlab-ce/yum/el7/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

1.解压下载好的压缩包

rpm -ivh gitlab-ce-15.9.4-ce.0.el7.x86_64.rpm --force --nodeps

2.修改配置文件

1.配置启动端口
vim /etc/gitlab/gitlab.rb

unicorn['port']=10000 # GitLab进程端口
nginx['listen_port']=10001 # Nginx端口
postgresql['shared_buffers'] = '64MB'
nginx['status'] = {
 "enable" => true,
 "listen_addresses" => ["127.0.0.1"],
 "port" => 10001,
 "vts_enable" => true,
 "options" => {
   "stub_status" => "on", # Turn on stats
   "server_tokens" => "off", # Don't show the version of NGINX
   "access_log" => "off", # Disable logs for stats
   "deny" => "all" # Deny access to anyone else
  }
}
# 外部访问地址
gitlab_rails['gitlab_host']='11.3.12.65'
gitlab_rails['gitlab_port']=10001
# 邮箱配置
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "x@ot.com"
gitlab_rails['smtp_password'] = "Uvvwqdqdqdqwdq"
gitlab_rails['smtp_domain'] = "ot.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true
gitlab_rails['gitlab_email_from'] ='x@ot.com'
gitlab_rails['gitlab_email_reply_to'] = 'x@ot.com'



# 关闭一些监控和性能基准相关的功能
prometheus['enable'] = false
prometheus_monitoring['enable'] = false
alertmanager['enable'] = false
node_exporter['enable'] = false
redis_exporter['enable'] = false
postgres_exporter['enable'] = false
pgbouncer_exporter['enable'] = false
gitlab_exporter['enable'] = false
grafana['enable'] = false
sidekiq['metrics_enabled'] = false
2.使配置生效 
/opt/gitlab/embedded/bin/runsvdir-start
gitlab-ctl reconfigure

3.配置gitlab-nginx  (此配置可忽略)
vim /var/opt/gitlab/nginx/conf/gitlab-http.conf

 listen *:10001;  #将80改为10001

3.启动GitLab

启动:gitlab-ctl  start

状态:gitlab-ctl  status

停止:gitlab-ctl  stop

重启:gitlab-ctl  restart
日志:gitlab-ctl tail

结束所有相关进程:systemctl stop gitlab-runsvdir

run: logrotate: (pid 32557) 2579s; run: log: (pid 16155) 5516s
run: nginx(pid 32560) 2579s; run: log: (pid 16144) 5517s
run: postgresql: (pid 32573) 2578s; run: log: (pid 15970) 5541s
run: redis: (pid 32582) 2578s; run: log: (pid 15885) 5547s
run: sidekiq: (pid 32590) 2576s; run: log: (pid 16127) 5518s
run: unicorn: (pid 32600) 2575s; run: log: (pid 16103) 5519s

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值