原来分享了Linux安装gitlab社区版的方式,本文分享怎么卸载gitlab社区版。

1、停止gitlab服务

[root@VM-0-5-centos ~]# sudo gitlab-ctl stop
ok: down: gitaly: 0s, normally up
ok: down: gitlab-monitor: 0s, normally up
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 1s, normally up
ok: down: nginx: 0s, normally up
ok: down: node-exporter: 1s, normally up
ok: down: postgres-exporter: 0s, normally up
ok: down: postgresql: 0s, normally up
ok: down: prometheus: 1s, normally up
ok: down: redis: 0s, normally up
ok: down: redis-exporter: 1s, normally up
ok: down: sidekiq: 0s, normally up
ok: down: unicorn: 0s, normally up

2、卸载gitlab(安装的是社区版,所以是gitlab-ce)

[root@VM-0-5-centos ~]# rpm -e gitlab-ce

3、查看gitlab进程

[root@VM-0-5-centos ~]# ps aux|grep gitlab
root       559  0.0  0.0   4384   284 ?        Ss   Nov27   0:02 runsvdir -P /opt/gitlab/service log: ...........................................................................................................................................................................................................................................................................................................................................................................................................
root       574  0.0  0.0   4232   268 ?        Ss   Nov27   0:00 runsv gitlab-monitor
root       578  0.0  0.0   4232   312 ?        Ss   Nov27   0:00 runsv gitlab-workhorse
root       586  0.0  0.0   4376   364 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/sidekiq
root       589  0.0  0.0   4376   424 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/node-exporter
root       590  0.0  0.0   4376   508 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/logrotate
root       592  0.0  0.0   4376   444 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/postgresql
root       593  0.0  0.0   4376   412 ?        S    Nov27   0:03 svlogd -tt /var/log/gitlab/gitlab-monitor
root       594  0.0  0.0   4376   372 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/gitlab-workhorse
root       595  0.0  0.0   4376   336 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/nginx
root       597  0.0  0.0   4376   392 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/gitaly
root       605  0.0  0.0   4376   440 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/redis-exporter
root       606  0.0  0.0   4376   328 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/redis
root       607  0.0  0.0   4376   412 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/unicorn
root       608  0.0  0.0   4376   256 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/postgres-exporter
root       611  0.0  0.0   4376   404 ?        S    Nov27   0:00 svlogd -tt /var/log/gitlab/prometheus
root      9886  0.0  0.0 112784   728 pts/3    R+   09:13   0:00 grep --color=auto gitlab

4、杀死第一个进程,会自动将后面的很多进程一起杀掉

[root@VM-0-5-centos ~]# kill -9 559

5、再次查看gitlab进程,如果杀不干净,再重复执行上面的kill -9 PID命令

[root@VM-0-5-centos ~]# ps aux|grep gitlab
root     10119  0.0  0.0 112784   732 pts/3    R+   09:14   0:00 grep --color=auto gitlab

6、 杀干净后,删除所有gitlab相关的文件

[root@VM-0-5-centos ~]# find / -name gitlab | xargs rm -rf
Logo

更多推荐