1.停止gitlab
  1. gitlab-ctl stop

2.卸载gitlab-ce/gitlab-ee
  1. rpm -e gitlab-ce

3.查看gitlab进程
  1. [root@localhost gitlab]# ps -ef|grep gitlab
  2. root 10676 1 0 10:31 ? 00:00:00 runsvdir -P /opt/gitlab/service log: .................................................................................................
  3. root 10678 10677 0 10:31 ? 00:00:00 svlogd -tt /var/log/gitlab/redis
  4. root 11689 10676 0 10:32 ? 00:00:00 runsv gitlab-workhorse
  5. root 12115 10676 0 10:33 ? 00:00:00 runsv gitlab-monitor
  6. root 12399 11689 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/gitlab-workhorse
  7. root 12421 11866 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/gitaly
  8. root 12443 11286 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/postgresql
  9. root 12444 11558 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/unicorn
  10. root 12445 11626 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/sidekiq
  11. root 12452 11750 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/nginx
  12. root 12453 11801 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/logrotate
  13. root 12461 12211 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/prometheus
  14. root 12465 12037 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/node-exporter
  15. root 12482 12115 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/gitlab-monitor
  16. root 12483 12298 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/alertmanager
  17. root 12484 12161 0 10:33 ? 00:00:00 svlogd -tt /var/log/gitlab/redis-exporter

杀掉第一个守护进程
kill -9 10676
再次查看gitlab进程是否存在

4.删除gitlab文件
  1. find / -name gitlab|xargs rm -rf

删除所有包含gitlab的文件及目录
删除gitlab-ctl uninstall时自动在root下备份的配置文件

  1. rm -f /root/gitlab*