How to upgrade Perl on Linux with WHM Installed

Here’s a quick how-to on upgrading Perl on Linux server specifically RHEL 5 with WHM/Cpanel installed on it. You should have all the necessary compilers installed on your system before doing any of the commands below. This process requires you to have gcc and make packages to name a few installed.
This how-to was tested on RHEL 5 only so do this at your own risk if you have different distro other than what is mentioned, although it should work fine.
If you have applications with perl modules dependencies, it is advisable that you list down all the modules before you perform the perl upgrade as this will save you a lot of time later after the upgrade.
keywords:upgrading perl 5.8 to perl 5.12.3
If you’re set then here’s how to do it.
1. Download the latest stable Perl release, currently 5.12.3 and decompress it.
http://www.perl.org/get.html
tar -vxzf perl-5.12.3.tar.gz
cd perl-5.12.3
Now configure the installation to install all dependencies and guess some default options, and use threads.
./Configure -de -Dusethreads
It’s now time to compile the perl source and perform a test when done.
make
make test
make install
The make install command will need to be executed as a root user, so login as root if you haven’t done so yet. Perl will be installed in your /usr/local, meaning your perl interpreter can be found in /usr/local/bin/perl and your libraries can be found in /usr/local/lib.
Rename the old perl interpreter just in case you need to go back to your old perl version or you have perl scripts looking at the old perl path and create a symbolic link of the latest version of perl to /usr/bin.
mv /usr/bin/perl /usr/bin/perl5.8
ln -s /usr/local/bin/perl /usr/bin
At this point, you should start installing all the needed perl modules for your perl scripts to run.
That’s about it, drop me a message if you have questions.
keywords: upgrading perl to perl 5.12.3
Spread the word
del.icio.us Digg Furl Google StumbleUpon Technorati Windows Live Yahoo! Help











Leave a Comment