Skip to content Skip to navigation

OpenStax-CNX

You are here: Home » Content » Apache httpd Web Server - installation from source code

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

In these lenses

  • Grand Rapids Community College

    This module is included inLens: GRCC CIS Lens
    By: Szymon Machajewski

    Click the "Grand Rapids Community College" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.
 

Apache httpd Web Server - installation from source code

Module by: Szymon Machajewski. E-mail the author

Summary: This module provides a step by step guide on compiling Apache web server on a Linux host. A freely available Knoppix Linux can be used as a live CD to serve as the Linux environment. On any Windows computer with a CD ROM the students can download the .iso file for Knoppix and burn it on an optical media. Alternatively, VMware Player can be used to run the .iso live CD.

Start the lab by booting your Knoppix system. You can simply put it in a CDROM and restart the computer or you can use a VMware virtual machine. Once you see the Knoppix desktop simply click on the Console icon at the bottom of the screen. You can stay logged in as the knoppix user. Open the Terminal window for the lab and type in commands into the Terminal.

Exercise 1: Step 1

1. Download Apache sources. You can download the source code directly from the Apache Foundation (http://httpd.apache.org/), or you can use the local GRCC repository. In the classroom the local download will be much faster.

Solution

wget http://raider.grcc.edu/~smachaje/co246/httpd-2.0.59.tar.gz

Exercise 2: Step 2

2. Decompress and extract the source files.

Solution

tar -xzvf httpd-2.0.59.tar.gz

Exercise 3: Step 3

3. Change directory to the source directory.

Solution

cd httpd-2.0.59

Exercise 4: Step 4

4. Clean source tree. If you are compiling for the first time you can skip this step. Executing this step will not change any configuration.

Solution

make clean

Exercise 5: Step 5

5. Configure the sources.

Solution

./configure --prefix=/home/knoppix/apache --with-port=8080

Exercise 6: Step 6

6. Compile source code

Solution

make

Exercise 7: Step 7

7. Install source code

Solution

make install

Exercise 8: Step 8

8. Start Apache server

Solution

cd /home/knoppix/apache

bin/apachectl start

Exercise 9: Step 9

9. Test to check if Apache is running

Solution

Open the browser and navigate to http://localhost:8080/

Exercise 10: Step 10

10. Test with terminal commands

Solution

netstat -ln |grep 8080

ps -ef |grep httpd

Exercise 11: Step 11

11. To start the entire process over run the following command to delete your apache system. ATTENTION! The rm -rf command will uninstall or delete the Apache Web Server.

Solution

killall httpd

rm -rf /home/knoppix/apache

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks