Go to Home Page GuidesHow to ArticlesReviewsForumsFrequently Asked QuestionsNewsLinksPotpourri

Site Search


Red Hat Linux Clean Install - The Whole Enchilada
Last updated: 9/25/02


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


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

Make (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

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 fuzzy 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:

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 this 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).

If security is a concern, the home directories with virtual servers, any directories below it, and the public diirectory (e.g., duxdcw, which in more sophosticated directory structures is often public_html) should be set to at 755 (read and execute bits set for all and owner has write previliges).

If you want another virtual host, simply copy the whole thing you pasted at the end of httpd.conf, including the <VirtualHost ...> </VirtualHost> tags, paste it immediately following it, and edit.


Here's my test page:

< html>
< head>
< title>PHP Test</title>
< /head>
< body>
< ?php echo "This is a PHP script and, by the way, PHP is UP!"; ?>
< /body>
< /html>

Copied and pasted the above into a file named /home/lbyard/duxcw/text.php

Went to a browser window on the Windows Me computer and entered the following in the Address box:

... and got:

This is a PHP script and, by the way, PHP is UP!

(version 4.1.2)

(That was easy. All of them should be that easy.)


System Configuration, msqld, checked it, file, Save Changes, Start.

Opened a terminal window and entered mysql at the prompt.

Set the password for the MySQL root user.

/usr/bin/mysqladmin -u root password 'new-password’
(You won’t be able to create databases with phpMyAdmin, etc. if you don’t do this.)

Downloaded, installed, and tested phpMyAdmin
(Straight forward; followed the download instructions.)

My SQL is up.

Hosts file

Copied /etc/host to /home/shared

The file was made when the network was set-up and looks like this:

# Do not remove the following line, or various programs
# that require network functionality will fail. localhost.localdomain linux local.duxcw.lan duxcw linux.WORKGROUP.lan linux

I edited it ( the one in /etc/shared) to look like this: localhost local.duxcw.lan duxcw linux.WORKGROUP.lan linux

For name to IP resolution--so you can browse to local.duxcw.lan entering duxcw in the browser instead of This file should be copied with the same name (and no extension; e.g., .txt) to C:\windows\ on the Windows 9x/Me computers and C:\ WINNT\system32\drivers\etc\ on Widnows NT, 2000, and XP computers.

Shutdown Linux


Logged-in as lbyard

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

I hope these notes will save some people some grief.


< Previous Page | Back to the First 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.