Page 1 of 1

Install cPanel on a SmokyHost VPS w/ centos-4-x86_64 (minimum install OS)

Posted: Tue Oct 02, 2007 11:31 pm
by therobotfuture
*NOTICE*
I wrote this this guide using a VPS purchased from SmokyHosts.com. Apply this information at your own discretion.
If you find terms that are misused, information not accurate, or that I am just dead wrong, you probably have some general knowledge about these things. So, Please feel free to correct/elaborate on this guide/how to/tutorial, or just tell me I suck. Either way.


Why I want to install cPanel on a minimum OS install of CentOS 4? Because I failed to create a backup before reinstalling my VPS (from SmokyHosts.com), Which completely F***ed up the VPS 5 minutes after I logged in for the first time. So I was left with a fresh minimum install of centos-4-x86_64 and no cPanel. I know a little about Linux, but nothing about servers, web hosting, VPSs, or virtual anything, etc... and despite this, It was surprisingly more difficult then I thought to install cPanel. The yum dependencies were the biggest problem. But for what it is worth, this is how I managed to do it...


Installing cPanel requires yum to be installed and configured correctly. Since it is not currently installed, yum and required dependencies will be needed. Install yum's dependencies.

Import CentOS4 RPM signing key:

Code: Select all

# rpm -import [url]http://mirror.centos.org/centos/4/os/x86_64/RPM-GPG-KEY-centos4[/url]
Install dependencies for yum:

Code: Select all

# rpm -Uvh [url]http://mirror.centos.org/centos/4/os/x86_64/CentOS/RPMS/sqlite-3.3.6-2.x86_64.rpm[/url]
# rpm -Uvh [url]http://mirror.centos.org/centos/4/os/x86_64/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.x86_64.rpm[/url]
# rpm -Uvh [url]http://mirror.centos.org/centos/4/os/x86_64/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm[/url]
# rpm -Uvh [url]http://mirror.centos.org/centos/4/os/x86_64/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.x86_64.rpm[/url]
Now that all dependencies have been resolved, install yum.

Install yum:

Code: Select all

# rpm -Uvh [url]http://mirror.centos.org/centos/4/os/x86_64/CentOS/RPMS/yum-2.4.3-3.el4.centos.noarch.rpm[/url]
To configure yum, build local cache of repositories' metadata. glibc will cause problems, so to resolve dependencies, delete glibc-dummy-centos-4. Finally, update yum. I can't explain why to do this, but it apparently makes yum work properly.

Run commands:

Code: Select all

# yum makecache
# yum erase glibc-dummy-centos-4
# yum update
*I don't know the importance of the order these commands are run, but this worked for me*

cPanel can now be installed. Create an install directory, and then download and run the install script. After cPanel is installed, you can log in to WHM and configure the VPS.

Install Cpanel/WHM:

Code: Select all

# mkdir /home/cpinstall
# cd /home/cpinstall
# wget [url]http://layer1.cpanel.net/latest[/url]
# sh latest
*Make sure you are logged in as root*

Using a web browser, log in to WHM @http://your.ip.address:2086

Despite being a giant pain in my ass, I have learned some important concepts of VPSs, web hosting, etc... but I think the most important thing I have learned is...

ALWAYS BACKUP YOUR DATA!


References:
cPanel installation guide
swsoft forum post 1
swsoft forum post 2
webhostingtalk forum post
hostlibrary article

Posted: Sun Oct 07, 2007 10:13 am
by SHAdmin
That was much awaited 'How To' by most of our VPS clients :)

You have been credited 50 points for sharing it

Update :: install yum on centos-5-x86_64

Posted: Thu Jan 10, 2008 10:00 pm
by therobotfuture
Just a quick update, for anyone wanting to accomplish the same thing as above, but with CentOS 5. Installing yum is pretty much the same thing, but here it is for anyone that needs it.

import key:

Code: Select all

rpm --import http://mirror.centos.org/centos-5/5/os/x86_64/RPM-GPG-KEY-CentOS-5http://mirror.centos.org/centos-5/5/os/x86_64/RPM-GPG-KEY-CentOS-5
Install needed dependencies for yum:

***NOTE***
You need to install rpm-python with --nodeps
and m2crypto needs to be installed before python-urlgrabber.
***NOTE***

Code: Select all

rpm -Uhv http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
rpm -Uhv http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
rpm -Uhv http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/rpm-python-4.4.2-47.el5.x86_64.rpm --nodeps
rpm -Uhv http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/m2crypto-0.16-6.el5.1.x86_64.rpm
rpm -Uhv http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/python-urlgrabber-3.1.0-2.noarch.rpm
rpm -Uhv http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/yum-metadata-parser-1.0-8.fc6.x86_64.rpm
Now yum can be installed:

Code: Select all

rpm -Uhv http://mirror.centos.org/centos-5/5/os/x86_64/CentOS/yum-3.0.5-1.el5.centos.5.noarch.rpm
I have not tested it with cPanel, so I don't know if anything changed with that. I am currently using webmin/virtualmin and like better. There is an install script here if it interests anyone.

Install cPanel on a SmokyHost VPS w/ centos 4 x86_64 minimum insta

Posted: Mon Jun 14, 2010 1:25 pm
by bukdub
I briefly looked through the installation guide and found little information on this topic. For grins I was able to install GW 5.3 on a demo machine. I have a production machine that currently has a working Apache2 and MySQL server running. Is there a way to have GW install using the existing services and not install its own?

Thanks.