Installing Apache HTTP Server for Windows Apache 2.2 is designed to run on Windows 2000 or later. Support for Windows 9x is strongly discouraged. ================= Download wind32 binary including OpenSSL ================= 1. Install apache_*.msi 2. Enter "localdomain" for "Network Domain" 3. Enter "localhost" for "Server Name" 4. Select "only for the Current User, on Port 8080, when started Manually" radio button. This is to avoid apache runs as a service. In real life production, however, run it as a service. 5. Select "Typical" for Setup Type 6. Select default folder selected by Apache (normally, C:\Program Files\Apache Group\") 7. click "Install" 8. click "Finish" Testing Apache Installation =========================== 1. Start Apache - "Start -> All Programs -> Apache HTTP Server 2.2-> Control Apache Server -> Start Apache in Console" (Allow access if asked by Windows) 2. Launch a browser (eg. Firefox, IE) 3. Point it to "http://localhost:8080/", you should see Apache page showing it works (or point it to "http://127.0.0.1:8080/") 4. If not, perhaps other web server (PWS or IIS) is running. Stop their service first 5. Note: The Apache welcome page is at (C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs) 6. Try to create a subfolder name "yourname" under this htdocs directory. In web browser, type in "http://localhost:8080/yourname/" (or type in "http://127.0.0.1:8080/yourname/") 7. Other Apache configurations can be done by editing the Apache configuration file (C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf) Need to open a text editor as Administrator to edit this file. (texteditor.exe file, Right Click -> Open as Administrator) -> browse for this file.) 8. Optional: Option to add alias, edit httpd.conf, add the following to somewhere under (shut down apache by closing cmd window; run notepad++ as administrator; open httpd.conf file) ######################################## Alias /my_php c:/temp/my_php Options +Includes Options Indexes FollowSymLinks ##enable directory listing, not a good idea Allow from all ######################################## 9. Optional: make index.php acceptable as index page (edit httpd.conf) DirectoryIndex index.html index.htm index.php Installing PHP ============== PHP 5.3.3 installation for Windows is quite straight forward (PHP 5.2 and later will install and configure PHP and all the built-in and PECL extensions, as well as configure many of the popular web servers such as IIS, Apache, and Xitami.) 1. Shut down apache by closing cmd window 2. Download Windows Binaries x86 thread safe 3. Install and follow instructions, select the correct web server, make sure you choose the actual directory containing "httpd.conf" when asked. 4. Restart Apache 5. If you encounter a error message (Error trying access httpd.conf file...), you need to manually configure apache's httpd.conf file. Follow steps below: (shut down apache by closing cmd window; run notepad++ as administrator; open httpd.conf file) add the following two lines to the bottom of the file: ##################################################################### LoadModule php5_module "C:/Program Files (x86)/PHP/php5apache2_2.dll" AddType application/x-httpd-php .php Testing PHP =========== 1. Create a folder named "sc" in "Apache2\htdocs" (C:\Program Files\Apache Group\Apache2\htdocs) 2. Create a file (using Notepad) and write the following: ============== Copy below =================== ============================================= 3. Save the file as "t.php" 4. Point your browser to "http://localhost:8080/sc/t.php" 5. You should see the PHP info page (version, loaded modules, etc) ============================================ Installing MySQL Database Server for Windows ============================================ 1. right-click on mysql-installer-community-5.*.*.msi, install 2. follow instructions, choose "Developer Default" 3. follow other default settings 4. MySQL Root Password: "rootpass" 5.1 Write down (remember) the Service Name (e.g. MySQL56) 5.2 Uncheck "Star the MySQL Server at System Startup" 6. Start MySQL Workbench after startup Testing MySQL Database ====================== 0. make sure the MySQL service is running - (Task Manager>Services) 1. Use Win Explorer to find the path where MySQL.exe is... copy address as text, then Add path (Windows 7) Start menu >> Computer >>> Right-Click >> Properties >> Advanced System Settings (for Windows 8, control panel >> systems >> Advanced System Settings) >> Environment Variables (Advanced Tab) >> User variables / Temp >> System Variables / Path >> Edit >> append this to the back (check your program files directory for the correct path, no space before/after ; For windows 7, the path can be "C:\Program Files\MySQL\bin" For windows 8, the path can be "C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.46" 2. mysql -u root -p (key in rootpass for password) mysql> exit c:\> mysql -u root -p (key in rootpass for password) mysql> SELECT VERSION(), CURRENT_DATE; mysql> SHOW DATABASES; mysql> USE test; Database changed mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION; mysql> exit c:\> mysql -u monty -p Find out about users in MYSQL ============================== mysql> show databases; mysql> use mysql mysql> show tables; mysql> describe user; mysql> select user, password from user; 4. Or you can use "MySQL Command Line Client" to go to cmd prompt, but you can only login as "root" ============================================ phpMyAdmin installation ============================================ 1. unzip the distribution .zip file (be sure to unzip the subdirectories) in your webserver's document root. (e.g. C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\phpMyAdmin-3.4.10.2-english) 2. rename the directory to phpMyAdmin 3. copy config.sample.inc, rename it to config.inc.php, and edit ------------------------------------------ $cfg['Servers'][$i]['host'] = 'localhost'; ..... -------------------------------------------- 4. start Apache web server 5. Open the file //index.php in your browser. (http://localhost:8080/phpMyAdmin/index.php) 6. you should see a welcome screen