[Home] [Credit Search] [Category Browser] [Staff Roll Call] | The LINUX.COM Article Archive |
Originally Published: Friday, 13 April 2001 | Author: Dallas Engelken |
Published to: develop_articles_tutorials/Development Tutorials | Page: 1/1 - [Printable] |
Installing Apache 1.3.19 with mySQL + PHP4 + FrontPage 2000
Follow Dallas Engelken as he takes you step-by-step through the installation process of everybody's favorite Web server configuration.
|
Page 1 of 1 | |
I. Introduction:This article will take you through, step by step, an Apache 1.3.19 install with support for mySQL, PHP4, FrontPage 2000, and virtual hosting with all these features. It has been tested on stock Redhat 7.0, and Mandrake 7.2, so it should work on any flavor of Linux you want. Would also work on any other form of *NIX but you will have to download different packages for the install. II. Requirements:1. An Intel base Linux install with TCP/IP support and libc6. If apache or mySQL has already been installed out of the box, then I would recommended removing them either with a package manager or by hand. 2. The packages required to do the install, this includes : Apache 1.3.19, MySQL Server, PHP4, and FrontPage 2000 Extensions. The patch binary to patch apache with FrontPage support. A recent gcc compiler and libs associated with it.
III. Preparing For InstallA. Downloading Packages
Download the following packages to B. Un-packing the source
Extract all packages in /download execpt for frontpage which
will need to extract to
IV. Installing mySQLInstalling mySQL is the first step in our journey. This has to be done Before anything else, because you are installing PHP with mySQL support, and then Installing Apache with PHP support. You can see the chain of events to come. A. Setting up users and Groups
First, lets add user mysql and group
B. Configuring and Making mySQL
Now lets change to the
mySQL has now been installed into
Before we start the daemon, changes to the ownership of the files is a must, or else the daemon will fail to run.
C. Starting the mySQL Daemon
Okay, now we are ready to start the daemon. Safe_mysqld is the equivilent
of a
D. Setting root password and starting mySQL on boot.
Now mysql is up and running, might want to set a root password on
One last step is needed to insure that mySQL will start up on reboot. Edit
your
V. Patching Apache
Before proceeding, we must apply the FrontPage patch to Apache. Copy the
FrontPage patch over to the Apache source directory and make a symlink to
A. Applying FrontPage Patch Now apply the FrontPage patch to the apache source directory. This will require the patch binary to be in place in your path. Download the patch rpm and install it if needed.
This will create mod_frontpage.c in the apache source root. It needs to be copied over to extras modules.
B. Running a simple apache configure Now run a simple configure, we will run a more advanced one in a bit.
VI. Installing PHP4PHP is a server-side, cross-platform, HTML embedded scripting language. It gives us the ability to develop dynamic sites that interface easily with the mySQL server that we installed above. A. Configuring PHP4 with mySQL and Apache Support
You will be installing PHP4 with mySQL in
B. Configuring PHP4 with mySQL and Apache Support
Now make and make install and it will compile the files necessary
for the Apache
Apache Server is what everything in this whitepaper revolves
around. This is the most important part, so follow closely . Now that PHP
has been made, you will find a new directory in your Apache source,
A. Creating Symlinks and Directory Structure
I also like to set up a symbolic link from
B. Configuring Apache with FrontPage and PHP4 Support
Now we can configure apache with the
C. Making Apache
Running make will create the httpd binary. If you are overwriting
and old server, then make is all you need to do, and then copy the
Great, you have installed Apache 1.3.19 with FrontPage, PHP, and mySQL
support. Now lets wrap some other things up so this all works together.
First some
A. Adding PHP tags
In order for Apache to handle PHP extensions, it must have the type added
to it. Make sure you have the following 2 lines uncommented in your
configuration file. If those two lines do not exist in your stock
B. Changing Directory Index
I also change the
B. Changing Directory Permissions
A couple other important changes that need to be made to the configuration
file are in the
Now change direcoty permissions on this so that FrontPage can override
them with their
If you are doing virtual webs, follow the same format in adding them. I'll
go into this further as I get into it further.
We have now successfully installed Apache with PHP and mySQL support. All
that's left is FrontPage extensions, which you may or may not want on your
site. It is nice to have when you have multiple people needing to edit a
site and not everyone is familiar with FTP and HTML.
A. Running fpsrvadm.exe
Lets apply the FrontPage extensions to our root web.
(
And run
Note: I use user: "apache", group: "web" myself for the owner of
Document Root. For virtual domains, I have separate users for each virtual
domain, but the group is always "web".
B. Creating other FrontPage Users
Now simply provide an account for the administrator to FrontPage and a
password for that account. This will be the login and password you use to
access via FrontPage. I is probably better if you keep these in-sync with
the ftp login. You can always come back and run
And then just copy the user and encrypted password to service.pwd file and that user can log in. You will also have to group that user so modifications to the site can be made. This is done by editing
Add your new user to whatever group you see fit to modify the site. Now
try the login and password through FrontPage and the user should have
editing rights after the addition to the "
X. Creating Virtual Webs with FrontPage Support
Adding FrontPage support to virtual webs is the same process covered in
adding them to the Root Web. The only difference is you provide a
Lets walk through this and give a couple options. First, edit your httpd.conf and uncomment the NameVirtualHost line. If you only have 1 IP address on this box, then the first virtual host in the list will be your root web. If you have 2 IP addresses for the box, then your root web might be on 192.168.0.1 and your virtual webs could be on 192.168.0.2. This would keep your root web intact.
Make sure that if you have multiple IP addresses, you tell Apache what IPs
to listen on, or use Listen * to make Apache listen on all interfaces that
are listed in an "
Now that you know that information, lets add a virtual web.
First, a few points on this virtual domain definition.
I just use In the instance that someone goes to the IP # of your box, they will be served the first virtual web, instead of the root web. That's why it is nice sometime to have 2 IP addresses on the box, and assign the root web its own independent IP address. Or if you have a whole class C, or a subnet, then you can assign each virtual web its own IP address, which is even nicer.
The
Okay, now that you have a virtual host added to your
Note : For virtual webs, create a user on the box for each virtual web. My user and group in this situation would be.
user and group must be valid in
You can change to that directory and verify you have the
Now try to connect to your new virtual web through FrontPage.
It should ask you for the login and password that you specified in the
XII: Testing FilesThe only other step is to test your PHP, CGI, and SSI. You can use the following files or create your own. Upload the files to your webserver via FTP and then point your browser to them to test.
A. PHP Test File
B. CGI Test File
B. SSI Test Files
XIII. ConclusionIf you have made it this far, you have successfully installed everything. You have also tested the server to make sure what we have done is functional. The only thing I have really left out of this article is mySQL testing. Database integration using PHP will be written on once I have done my own experimentation. Good Day and Good Luck,
Disclaimer : The author of this article takes no responsibility for you the reader, and provides this for informational purposes only. All testing should be done on a non-production server before implementation. Dallas Engelken is an Internet Business Consultant for Network Management Group, Inc. in Hutchinson, Kansas. He can be contacted via email at dallase@nmgi.com or by phone at (620)664-6000.
| |
Page 1 of 1 |