Install the Perl environment in CentOS

Source: Internet
Author: User
Tags install perl
1. install the Perl environment yuminstallperl *. the command basically installs the perl module. YuminstallcpanCPAN. If you have high requirements on the perl module version and want to use the new version, follow the steps below to install yuminstallperlyuminstallcpan and compile and install it with cpan.

1. install the Perl environment

Yum install perl *
This command basically installs the perl module.
Yum install cpan
CPAN, you know.


If you have high requirements on the perl module version and want it to be a new version, install it as follows:
Yum install perl
Yum install cpan

In the future, use cpan for compilation and installation.

 

2. download and install the latest Perl version.

First download the latest perl source code package:


[Root @ akinlau/] # wget http://www.cpan.org/src/5.0/perl-5.16.1.tar.gz


Decompress the source package
[Root @ akinlau/] # tar-xzf perl-5.16.1.tar.gz


Compile and install. the directory can be customized.


[Root @ akinlau/] # cd perl-5.16.1
[Root @ akinlau perl-5.16.1] #./Configure-des-Dprefix =/usr/local/perl


[Root @ akinlau perl-5.16.1] # make
[Root @ akinlau perl-5.16.1] # make test
[Root @ akinlau perl-5.16.1] # make install


If the system has previously installed the old version of perl, replace the original version of the system.
[Root @ akinlau perl-5.16.1] # mv/usr/bin/perl. bak
[Root @ akinlau perl-5.16.1] # ln-s/usr/local/perl/bin/perl/usr/bin/perl


Let's see if it's the latest version.


[Root @ akinlau perl-5.16.1] # perl-v


This is perl 5, version 16, subversion 1 (v5.16.1) built for x86_64-linux


Copyright 1987-2012, Larry Wall


Perl may be copied only under the terms of either the Artistic License or
GNU General Public License, which may be found in the Perl 5 source kit.


Complete documentation for Perl, including FAQ lists, shocould be found on
This system using "man perl" or "perldoc perl". If you have access to
Internet, point your browser at http://www.perl.org/, the Perl Home Page.




If the preceding information is displayed, the installation is successful.

 

 

 

Refer to blog:

1. http://blog.sina.com.cn/s/blog_939dd3150100ykom.html

2. http://www.centoscn.com/image-text/install/2014/0928/3869.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.