1 Run the following command to check if Apache, PHP, MySQL, Bind or Cyrus are pre-installed by the OS:
rpm -qa | egrep '(http)|(php)|(cyrus)|(mysql)|(bind-utils)'
2 If any are installed they can cause issues with installing cPanel, although I have seen cPanel attempt to import settings. I would rather remove them:
yum remove http* yum remove php* yum remove mysql* yum remove bind-utils*
3 Open the /home directory
4 Fetch the latest installation file from the cPanel servers
wget -N http://httpupdate.cpanel.net/latest
::NOTE:: If you want to install the STABLE release, further details found here, as apposed to latest, run the following command:
>echo "CPANEL=stable" > /etc/cpupdate.conf
5 Run the installation files
Once done, it is time to configure this bad boy!
1 Touch this file to tell cPanel it is being automatically setup.
2 Configure the 3 main services for the server.
/scripts/setupmailserver dovecot /scripts/setupnameserver disabled /scripts/setupftpserver pure-ftpd
3 Replace the following strings [Server’s Main IP], [email@example.com], [Servers FQDN Hostname], [hostname 1], [hostname 2], [hostname 3] with their appropriate values.
::NOTE:: Keep in mind this should be ONE line once you have updated the string below.
echo -e 'ADDR [Server's Main IP]\nCONTACTEMAIL [firstname.lastname@example.org]\nCONTACTPAGER\nDEFMOD x3\nETHDEV eth0\nFTPTYPE pureftp\nHOMEDIR /home\nHOMEMATCH home\nHOST [Servers FQDN Hostname]\nLOGSTYLE combined\nMINUID\nNS [hostname 1]\nNS2 [hostname 2]\nNS3 [hostname 3]\nNS4\nNSTTL 86400\nSCRIPTALIAS y\nTTL 14400' > /etc/wwwacct.conf