Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Installing Apache Web Server on Linux: A Comprehensive Guide, Slides of Linux skills

A step-by-step guide on how to install the apache web server on a linux operating system. It covers downloading the newest version, unzipping and untarring the files, creating make files, compiling and installing, editing the httpd.conf file, and starting the apache server. It also includes instructions for installing apache from a cd-rom and setting up a website.

Typology: Slides

2013/2014

Uploaded on 01/29/2014

jamil
jamil 🇮🇳

4

(12)

141 documents

1 / 39

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Apache Installation on Linux
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download Installing Apache Web Server on Linux: A Comprehensive Guide and more Slides Linux skills in PDF only on Docsity!

Apache Installation on Linux

Chapter Objectives

 Demonstrate a basic installation and setup of an Apache Web Server on a PC running the Linux OS.

Introduction to Apache

 Apache is a web server package that works under Linux as well as under other operating systems  The name Apache comes from the concept of extensive patching of existing code  The primary advantage of Apache is that it is generally free or available at modest costs

Apache Server Installation

 Download newest version of Apache  May be installed from a CD-ROM as well  Unzip downloaded file  Untar the tar file  Create the MAKE files  Make Install  Edit httpd.conf file  Start Apache Server

Downloading the newest Apache

 First, in Linux, create a folder to hold the Apache file you will download.  The newest version of Apache Server and Documentation can be found at The Apache Software Foundation http://www.apache.org/  To download the newest version of Apache go to http://www.apache.org/dist/ and click on apache_1.3.12.tar.gz.  Download this file into your newly created directory.  NOTE: apache 1.3.12 is the latest version at the time of this writing. You may want to check for newer releases.

Unzipping Downloaded File

 After you have downloaded your Apache file go into the folder you have downloaded it into by typing cd /path to folder/name of folder/.  Next, to unzip the .gz file at the prompt type: gunzip apache_1.3. and press the enter key.  This will unzip the file into the current directory.

Creating the Make Files

 Go into the folder that now contains the untarred apache files. To change into that folder, at the prompt type: cd //apache_1.3.12.  Once you are in the apache_1.3.12 folder you will need to create the apache make files.  To do this, at the prompt type:  ./configure --prefix=/usr/local/apache and press the enter key. This will install apache in the folder /usr/local/apache.  You may chose to install in another directory.

Compiling Make Files

 After running the configure command you will need to compile the make files.  To compile the make file, from inside in the apache_1.3.12 directory, at the prompt, simply type: make and press the enter key.

Editing the httpd.conf File

 In order to get the apache server started you must edit the httpd.conf file. The file is located in whatever directory you installed apache in.  Once in your apache install directory find the folder named conf.  Change into the conf folder and locate the file named httpd.conf.  Open the httpd.conf file with any file editor.  Next locate the line # ServerName and uncomment out this line by deleting the # symbol preceding ServerName.  Save the file and close it.

Starting, Stopping and Restarting Your Apache

Server

 To start your Apache server you must either put the location of the directory, where your Apache server is installed, in you PATH environment variable or you must change into your Apache directory and at the prompt type: apachectl start and press return  If the path to your Apache install directory is already in your PATH environment variable, then you can type: apachectl start to start your apache Server from anywhere within your environment. docsity.com

Testing Your Apache Installation

 After you have installed and started your Apache server you can test to if everything is running OK by doing the following…  Start a browser application.  If you installed Apache as root, type in the address bar of your browser the name of your computer and press enter.  If you installed Apache as a user, type in the address bar the name of the computer followed by a colon and then 8080. For example…. your_computer_name:8080.  8080 is the default port for user and 80 is the default port for root.

Testing Your Installation (cont.)

 If everything has gone as it should have you should see a page with the apache logo at the top explaining why you are seeing this page. This page gives you links to all the apache documentation which you should read.  If you would like to customize this index page it is called index.html.en in the htdocs directory located in the directory your Apache server is installed. (source: http:// www.apache.org/)

Setting Up the Website

 Create the home directory for the website, we will use /usr/www/ganesan  Create 3 subdirectories under the site directory  conf  htdocs  logs

Setting Up the Website (con’t)

 You will find a subdirectory called conf under the directory where you installed Apache  Copy 3 files (srm.conf-didst, access.conf-dist, http.conf-dist) from this directory into /usr/www/ganesan/conf  If you cannot find the 3 files, use the find command to find them