Go to Home Page GuidesHow to ArticlesReviewsForumsFrequently Asked QuestionsNewsLinksPotpourri

Site Search

 

Red Hat Linux 9.0 Clean Install - The Whole Enchilada
Last updated: 5/21/03

Perl

Made the following directory with owner lbyard, group lbyard, and 755 permissions:

/home/lbyard/duxcw/cgi-bin

(You could configure Apache to put the cgi-bin directory directly off lbyard or elsewhere for greater security.)

Made (copy and paste) the following test file with gedit and save it in your cgi-bin (mine is /home/lbyard/duxcw/cgi-bin/).

Changed the permissions to 777 (It won't work if it can't at least be read and executed). The owner of the file must be the same as the owner of the directory it is in. I made owner and group lbyard. Named it test.pl

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<HTML><HEAD>";
print "<TITLE>Perl/CGI Test</TITLE>";
print "</HEAD><BODY>";
print "Perl and CGI scripts work!";
print "</BODY></HTML>";

(Perl is very fussy about text files.  If this doesn't work, paste it into a pure text editor and save it again.  Always use the ftp ASCII transfer mode when moving Perl files across the Internet, etc.)

Tested the script at the prompt as root in the terminal window on Linex with...

cd /home/lbyard/duxcw/cgi-bin

/usr/bin/perl /home/ test.pl

It produced this:

Perl and CGI scripts work!

Tested it from a browser on the Windows Me computer typing the following in the Address box:

http://192.168.123.2/cgi-bin/test.pl

That produced this:

Perl and CGI scripts work!

Perl is up!

If you see the actual code, it didn't work. Have fun (start here: http://httpd.apache.org/docs/). I certainly did for longer than I will admit in previous attempts (one of the reasons I wrote the RH 7.3 install log). I can absolutely assure you that what you see above is the actual configuration and text.pl file that works on my server--regardless of what else you may see on the Internet. The rest of the httpd.conf was as it was when the install was done (virgin).

Shutdown Linux

Power-up

Logged-in as lbyard

Believe me and what you read about routinely logging in as root to use Linux.  It is easier than most think to wipe-out a working Linux install with one user error.  Login in as root only when it is absolutely necessary.

(Don't forget to go back into the CMOS Setup and change the boot sequence to floppy, hard disk, etc.)

For more "fun" and to "properly" complete the installation see https://rhn.redhat.com/errata/rh9-errata.html.

Larry

< Previous | Contents | Top | Back to the fist page >

Please see our Contact page if you have any comments or corrections that would make this article better. Please use our Forums if you need help with a computer or network problem.

Copyright, Disclaimer, and Trademark Information Copyright © 1996-2006 Larry F. Byard.  All rights reserved. This material or parts thereof may not be copied, published, put on the Internet, rewritten, or redistributed without explicit, written permission from the author.