guide

14

Upload: ramasubbu-p

Post on 19-May-2015

984 views

Category:

Education


1 download

DESCRIPTION

Presentation

TRANSCRIPT

Page 1: Guide
Page 2: Guide

ObjectivesInstall and configure a Web serverInstall and configure PHPInstall and configure MySQL

2

Page 3: Guide

Understanding Binary and Source Code Installations• Binary format (or binaries) refer to

compiled files, such as executable installation programs

• Source code is the original programming code in which an application was written

• Source code must be compiled, or processed, and assembled into an executable format before it is used

• Compiled programs only need to be recompiled when their code changes

3

Page 4: Guide

Installing and Configuring a Web ServerApache is the most popular Web server

software used on the InternetMicrosoft IIS for Windows is the second most

popular server software. In Windows, a service refers to a program

that performs a specific function to support other programs

4

Page 5: Guide

Installing and Running Apache on Windows1. Go to

http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32/

2. Select a mirror download site. One will be suggested at the top.

3. Download the apache_2.2.9-win32-x86-no_ssl.msi installation file

4. Navigate to the installation file and from the Welcome screen, click Next

5. Accept the terms of the License Agreement, click Next

6. Read the contents of the Read This First screen, click Next

5

Page 6: Guide

Installing and Running Apache on Windows (continued)

6. Accept the default values, click Next7. Select a Typical installation, click Next8. Accept the default Destination Folder

directory, click Next9. Click Back to make changes or click Install

to finish10. Click Finish

6

Page 7: Guide

Testing Your Web Server1. Open your Web browser2. Type http://localhost/ in the Address box,

click Enter

Figure 2-2 Apache’s default Web page

7

Page 8: Guide

Configuring ApacheTo configure ports and other settings you

must edit the httpd.conf fileFor Windows

C:\Program Files\Apache Group\Apache2\confLines that begin with the pound sign (#) are

informational commentsLines without pound signs contain directives

8

Page 9: Guide

Configuring Apache (continued)

Figure 2-4 httpd.conf

9

Page 10: Guide

Configuring Apache (continued)• Directives define information about how a

program should be configured• The DocumentRoot directive identifies the

default directory from where Apache serves Web pages. Set this to the complete address of the folder you wish to serve pages from.

• There is also a <Directory …> setting that must be set to the same directory as your DocumentRoot directive.

• The Alias directive identifies other directories that Apache can use to serve Web pages

10

Page 11: Guide

Installing PHP Windows Running Apache1. Go to

http://us.php.net/get/php-5.2.5-Win32.zip/from/a/mirror

2. Select a mirror to download from. Save the file to your computer.

3. Once downloaded, navigate to the installation file and from the Welcome screen, click Next

4. In the License Agreement screen, click I Agree5. In the Installation Type screen, select

Standard, then click Next6. Accept the default destination location, click

Next 11

Page 12: Guide

Installing PHP Windows Running Apache (continued)

6. In the Mail Configuration screen, accept the default values of localhost, click Next

7. In the Server Type screen, select the type of Web server that you want to use with PHP, click Next

8. In the Start Installation screen, click Next to begin installation

9. Click OK to close the dialog box of the Web server you selected

12

Page 13: Guide

Configuring Apache for PHP on Windows1. Click the Start menu and point to All

Programs2. Select the Edit the Apache httpd.config

Configuration File command3. Add the following to the end of the file:

ScriptAlias /PHP/ “C:/PHP/”AddType application/x-httpd-php .phpAction application/x-httpd-php “/PHP/php-cgi.exe”

4. Save and close the httpd.conf file5. Restart Apache

13

Page 14: Guide

Configuring PHP

Figure 2-6 The php.ini configuration file

14