In case a server ever has a crashed primary drive, feel free to ask the datacenter to install a new primary drive, and mount the old primary drive as the secondary, so that we can copy from it when the system is back online.
1 - mount old drive as /old /old/usr /old/var etc.
Most servers should be:
mkdir /old
mount /dev/sdb1 /old
mount /dev/sdb2 /old/var
mount /dev/sdb3 /old/usr
mount /dev/sdb7 /old/home
But you may need to figure out exactly which /dev/sdbX it is.
Then start copying
cp -R --reply=yes -p /old/etc/proftpd/* /etc/proftpd
cp -R --reply=yes -p /old/etc/valiases/* /etc/valiases
cp -R --reply=yes -p /old/etc/vfilters/* /etc/vfilters
cp -R --reply=yes -p /old/etc/userdomains /etc
cp -R --reply=yes -p /old/usr/local/cpanel/3rdparty/mailman/* /usr/local/cpanel/3rdparty/mailman
cp -R --reply=yes -p /old/usr/local/frontpage/* /usr/local/frontpage
cp -R --reply=yes -p /old/usr/share/ssl/* /usr/share/ssl
cp -R --reply=yes -p /old/var/cpanel/* /var/cpanel
cp -R --reply=yes -p /old/var/lib/mysql/* /var/lib/mysql
cp -R --reply=yes -p /old/var/log/bandwidth/* /var/log/bandwidth
cp -R --reply=yes -p /old/var/named/* /var/named
cp -R --reply=yes -p /old/var/spool/cron/* /var/spool/cron
cp -R --reply=yes -p /old/etc/ips /etc/ips
cp -R --reply=yes -p /old/etc/group /etc/group
cp -R --reply=yes -p /old/etc/localdomains /etc/localdomains
cp -R --reply=yes -p /old/etc/named.conf /etc/named.conf
cp -R --reply=yes -p /old/etc/passwd /etc/passwd
cp -R --reply=yes -p /old/etc/proftpd.conf /etc/proftpd.conf
cp -R --reply=yes -p /old/etc/quota.conf /etc/quota.conf
cp -R --reply=yes -p /old/etc/rndc.conf /etc/rndc.conf
cp -R --reply=yes -p /old/etc/secondarymx /etc/secondarymx
cp -R --reply=yes -p /old/etc/shadow /etc/shadow
cp -R --reply=yes -p /old/etc/wwwacct.conf /etc/wwwacct.conf
cp -R --reply=yes -p /old/usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf
cp -R --reply=yes -p /old/usr/local/cpanel/3rdparty/interchange/interchange.cfg /usr/local/cpanel/3rdparty/interchange/interchange.cfg
cp -R --reply=yes -p /old/home/* /home
chown -R mysql:mysql /var/lib/mysql
/scripts/restartsrv httpd
/scripts/restartsrv exim
/scripts/restartsrv mysql
/scripts/enablefileprotect
/scripts/mailperm
Important things to check
1 - rndc status should show all the zones. If it only shows 8, or nothing, then run /scripts/fixndc
2 - You should reboot the server and check to see if sample sites are loading. This is quite important!! If not, then fix/diagnose.
3 - Don't forget to recompile apache, otherwise everyone with GD requirements will be screaming at you!!!
4 - Pls also install fantastico, zend, and ioncube as well
5- If you are copying from an old cpanel install, you'll have to run /scripts/convert2maildir as well.
CGI Script to change ownership of all /home folders (may not be necessary):
NOTE: You may be able to use: /scripts/chownpublichtmls
If not, then put this in: file.cgi in /home and then execute it like this "perl file.cgi"
@ls = `ls -1`;
foreach $line (@ls){
chop $line;
print `chown $line\.$line -R $line`;
print `chmod 755 -R $line`;
}
Please check following steps to install Cpanel on server (ONLY IF NEEDED),
mkdir /home/cpins
cd /home/cpins
wget http://layer1.cpanel.net/latest
sh latest
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment