sureshmsi.co.nr

  • co.nr

Removing a site manually in Ensim Servers

Posted by sureshm on October 26, 2007

Ensim control panel usually subjected to errors while editing from the control panel. The most common error is the one which will occur while deleting a site from the control panel.

The following describes how to delete the domain from the back end in linux servers.

01. Login as the ‘root’ of the server.

02. Unmount the perl directories ( if mounted ) by

umount /home/virtual/domain.com/usr/lib/perlX
umount /home/virtual/<sitehandle>/fst/usr/lib/perlX

where X is version number

For make sure that you have unmounted the mounted perl directories.

You can find the site handler of the domain by doing a sitelookup

sitelookup -d domain.com03. Then do the following

rm -rf /home/virtual/siteX
rm -f /home/virtual/adminX
rm -f /home/virtual/domain.com
rm -f /etc/httpd/conf/virtual/siteX
rm -rf /etc/httpd/conf/siteX
rm -f /etc/webalizer/domain.com
userdel adminX

Also please remember to remove any other customizations you have added.

04. Clear out entries of the PostGreSQL database

psql appldb
Welcome to psql, the PostgreSQL interactive terminal.
Type: copyright for distribution terms h for help with SQL commands
? for help on internal slash commands g or terminate with semicolon to execute
query
q to quit
: appldb=> delete from users where site_id = X;
: appldb=> delete from reseller where site_id = X;
: appldb=> delete from bandwidth where site_id = X;
: appldb=> delete from bandwidth_log where site_id = X;
: appldb=> delete from bandwidth_services where site_id = X;
: appldb=> delete from bandwidth_spans where site_id = X;
: appldb=> delete from diskquota where site_id = X;
: appldb=> delete from ipinfo where site_id = X;
: appldb=> delete from free_uids where site_id = X;
: appldb=> delete from ipinfo_ipaddrs where site_id = X;
: appldb=> delete from ipinfo_nbaddrs where site_id = X;
: appldb=> delete from apache where site_id = X;
: appldb=> delete from ssh where site_id = X;
: appldb=> delete from telnet where site_id = X;
: appldb=> delete from reseller_bandwidth where site_id = X;
: appldb=> delete from reseller_diskquota where site_id = X;
: appldb=> delete from reseller_info where site_id = X
: appldb=> delete from reseller_ipinfo where site_id = X;
: appldb=> delete from reseller_users where site_id = X;
: appldb=> delete from siteinfo where site_id = X;
: appldb=>\q

While deleting the database ipinfo failed due to any foreign key constraints of other databases of the site , remove that databases too.
05. View all the files under /etc/virtualhosting/mappings and check if any of them refer to the site that you are deleting. You can delete all lines referring to either siteX or domain.com for each files.
06. Now you can safely restart apache and webappliance.

service httpd restart OR /etc/rc.d/init.d/httpd restart
service webppliance restart OR /etc/rc.d/init.d/webppliance restart ( For Ensim XPro, the service name is epld )

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: