Installing Perl on Linux (and nix) Systems

Installing Perl on Linux (and *nix) Systems

Installing Perl on a Linux box takes a little more work than installing it on a Windows system. The first step is to obtain Perl. There are several options that you can configure, but the installation program does a very good job at configuring your installation for you.

  1. Go to http://www.perl.com and click on the "Downloads" link.

  2. Click on the 'Stable Production Release' link under the 'Source Code Distribution' list item.

    Tip 

    By compiling Perl from the source, you end up with a Perl that is configured best for your system. For *nix-based systems, I always install from the source.

    This should then get you to a link that allows you to download the file named stable.tar.gz.

  3. Download stable.tar.gz and place it somewhere that you want to untar it.

    For example:

    mkdir temp mv stable.tar.gz temp cd temp
  4. Then unpack the distribution:

    tar -xzvf stable.tar.gz

    This creates a subdirectory named with the current Perl release.

  5. Change to that directory:

    cd perl-5.x.x
  6. Run the configuration script. The -d option will choose the defaults for all options; this is the easiest way to install Perl.

    sh Configure -d
  7. Once the shell script is done configuring Perl, you get a prompt that says 'Press return or use a shell escape to edit config.sh:." Press the Enter key. Once that is done, you must make Perl. Use the following command:

    make

    Wait-this part takes a few minutes.

When make is done, run the test suite to make sure everything is ok. If any tests fail, you must read the error message(s) and correct the problem(s) before continuing. The goal is for this to finish with a message that states "All tests successful."

make test

When make test is done, you must install Perl (this part must be done as root).

make install

Watch for any questions that may arise when you perform the install; the defaults are usually safe to choose.

Once this is finished, you can type perl -v to verify that Perl is installed and that the version number is what you expect it to be.

That is all there is to installing Perl on both Windows systems and Linux systems. The users of other Unixes should follow the Linux instructions, as these instructions are identical to what they would need to do.



Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net