Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section 3rd Party Software
  • Search

Properly uninstall vestacp in centos

Section with additional software for Vesta
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
mattluu
Posts: 2
Joined: Fri Jan 09, 2015 6:16 pm

Properly uninstall vestacp in centos
  • Quote

Post by mattluu » Fri Jan 09, 2015 6:38 pm

Sorry I don't know where to put this topic . Can moderators help me move it to right place please?

Here is my problem. I'm writing a script that used for automatically install, uninstall, check version, start, stop... for vestacp and its components like mysql, postgre, memcached ....

When I tried to test uninstalling vestacp on my CentOS 6.5 , I checked service after uninstalling with steps on vesta's document. But later I found out that mysqld, named, exim, messagebus ... were still running. They were all program installed by vesta. And iptable still had some lines like fail2ban, vesta-iptables... I couldn't reinstalling vesta too because it said me those services still running.

So I decied to uninstalled them and reset my iptables . Here is the script

Code: Select all

service "vesta" stop
# kill named process
kill "$(pgrep named)"
yum -y remove vesta*
rm -f /etc/yum.repos.d/vesta.repo
# PACKAGES is an array i made with "httpd","apache","fail2ban","mysqld""nginx","dovecot","vsftpd","exim","messagebus" to check if they still exists after uninstalling vesta
for i in "${PACKAGES[@]}"; do
      service.exists $i && service $i stop >/dev/null && writeln "Unistalling $i" && yum -y remove $i
done
# delete admin user and cronjobs
passwd -l admin >/dev/null
crontab -r -u admin >/dev/null
userdel -r admin
rm -f /home/admin
# reset iptables rules
iptables --flush && service iptables save && service iptables stop && service iptables start && iptables --list
rm -rf /usr/local/vesta >/dev/null
Everytime I executed this function, I lost connection to my vps through putty, and couldn't access to vps anymore. So I had to reinstall the vps 's OS.

Could you please point me out why I got those errors and show me how to improve my script for a chance a centos user want to reinstall their vestaCP but can't uninstall properly?

Thank you in advance
Top

sim
Posts: 101
Joined: Sat Nov 22, 2014 7:47 pm

Re: Properly uninstall vestacp in centos
  • Quote

Post by sim » Fri Jan 09, 2015 8:49 pm

You probably forgot that default policy is DROP for INPUT in iptables. As soon as you clear rule allowing SSH traffic it's gone.

Issue this command:

Code: Select all

iptables --policy INPUT ACCEPT
Before clearing all rules
Top

mattluu
Posts: 2
Joined: Fri Jan 09, 2015 6:16 pm

Re: Properly uninstall vestacp in centos
  • Quote

Post by mattluu » Sat Jan 10, 2015 6:44 am

sim wrote:You probably forgot that default policy is DROP for INPUT in iptables. As soon as you clear rule allowing SSH traffic it's gone.

Issue this command:

Code: Select all

iptables --policy INPUT ACCEPT
Before clearing all rules
Thank you so much :D
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “3rd Party Software”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password