Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been...
-
date post
21-Dec-2015 -
Category
Documents
-
view
223 -
download
0
Transcript of Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been...
![Page 1: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/1.jpg)
Chapter
Apache Installation in Linux-Mandrake
![Page 2: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/2.jpg)
Acknowledgment
• The following information has been obtained directly from www.mandrake.com
• All credit it due to the above
![Page 3: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/3.jpg)
Linux
Unix Windows
Linux:Where Unix
meets Windows
GUI based approach to Apache installation.
![Page 4: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/4.jpg)
Apache Configuration Using KDE
• In this section, Apache will be configured using the available tools and utilities of the KDE desktop. This is not necessarily a recommended way to run a web server, but it does offer a convenient environment to begin learning the first steps of running a web server in the safety of an internal LAN.
![Page 5: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/5.jpg)
Checking for Already Installed Apache
![Page 6: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/6.jpg)
Using ktail to Monitor Installation
• Alt-F2 will open a mini-command line in KDE, and kdesu -c ktail will launch ktail as the root user. Ktail will be used throughout the following pages to monitor Apache's log files during configuration
![Page 7: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/7.jpg)
Launching ktail to Monitor the Installation
Alt F2 opens a mini command line
![Page 8: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/8.jpg)
Providing root Password
![Page 9: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/9.jpg)
Accessing the Service Activity
![Page 10: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/10.jpg)
Activating the httpd Service
![Page 11: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/11.jpg)
Starting Stopping and Restarting Apache
![Page 12: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/12.jpg)
Monitoring Start, Stop
and Restart
![Page 13: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/13.jpg)
Accessing the Web
![Page 14: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/14.jpg)
Accessing the Web Server Using Localhost
![Page 15: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/15.jpg)
Gain Access as Super
User to root
![Page 16: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/16.jpg)
Root Folder(File)
![Page 17: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/17.jpg)
Location of Apache Files
![Page 18: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/18.jpg)
Bookmark the Location
![Page 19: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/19.jpg)
Location of Web Files
![Page 20: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/20.jpg)
Renamed Index.html
![Page 21: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/21.jpg)
Loading Your Own Web
• A web can now be stored in this folder to become the website on the Apache server
• Index.html will be the first file that would be accessed first
![Page 22: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/22.jpg)
KDE File Manager as a Limited Web Browser
![Page 23: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/23.jpg)
Accessing the Website from Other MachinesUse IP Address
![Page 24: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/24.jpg)
Location of Logs
![Page 25: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/25.jpg)
Drag and Drop Logs into ktail for Viewing
![Page 26: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/26.jpg)
Other Details in Error Log
![Page 27: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/27.jpg)
Event Details
• Date and time of event
• What type of event
• The event itself
![Page 28: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/28.jpg)
Other Details in Access Log
![Page 29: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/29.jpg)
Other Details on Access Log
• The machine's name or IP address that accessed the server
• Date and time of access• The file that was transferred • An access code and the number of bytes transferred • The server's name or IP address that was requested • The web browser that was used • And some info about the visitor's system
![Page 30: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/30.jpg)
Location of conf Files
A copy has been made of the conf files folder
![Page 31: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/31.jpg)
Making a Copy of the Conf Files
• /etc/httpd/conf is where Apache's configuration files are located. You may want to first make a backup copy of the original configuration directory before making edits to the enclosed files. Ctrl-t opens a konsole in the current directory, and cp -r conf confOrigBackup recursively copies the folder & contents with a new name.
![Page 32: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/32.jpg)
Locating Apache’s Main httpd.conf
File
![Page 33: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/33.jpg)
Editing httpd.conf
Using Kedit
![Page 34: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/34.jpg)
Disabling Some Kedit Options Before Saving Changes to
httpd.conf
![Page 35: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/35.jpg)
Section1: Modules
![Page 36: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/36.jpg)
A Note on Modules
• This first section of Apache's configuration file deals with modules. Modules add extra capabilities to Apache that aren't normally included in its basic set of features. If you install Mandrake's RPM modules for Apache you most likely won't ever need to manually enter any module information yourself, as the required entries will automatically be added with the packages.
• continued
![Page 37: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/37.jpg)
php3 Module: An Example
• mod_php3 is a module that enables this popular scripting language to be used with Apache. If mod_php3 is installed on your system, you can test it by creating a simple test page as seen on the next page
![Page 38: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/38.jpg)
Creating index.php3 for
Testing of php3 Support
![Page 39: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/39.jpg)
Testing for php3 Support
![Page 40: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/40.jpg)
Success in Testing for php3
• You can test Apache by loading the page into Netscape. If php3 wasn't enabled properly, a screen of raw text would appear instead of a normal looking web page as seen here.
![Page 41: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/41.jpg)
A Note on Testing for php3
• This is just a quick way to demonstrate if php3 is enabled on a server. php3 is a full-featured, HTML-embedded scripting language used for creating dynamically generated web pages. One common use of php3 is as a replacement for CGI scripts. Unfortunately this topic can't be covered in detail on these pages. For more info on php3, phpbuilder is a good starting point.
![Page 42: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/42.jpg)
Location of Web
Documents (Root)
![Page 43: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/43.jpg)
Document Root
• The document root is where the web pages of the active website are kept– Similar to the home directory of the
www server in Windows
![Page 44: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/44.jpg)
Display of Directory
Listing
![Page 45: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/45.jpg)
Absence of index File
• A directory listing is displayed as shown in the previous slide in the absence of an index file
![Page 46: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/46.jpg)
Activating Configuration Changes
• After every configuration change Apache must be restarted
• It is usually a good practice to make one change at a time and then check ktail to ensure that the change had been made without any errors before proceeding to make the next change
![Page 47: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/47.jpg)
Starting, Stopping and Restarting Apache
• Commands– apachetl start, apachetl stop,
apachetl restart
• GUI– Apache may also be started, stopped
and restarted through the control services GUI• Access the httpd service for this purpose
![Page 48: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/48.jpg)
Redirecting 404 and
Other Error Messages
![Page 49: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/49.jpg)
Viewing of Serve
Status
Other IP addresses may be specified for
viewing of server status from other machines.
![Page 50: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/50.jpg)
Display of Server
Status
From a different machine.
![Page 51: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/51.jpg)
Server Type and
Port Numbers
![Page 52: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/52.jpg)
Note on Server Type and Port Numbers
• Standalone is recommended for server type
• Information on port numbers can be found in /etc/services
• Users do not have to enter a port number on the address if default port numbers are maintained– Example is Port 80 used for www
service
![Page 53: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/53.jpg)
Phantom User Nobody
• Apache runs as a phantom user known as nobody with very limited access
• Anyone exploiting this name to gain access to Apache will severely be restricted from causing any damage
![Page 54: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/54.jpg)
Phantom User
![Page 55: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/55.jpg)
Location of Apache
Configuration
![Page 56: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/56.jpg)
Server Name
![Page 57: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/57.jpg)
A Note on Server Name
• Server name is the one seen by the browsers in the filed “location name”
• For hosting a name accessible over the Internet, the name must have been registered and it must have a DNS entry on a DNS sever
• Server name need not relate to the machine’s host name
![Page 58: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/58.jpg)
Access to Local Host
Name
![Page 59: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/59.jpg)
Adding a Host Name
![Page 60: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/60.jpg)
The New
Name
![Page 61: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/61.jpg)
A Note on Changing Name
• In general, changing host names should be avoided
• Certain services are configured based on the host name and they may not function properly after changing the name of the host
![Page 62: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/62.jpg)
Permissions on
Folders
![Page 63: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/63.jpg)
Access Given
to Folders
Permission given to others.
![Page 64: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/64.jpg)
Right Clicking on Folders to
Give Permission
![Page 65: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/65.jpg)
Changing Permissions
• Show entries and change into commands will give public to enter the folder and view its contents
![Page 66: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/66.jpg)
Summary
• Windows users may still use some of the techniques learned to configure and operate Linux operations
• However, some command line programming is still inevitable
• In the long run, more GUI based operations is likely to be introduced in Linux
![Page 67: Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from .](https://reader030.fdocuments.net/reader030/viewer/2022032801/56649d555503460f94a32704/html5/thumbnails/67.jpg)
Giving Permission
using the chmod
Command