标黑的就是关键命令,先停止gitlab服务,然后rpm -e卸载,然后查看剩余gitlab进程,然后杀死主进程,然后删除所有相关目录 1 [[email protected] ~]$ sudo gitlab-ctl stop 2 [sudo] password for liuyx: 3 liuyx 不在 sudoers 文件中。此事将被报告。 4 [[email protected] ~]$ su root 5 密码: 6 [[email protected] liuyx]# ls -l /etc/sudoers 7 -r--r-----. 1 root root 3907 6月 23 03:42 /etc/sudoers 8 [[email protected] liuyx]# vim /etc/sudoers 9 [[email protected] liuyx]# chmod 777 /etc/sudoers 10 [[email protected] liuyx]# vim /etc/sudoers 11 [[email protected] liuyx]# chmod 440 /etc/sudoers 12 [[email protected]srv liuyx]# exit 13 exit 14 [[email protected] ~]$ sudo gitlab-ctl stop 15 [sudo] password for liuyx: 16 ok: down: gitaly: 1s, normally up 17 ok: down: gitlab-monitor: 0s, normally up 18 ok: down: gitlab-workhorse: 1s, normally up 19 ok: down: logrotate: 0s, normally up 20 ok: down: nginx: 1s, normally up 21 ok: down: node-exporter: 0s, normally up 22 ok: down: postgres-exporter: 0s, normally up 23 ok: down: postgresql: 0s, normally up 24 ok: down: prometheus: 1s, normally up, want up 25 ok: down: redis: 0s, normally up 26 ok: down: redis-exporter: 1s, normally up 27 ok: down: sidekiq: 1s, normally up 28 ok: down: unicorn: 0s, normally up 29 30 [[email protected] ~]$ sudo rpm -e gitlab-ce 31 [sudo] password for liuyx: 32 [[email protected] ~]$ ps -ef|grep gitlab 33 root 728 1 0 07:50 ? 00:00:00 runsvdir -P /opt/gitlab/service log: ........................................................................................................................................................................................................................................................................................................................................................................................................... 34 root 752 728 0 07:50 ? 00:00:00 runsv gitlab-workhorse 35 root 768 752 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/gitlab-workhorse 36 root 769 755 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/logrotate 37 root 776 728 0 07:50 ? 00:00:00 runsv gitlab-monitor 38 root 779 773 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/node-exporter 39 root 783 753 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/nginx 40 root 853 749 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/unicorn 41 root 854 751 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/gitaly 42 root 855 774 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/redis-exporter 43 root 856 776 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/gitlab-monitor 44 root 870 748 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/postgresql 45 root 871 747 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/redis 46 root 872 750 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/sidekiq 47 root 873 772 0 07:50 ? 00:00:04 svlogd -tt /var/log/gitlab/prometheus 48 root 874 775 0 07:50 ? 00:00:00 svlogd -tt /var/log/gitlab/postgres-exporter 49 liuyx 30424 21574 0 21:30 pts/0 00:00:00 grep --color=auto gitlab 50 [[email protected] ~]$ sudo kill -9 728 51 [sudo] password for liuyx: 52 [[email protected] ~]$ ps -ef|grep gitlab 53 liuyx 30725 21574 0 21:33 pts/0 00:00:00 grep --color=auto gitlab 54 55 [[email protected] liuyx]# find / -name gitlab 56 find: ‘/run/user/1000/gvfs’: 权限不够 57 [[email protected] liuyx]# rm -rf /run/user/1000/gvfs 58 rm: 无法删除"/run/user/1000/gvfs": 是一个目录 59 [[email protected] liuyx]# umount -rf /run/user/1000/gvfs 60 [[email protected] liuyx]# rm -rf /run/user/1000/gvfs 61 [[email protected] liuyx]# find / -name gitlab|xargs rm -rf
时间: 2024-10-29 03:50:12