• No results found

Install Apache on windows 8 Create your own server

N/A
N/A
Protected

Academic year: 2021

Share "Install Apache on windows 8 Create your own server"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

Source: http://www.techscio.com/install-apache-on-windows-8/

Install Apache on windows 8 –

Create your own server

Step 1: Downloading Apache

Go to Apache download page and download the latest stable version of Apache for your operating system.

Windows users can directly download from here.

Step 2: Install Apache

a) Now browse to the folder where you have downloaded the file. It would be something like “http-2.x.xx-win32-x86.msi”.

b) Double click on that to start the installation process. c) Click next and accept the licence agreement.

(2)

admin@localhost or any custom email.

(3)
(4)

g) Finally click on the Install button

e) After the installation is finished you can see a small icon in the windows system tray saying ” Running all apache services”

Step 3: Confirming that Apache is working

To confirm that everything is working fine and all apache services are working, go to your web browser and type http://localhost . You will see a message “It works!”.

(5)

Step 4: Configuring Apache (Optional)

If you want to change the location of you web files (i.e. if you want to change htdocs folder to your custom location) then go to your apache installation directory and inside that you will find a ‘conf’ folder double click on that and then open httpd.conf with notepad.

Now find <Directory "C:/Server/Apache/htdocs"> and replace it with <Directory

"C:/Server/WebDocs">. (If your apache installation folder was something else then your directory path may be something else). And also make sure that you have created a folder named “WebDocs” inside C:/Server folder.

Next find DocumentRoot "C:/Server/Apache/htdocs" and replace it with DocumentRoot "C:/Server/WebDocs"

Thus you have successfully installed Apache on your system.

Install PHP

Step 1: Downloading PHP

Go to http://windows.php.net/download/ and download the latest thread safe version zip file binaries. For example, while writing this tutorial the latest version was 5.4.10. Therefore, I downloaded the corresponding threadsafe version.

Step 2: Install PHP

PHP does not have any installation wizard. So, we need to manually install PHP. The following are the steps to install PHP

(6)

b) Now extract the content of the downloaded zip file to this new folder.

c) Now in the extracted files you’ll see a file named “php.ini-development”. Make a duplicate copy of the file by pressing CTRL+C and CTRL+V.

(7)

It will ask for a confirmation to change the file name extension. Just press “Yes”.

(8)

NOTE: There are two versions of php.ini i.e. php.ini-development and php.ini-production. ‘php.ini-development’ is for development purpose and ‘php.ini-production’ is best suited for Production purpose or live websites.

Step 3: Configuring Apache to work with PHP

In the previous step you have just extracted the php files to your computer. It won’t work on

your web-server unless you configure your Apache server to work with php. To configure Apache to work with php open start menu and search for “edit apache” (alternatively you can browse to your apache installation folder and open “conf” folder, inside which you will find “httpd.conf” file) and open the file with notepad.

Make the following changes in the httpd.conf file:

1. Find “loadmodule” section (using ctrl+f). And add the following line. (If your php installation path was different then make the changes accordingly)

LoadModule php5_module "c:/Server/PHP/php5apache2_2.dll"

(9)

AddType application/x-httpd-php .php

3. Now at the end of the file just add this line. (This is used to tell Apache where PHP is installed) PHPIniDir "C:/Server/PHP"

4. (Optional) If you want “index.php” to work as index file instead of “index.html” then just change DirectoryIndex index.html to DirectoryIndex index.html index.php

Step 4: Enabling PHP extensions

Open php.ini file from the PHP installation folder (C:ServerPHP).

To enable php extensions just add the following line below ; extension_dir = "ext" extension_dir = C:ServerPHPext

Step 5: Testing

Make a new text file in your server root directory ( If you are following my tutorial then the root directory is “C:ServerWebDocs” or if you haven’t change your root directory then it is

“C:%apacheInstallationPath%htdocs”. If you want to change your DocumentRoot folder then follow this guide)

Now inside the text file copy this code <?php phpInfo(); ?>

and save the file as index.php (Remember to keep the filetype as “all files”).

(10)

Thus you have successfully installed PHP on your system. Now that you have php working and if you want to develop websites using php and databases, sooner or later you will require to install MySQL.

Install MySQL

Step 1: Downloading MySQL

Before starting with download first make sure which version of windows are you using (64 bit or 32 bit). To know about your system details just open Run (windows key + R) and type “dxdiag.exe” (without quotes) and press enter. There you will get complete information about your system. Now go to http://www.mysql.com/downloads/mysql/ and select Microsoft Windows from the

(11)

Step 2: Install MySQL

a) Now go to your downloads folder (where you have download the mysql file) and double click on the file to run it.

b) On the next screen accept the licence agreement.

c) Choose Custom installation on next screen ( if you want you can choose typical, that will install mySQL in program files)

d) For custom installation, Change the MySQL installation path to C:ServerMySQL

e) Now click on Install button to begin the MySQL installation process.

(12)

Step 3: Configuring MySQL Instance

a) First it will ask for detailed or standard configuration. Select Detailed Configuration. b) On the next screen, select developer Machine

c) Next select Multifunctional Database d) On next screen, keep the default values. e) Next select decision support

(13)

g) Next select Standard Character set

(14)

i) Now enter the password for MySQL twice and remember it (better note it down somewhere) j) Finally click next and Execute and it will begin its execution. The process will take some time. During the process, the wizard may not respond for a while. It is normal.

Step 4: Configuring PHP to work with MySQL

Open php.ini file from the PHP installation folder (where you have installed or extracted php files, for example, “C:ServerPHP”).

Find the Dynamic Extensions in that and scroll down. Remove semicolon before these two lines extension=php_mysql.dll

extension=php_mysqli.dll

Save your php.ini file and restart your apache server.

Step 5: Testing

To test if MySQL is working properly or not, go to your programs and open MySQL command line client. It will ask you for the password. Enter the password that you have set in the installation wizard. Next type this command to show all databases.

(15)

Don’t forget to put semicolon in the end of the statement.

References

Related documents

Using the dialog box, browse to the location where you downloaded the software installer file (C:\F5 Downloads is the recommended folder). Select the software installer file and

installation. You have to start installation process under administrator account. a) Double-click on the installation setup file to begin the installation process. b) Select

To install Windows Virtual PC later, click Save and download the installation file to your computer.. When you're ready to install Windows Virtual PC, double-click

Click on „Browse“ and navigate to the Folder where your logs are saved (in our example it is D:\proxylogs) and click „OK“ + „Apply“.. Now you have to open port 80 in the

Double-click on the downloaded “winftp.exe” file to begin the file transfer software installation.. At the Welcome screen, click “Next”

Double click “audacity” to install software, click or select “Next”, ”I accept the agreement” and/or “ finish” to finish the software Installation.. Maybe

You can browse you computer with the folder tree in the main screen, click the folder which have your photos, then double click the photo thumbnail in the photo file list to add the

Click on the Windows start button and choose Computer, then click on icon for the c: drive, usually labeled Local Disk (C:), then double click on the yellow folder named “Users”.