url:http://www.xi-ju-an.com/date/2005/11/
<! [Cdata[perl Build Installation/
Perl's source code installation is fairly simple, and Perl 5.84 is the fastest installation in the following ways
Rm-f config.sh policy.sh
SH configure-de
Make
Make Test
Make install
Of course, we should also be more practical
The following I install on the Perlchina server
1. Installation environment and source download/
Perlchina server is RedHat Enterprise Linux Adv serv 3.0 Update 2 This is the Advanced Server version of the RedHat release, this upgrade package Linux is more mature and secure, the server pre-installed is Perl 5.80 Version, the Perl interpreter is in the/usr/bin/perl and the library file is in the/usr/lib/perl5/perl5.8.0/directory/
We download the latest release 5.84 files directly from http://www.cpan.org stable.tar.gz we download and upload to/usr/local/directory
2. Unlock the source
Tar Xfzv./stable.tar.gz
It's a new directory after it's been unpacked/usr/local/perl5.8.4
We make a symbolic connection ln-s/usr/local/perl5.8.4/usr/local/perl
Below our installation is done in the/usr/local/perl directory
Cd/usr/local/perl
Note: If you want to install a full Perl execution program, you can also create a new directory Mkdir/usr/local/perl
3. The following is the configuration of Perl source code
./configure-des-dprefix=/usr/local/perl-dusethreads-uinstalluserbinperl
Note 1: One of the first items in the old installation configuration is-duse5005threads This is the older multithreaded version of Perl 5.005, and after the new DBI 1.2 no longer supports more than 5.005 threads, so let's cancel this one/
Note 2:-dprefix=/usr/local/perl is the specified installation directory/
4. Compile and install/
Make && make install
Normally, the installation is complete here. /
5. Replace Original Perl
Finally, in order for the original PERL/CGI program to use the new version of Perl, we need to modify the original Perl
Cd/usr/bin
MV Perl perl.5.8.0
Ln-s/usr/local/perl/perl/usr/bin/perl
Note 1:MV Perl perl.5.8.0 This is to rename the original Perl
Note 2:ln-s/usr/local/perl/perl/usr/bin/perl This is a symbolic connection, so that the use of #!/usr/bin/perl in the code can be directly without modification
6. Install the necessary modules, such as dbi/cgi, etc.
Perl-mcpan-eshell
We can install the required modules after the CPAN is configured directly.
Install DBI
Install CGI
Install Apache::D bi
Of course, there are modules, such as dbd::mysql, that need to be manually installed/
Here, our installation has been completed/
Perl-v can check that it's already the latest version.
Note: Perl is installed in the/usr/local/perl directory, the corresponding PM module file directory has changed, the original installed module is best to reinstall, especially the need to compile the module, such as DBI, and pure Perl modules do not need. ]]>