There comes a time in everyone's security life you need to rebuild a cpanel server.. i'm talking about the OS, whm/cpanel and it's modules.. not websites. I wanted to document the process I use to rebuild it:
1. Force an CentOS/Redhat Reinstall by:
2. Force cpanel to update with:
3. Force the webmail systems to update with:
Roundcube:
Horde:
Squirrelmail
4. Reinstall MySQL:
Source
1. Force an CentOS/Redhat Reinstall by:
- Create an empty directory: mkdir /tempreinstall
- CD into the new empty directory: cd /tempreinstall
- Force a Yum update: yum reinstall *
- delete the temp empty directory
2. Force cpanel to update with:
Code:
/scripts/upcp --force
3. Force the webmail systems to update with:
Roundcube:
Code:
/usr/local/cpanel/bin/update-roundcube –-force
Code:
/usr/local/cpanel/bin/update-horde –-force
Code:
/usr/local/cpanel/bin/update-squirrelmail –-force
4. Reinstall MySQL:
Code:
/scripts/mysqlup --force
Source