2020年 · Linux

GitLab管理基本操作

安装完gitlab后的运维操作

初次配置服务:gitlab-ctl reconfigure

启动服务:gitlab-ctl start

停止服务:gitlab-ctl stop

重启服务:gitlab-ctl restart

检查服务的日志信息

检查redis的日志:gitlab-ctl tail redis

检查postgresql的日志:gitlab-ctl tail postgresql

检查gitlab-workhorse的日志:gitlab-ctl tail gitlab-workhorse

检查logrotate的日志:gitlab-ctl tail logrotate

检查nginx的日志: gitlab-ctl tail nginx

检查sidekiq的日志: gitlab-ctl tail sidekiq

检查unicorn的日志:gitlab-ctl tail unicorn

检查服务状态:gitlab-ctl status

一般服务状态显示信息

显示格式:

状态(run/down): 进程名称 : (进程PID) 运行时间(秒) : run进程的日志 : 服务进程pid   运行时间

run: alertmanager: (pid 26905) 83876s; run: log: (pid 25009) 146574s
run: gitaly: (pid 26914) 83875s; run: log: (pid 24513) 146701s
run: gitlab-exporter: (pid 26933) 83874s; run: log: (pid 24948) 146591s
run: gitlab-workhorse: (pid 26935) 83874s; run: log: (pid 24856) 146618s
run: grafana: (pid 26943) 83873s; run: log: (pid 25264) 146463s
run: logrotate: (pid 18723) 1070s; run: log: (pid 24897) 146606s
run: nginx: (pid 26970) 83873s; run: log: (pid 24881) 146612s
run: node-exporter: (pid 26976) 83872s; run: log: (pid 24927) 146600s
run: postgres-exporter: (pid 26980) 83872s; run: log: (pid 25052) 146565s
run: postgresql: (pid 26989) 83871s; run: log: (pid 24642) 146689s
run: prometheus: (pid 26991) 83871s; run: log: (pid 24992) 146578s
run: redis: (pid 27005) 83871s; run: log: (pid 24476) 146707s
run: redis-exporter: (pid 27010) 83870s; run: log: (pid 24965) 146584s
run: sidekiq: (pid 27030) 83869s; run: log: (pid 24839) 146624s
run: unicorn: (pid 27042) 83867s; run: log: (pid 24820) 146628s

参考:https://www.jianshu.com/p/ab168c703240