tonywhitmore.co.uk  

      blog : gallery : wiki : articles : projects : shell scripts : wallpaper : cv : links :
 Project Homepage

Apache
Apache Logo

Preparation

  1. Download the Apache source code from httpd.apache.org.
  2. Burn the file httpd-2.0.40.tar.gz and your webpages to a CD. This page assumes that the subdirectory /apps is used for the .tar.gz file and that the subdirectory /html is used for the webpages. The CD-ROM can be a multi-session disk.

Give me more details on this

Booting

  1. Boot your Core Linux PC.
  2. Login as root. You will need to enter the password at the prompt.

Give me more details on this

Extract the source

  1. Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under /mnt/cdrom.
  2. Change to the /apps directory on the CD-R.
  3. Copy the httpd-2.0.40.tar.gz file to the directory /usr/src.
  4. Change to the /usr/src directory and extract the source from the .tar.gz file.

Give me more details on this

Configure and compile

  1. Change to the /usr/src/httpd-2.0.40 directory.
  2. Run the ./configure script.
  3. Run the make program.
  4. Run the make program with the argument install.

Give me more details on this

Initial Testing

  1. Add the user nobody.
  2. Start the Apache webserver using /usr/local/apache2/bin/apachectl start.
  3. Using your other computer, see if you can access the web server.
  4. If the test page loaded successfully then you have correctly compiled and installed the Apache webserver. You may want to spend some time browsing the site to learn about more advanced configuration of the Apache webserver.

Give me more details on this

Setting up Apache

  1. Change to the /usr/local/apache2/conf directory.
  2. Backup httpd.conf to httpd.conf.bak
  3. Edit the httpd.conf file.
  4. Configure the Server Name. If you are planning to access your webserver using only its IP address then you do not need to complete this stage. Also, you will not be able to access your webserver using the specified address just be including in the configuration file. As there will be no DNS servers referencing it, no potential clients will be able to convert find the IP address for your machine from the given Server Name.
  5. Configure the Server Admin e-mail address.
  6. Configure the user and group as which Apache will run.
  7. Configure the Document Root. This is the directory from which your webpages will be served. The default location is the location of the "Test Page for Apache Installation" files.
  8. Save the file and exit the text editor.

Give me more details on this

Creating the Document Root

  1. Change to the /home directory.
  2. Create the directory httpd/html.
  3. Add the user and group httpd.
  4. Change the ownership of the /home/httpd directory to the user httpd and the group httpd.
  5. Change the access permissions of the /home/httpd directory to 0755.

Give me more details on this

Copying the webpages

  1. Copy the webpages from the CD-R to the Document Root directory.
  2. Change to the /home/httpd/html directory.
  3. Change the ownership of the files in the /home/httpd/html directory to the user httpd and the group httpd.
  4. Change the access permissions of the files in the /home/httpd/html directory to 0755.

Give me more details on this

Checking and restarting Apache

  1. Check the syntax of your edited httpd.conf file using /usr/local/apache2/bin/apachectl configtest.
  2. Restart Apache using the command /usr/local/apache2/bin/apachectl restart.

Give me more details on this

Stopping Apache

  1. Stop the Apache webserver using /usr/local/apache2/bin/apachectl stop.

Give me more details on this

Automating Apache

  1. Append the following line to the /etc/rc.d/rc.mu script:
    /usr/local/apache2/bin/apachectl start
    You can also add comments and echoes for your own information.
  2. Insert the following line at the second line of the /etc/rc.d/rc.rb script:
    /usr/local/apache2/bin/apachectl stop
    You can also add comments and echoes for your own information.
  3. Insert the following line at the second line of the /etc/rc.d/rc.ha script:
    /usr/local/apache2/bin/apachectl stop
    You can also add comments and echoes for your own information.
  4. Reboot the system and check that Apache is running.

Give me more details on this

Creative Commons License
The text of this page is licensed under a Creative Commons License.


Valid CSS!     Valid HTML 4.0!     Valid RSS
Original design © For oswd.org by SquireCD