H-Sphere uninstall HOWTO

    H-Sphere reinstall is not easy task if you don't know how to remove all its processes, packages, users, directories and other trash.
Standard H-Sphere installation script just install software. H-Sphere documentation contains good installation page, but there no any word about deinstallation. We spent several hours to find out all possible problems that can arise during reinstallation process and wrote the following instruction.

Command Service
# Step 1
/etc/rc.d/init.d/httpdcp stop
/etc/rc.d/init.d/postgresql stop
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/proftpd stop
/etc/rc.d/init.d/clamd stop
/etc/rc.d/init.d/spamd stop
/etc/rc.d/init.d/qmaild stop
/etc/rc.d/init.d/named stop
/etc/rc.d/init.d/mysqld stop
# (CP)
# (CP and PgSQL)
# (Web and Mail)
# (Web)
# (Mail)
# (Mail)
# (Mail)
# (DNS)
# (MySQL)
# Step 2
rpm -e `rpm -qa | grep hsphere`
rpm -e `rpm -qa | grep "^postgresql"` --nodeps
rpm -e `rpm -qa | grep "^mysql"`
rpm -e `rpm -qa | grep "^MySQL"`
# (All)
# (CP and PgSQL)
# (MySQL)
# (MySQL)
# Step 3
userdel cpanel
userdel httpdcp
userdel postgres
userdel mysql
userdel wwwuser
userdel ftpd
userdel httpd
userdel alias
userdel qmaild
userdel qmaill
userdel qmailp
userdel qmailq
userdel qmailr
userdel qmails
userdel vpopmail
groupdel qmail
groupdel nofiles
groupdel vchkpw
# (CP)
# (CP)
# (CP and PgSQL)
# (MySQL)
# (Web)
# (Web)
# (Web and Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# (Mail)
# Step 4
rm -rf /var/lib/pgsql
rm -rf /var/lib/mysql
# (CP and PgSQL)
# (MySQL)
# Step 5
mv /hsphere/install/pkg /root/

rm -rf /hsphere
rm -rf /service
rm -rf /var/qmail
# (All) Only if you are going to reinstall H-Sphere
# in future and want to avoid download repetition.
# (All)
# (Mail and DNS)
# (Mail)
# Step 6 (optional)
crontab -e
vi /etc/rc.local
vi /etc/hosts
vi /etc/resolv.conf
# (All) Remove all H-Sphere tasks
# (All) Remove all H-Sphere commands
# (All) Remove all H-Sphere hosts
# (All) Make sure there are correct nameserver IPs

Now you can execute H-Sphere installation script again.
If any problems still arise.

Home
© root0.net