Edventures in Normalcy

::Installation::
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

cd /home

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

sh latest

Once done, it is time to configure this bad boy!

::Configuration::
*As seen in http://www.thecpaneladmin.com/skipping-whm-setup-wizard/ http://www.thecpaneladmin.com/skipping-whm-setup-wizard/

1 Touch this file to tell cPanel it is being automatically setup.

touch /etc/.whostmgrft

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], [user@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 [user@example.com]\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

Linux VPS (CPanel) What to do if you are not able to access PhpMyAdmin from a individual account.

Within CPanel, you have the ability to access a MySql database using PhpMyAdmin. However you may notice that if you attempt to connect to PhpMyAdmin using a login other than root (Using port 2083) you will get the following error;

PhpMyAdmin Error:

#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

To correct this you will need to login as root and edit /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php. To do this, do the following;

vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php (You can also use Pico or Nano if it is installed.

find
$cfg['Servers'][$i]['socket'] = ”;
change to
$cfg['Servers'][$i]['socket'] = ‘/var/lib/mysql/mysql.sock’;

next line
$cfg['Servers'][$i]['connect_type'] = ‘tcp’;

change to

$cfg['Servers'][$i]['connect_type'] = ’socket’;

You may also will want to change “localhost” to “127.0.0.1″

That’s it. Now restart MySql (this may or may not be necessary) and you will be able to login to PhpMyAdmin.

Copyright © Edventures in Normalcy. All rights reserved.