Introduction
This procedure walks you through a step-by-step, default installation of Apache HTTP Server 2.2.17 onto Red Hat Enterprise Linux Server 5.4 running within VMware Player 3.1.3. Installation involves two main steps: 1) build and install Apache HTTP Server and then 2) verification and testing. You'll take the binary installation approach. All references used in helping write this procedure are provided in the References section, at the bottom.
Procedure
Step 1: Build and Install
Download the Apache HTTP Server 2.2 source code, which for this walkthrough is http-2.2.17.tar.gz. By default this downloads to the Linux desktop.
To unpack the downloaded file, you have two options: use copy and paste methods or run commands. We'll do both. Let's do the command line method first.
Open a terminal, and then navigate to the directory containing the downloaded binary. Copy binary to a standard location and then extract it. To do this, run each of the following commands:
Now for the GUI method. Double-click on the downloaded binary, http-2.2.17.tar.gz. A file browser will open listing the contents, which will be the httpd-2.2.17 folder. Copy and paste this folder to /usr/local/src/, which is a good general location for storing them. You should see something similar to that shown below. Note that the command line exercise, above, you also made a copy of the compressed binary and placed it in the same location.
Now for installation. A pretty good location to install applications to is the /usr/local directory. You can use any directory, but it's helpful to be consistent. I use this directory. Now let's build and install. Run each of the following commands:
After configuration is completed, you need to compile the build. Run the following command from within the httpd-2.2.17 directory:
Once the build is compiled, you are ready to install. Run the following command from within the httpd-2.2.17 directory:
This completes build and installation. The next step involves verification and testing of your Apache HTTP Server version 2.2.17.
Step 2: Verification and Testing
Open a file browser, and then navigate to /usr/local/. You should see something like the following:
Let's check Apache configuration using the Apache configuration testing tool. From the terminal prompt, enter the following command:
The Syntax OK message indicates that it's OK startup Apache. At the terminal prompt, run the following command:
Now to verify that the Apache HTTP Server is indeed running. First, get the IP address of your instance. Run the following command:
For this step-by-step walkthrough, the IP address is: 192.168.52.128. Open a browser, and then enter: http://ip-address/. You should see something like the following in your browser:
Congratulations! You've installed and launched Apache HTTP Server 2.2.17 on your Linux server.
References
This procedure walks you through a step-by-step, default installation of Apache HTTP Server 2.2.17 onto Red Hat Enterprise Linux Server 5.4 running within VMware Player 3.1.3. Installation involves two main steps: 1) build and install Apache HTTP Server and then 2) verification and testing. You'll take the binary installation approach. All references used in helping write this procedure are provided in the References section, at the bottom.
Procedure
Step 1: Build and Install
Download the Apache HTTP Server 2.2 source code, which for this walkthrough is http-2.2.17.tar.gz. By default this downloads to the Linux desktop.
To unpack the downloaded file, you have two options: use copy and paste methods or run commands. We'll do both. Let's do the command line method first.
Open a terminal, and then navigate to the directory containing the downloaded binary. Copy binary to a standard location and then extract it. To do this, run each of the following commands:
# cp -p httpd-2.2.17.tar.gz /usr/local/src/After a few moments, you should see something like that shown below:
# cd /usr/local/src
# tar xvzf httpd-2.2.17.tar.gz
Now for the GUI method. Double-click on the downloaded binary, http-2.2.17.tar.gz. A file browser will open listing the contents, which will be the httpd-2.2.17 folder. Copy and paste this folder to /usr/local/src/, which is a good general location for storing them. You should see something similar to that shown below. Note that the command line exercise, above, you also made a copy of the compressed binary and placed it in the same location.
Now for installation. A pretty good location to install applications to is the /usr/local directory. You can use any directory, but it's helpful to be consistent. I use this directory. Now let's build and install. Run each of the following commands:
# cd /usr/local/src/httpd-2.2.17Configuration will take approximately one minute.
# ./configure --prefix=/usr/local/apache --enable-so
After configuration is completed, you need to compile the build. Run the following command from within the httpd-2.2.17 directory:
# makeBuilding the installation will take approximately three minutes.
Once the build is compiled, you are ready to install. Run the following command from within the httpd-2.2.17 directory:
# make installInstalling the application will take approximately three minutes. On completion of the installation, you should see something like that shown in the figure below:
This completes build and installation. The next step involves verification and testing of your Apache HTTP Server version 2.2.17.
Step 2: Verification and Testing
Open a file browser, and then navigate to /usr/local/. You should see something like the following:
Let's check Apache configuration using the Apache configuration testing tool. From the terminal prompt, enter the following command:
# /usr/local/apache/bin/apachectl configtestThis error-checking tool scans the configuration for common errors. If everything's OK, you should see something like that shown below:
The Syntax OK message indicates that it's OK startup Apache. At the terminal prompt, run the following command:
# /usr/local/apache/bin/apachectl startNothing is returned after running this command.
Now to verify that the Apache HTTP Server is indeed running. First, get the IP address of your instance. Run the following command:
# /sbin/ifonfigYour IP address is displayed after inet addr.
For this step-by-step walkthrough, the IP address is: 192.168.52.128. Open a browser, and then enter: http://ip-address/. You should see something like the following in your browser:
Congratulations! You've installed and launched Apache HTTP Server 2.2.17 on your Linux server.
References
- Apache HTTP Server
- Apache HTTP Server Version 2.2 Documentation
- Apache Module mod_status
- apachectl - Apache HTTP Server Control Interface
- Apache 2.0.47 / Tomcat 4.1.27 / mod_jk for Red Hat 9.0
- Get IT Done: Installing Apache Web Server on Linux
- Linux / Unix tar command
- Troubleshoot Apache problems with these tips
- Bash Shell Command to Find or Get IP address
- Apache HTTP Server runs as a standalone daemon process.
- In order view its status, you can't use the Linux service command but must first enable status information, and then use the apachectl interface.
No comments:
Post a Comment