gitlab卸载

1、停止gitlab

gitlab-ctl stop

2、卸载gitlab(注意这里写的是gitlab-ce)

rpm -e gitlab-ce

3、查看gitlab进程

ps aux | grep gitlab


4、杀掉第一个进程(就是带有好多…的进程)
杀掉后,在ps aux | grep gitlab确认一遍,还有没有gitlab的进程。若还存在,可以把它的主要组件的进程也杀一边。

run: alertmanager: (pid 100019) 13376s; run: log: (pid 82025) 86211s
run: gitaly: (pid 100032) 13376s; run: log: (pid 82041) 86211s
run: gitlab-monitor: (pid 100047) 13375s; run: log: (pid 82047) 86211s
run: gitlab-workhorse: (pid 100054) 13375s; run: log: (pid 82031) 86211s
run: logrotate: (pid 121160) 2574s; run: log: (pid 82039) 86211s
run: nginx: (pid 100070) 13374s; run: log: (pid 82037) 86211s
run: node-exporter: (pid 100077) 13374s; run: log: (pid 82027) 86211s
run: postgres-exporter: (pid 100082) 13373s; run: log: (pid 82023) 86211s
run: postgresql: (pid 100097) 13372s; run: log: (pid 82035) 86211s
run: prometheus: (pid 100100) 13372s; run: log: (pid 82021) 86211s
run: redis: (pid 100114) 13372s; run: log: (pid 82033) 86211s
run: redis-exporter: (pid 100118) 13371s; run: log: (pid 82043) 86211s
run: sidekiq: (pid 100124) 13370s; run: log: (pid 82029) 86211s
run: unicorn: (pid 100136) 13369s; run: log: (pid 82045) 86211s

日志的进程不用管。
5、删除所有包含gitlab文件

find / -name gitlab | xargs rm -rf

当然若你没有全杀权限。那么可以可以把这三个目录给干掉也可以:

rm -rf /opt/gitlab
rm -rf /etc/gitlab
rm -rf /var/log/gitlab

6、重新安装制定版本命令
sudo yum install gitlab-ce-x.x.x #安装指定版本

sudo yum install gitlab-ce-11.4.8

7、修改配置网址和重定向仓库目录sudo vim /etc/gitlab/gitlab.rb,刷新配置卡在下面的情况的处理。

Recipe: gitlab::gitlab-rails
* execute[clear the gitlab-rails cache] action run

解决方案:

1.按住CTRL+C强制结束;

2.运行:sudo systemctl restart gitlab-runsvdir;

3.再次执行:sudo gitlab-ctl reconfigure

8、刷新配置后需要重启。
若用命令sudo gitlab-ctl status查看服务状态是停止就执行启动命令:

sudo gitlab-ctl start

若用命令sudo gitlab-ctl status查看服务状态是运行状态就执行重启命令sudo gitlab-ctl restart;也可以先停止sudo gitlab-ctl stop,再启动sudo gitlab-ctl start。
————————————————
版权声明:本文为CSDN博主「郏国上」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/jia12216/article/details/84853136

原文地址:https://www.cnblogs.com/brady-wang/p/11059711.html