1. Apache installation steps are as follows:
1. Prepare the Apache installation file.
The download URL is http://mirrors.hust.edu.cn/apache/httpd/binaries/win32/, and the file name is httpd-2.2.25-win32-x86-no_ssl.msi. Here, 2.2.25 represents the Apache server version number; win32-x86 indicates that this installation file is specifically for the Windows operating system; no_ssl means this installation file does not support the Secure Sockets Layer (SSL) protocol.
2. Double-click the installation file “httpd-2.2.25-win32-x86-no_ssl.msi” to start the installation, as shown in Figure apache-1.

3. Click the “Next” button in the welcome screen to proceed to the next step, as shown in Figure apache-2.

4. Select the “I accept the terms in the license agreement” radio button, then click the “Next” button to proceed to the next step, as shown in Figure apache-3.

5. The main content of the Apache readme includes information such as the origin of Apache, its development history, and the changelog. Click the “Next” button to proceed to the next step, as shown in Figure apache-4.

6. Fill in the network domain name, website, and administrator email address for the Apache server, then select the “for All Users, on Port 80, as a Service — Recommended.” radio button, which means setting Apache server to run as a service on port 80 for all users. After setting all options, click the “Next” button to proceed to the next step, as shown in Figure apache-5.

7. Select the “Typical” radio button for a classic installation, which is suitable for most users; select the “Custom” radio button for a custom installation, which is suitable for users familiar with the Apache server. Click “Next” to proceed to the next step, as shown in Figure apache-6.

8. The default installation path for the Apache server is shown in Figure apache-6. If you want to change it to another path, you can click the “Change” button to set a new path. Here we use the default installation path. Click the “Next” button to proceed to the next step, as shown in Figure apache-7.

9. After confirming all installation steps, click the “Install” button to start the installation. The next step is shown in Figure apache-8.

10. After the installation is complete, open your browser, enter “http://localhost:80” or “http://127.0.0.1:80”, and then press the “Enter” key. If the browser outputs “It Works!”, as shown in Figure apache-9, it means the Apache server has been successfully installed.

2. Install PHP 5.3.5
1. Prepare the PHP 5.3.5 installation file. The download URL is http://windows.php.net/downloads/releases/archives/, and the file name is php-5.3.5-Win32-VC6-x86.zip.
2. Extract the PHP binary archive to the directory “C:\php-5.3.5”, and find the file “php.ini-production” under “C:\php-5.3.5”. Rename this file to “php.ini”.
3. Configure PHP by modifying the configuration information in php.ini. The content that needs to be configured includes the following parts.
(1) Find
; extension_dir = “ext”
Modify it to:
extension_dir = “C:/php-5.3.5/ext”
(2) Modify the configuration information so that PHP can directly call other modules. Find lines similar to
;extension=
The method to load a module is to remove the semicolon (;) preceding the module to be loaded. For example, to use the mysql module, remove the semicolon in front of ;extension=php_mysql.dll.
4. Configure PHP’s Session functionality
When using the session feature, we must configure the save directory for session files on the server; otherwise, sessions cannot be used. We need to create a readable and writable directory folder on Windows 8.1. This directory should ideally be independent of the main web program directory. Here, I created a directory named phpsessiontmp in the root directory of drive D. Then, in the php.ini configuration file, find
;session.save_path = “/tmp”
Modify it to:
session.save_path = “D:/phpsessiontmp”
5. Configure PHP’s file upload functionality
Just like with sessions, when using PHP’s file upload feature, we must specify a temporary folder to complete the file upload; otherwise, the file upload feature will fail. We still need to create a readable and writable directory folder on Windows 8.1. Here, I created a directory named phpuploadtmp in the root directory of drive D. Then, in the php.ini configuration file, find
;upload_tmp_dir =
Modify it to:
upload_tmp_dir = D:/phpuploadtmp
6. Modify date.timezone. Find
;date.timezone =
Modify it to:
date.timezone = Asia/Shanghai
7. Modify the system environment variables. The purpose of this is to allow the system to find the file path “C:\php-5.3.5\ext” where the PHP module files are located. The specific steps are as follows: Right-click “This PC”, select “Properties” from the pop-up shortcut menu, then select “Advanced system settings”, click the “Environment Variables” button, find the “Path” variable under “System variables”, click the “Edit” option, and append “;C:\php-5.3.5;C:\php-5.3.5\ext” to the end of the existing value, as shown in Figure php-1. Then click the “OK” button.

3. Integrate PHP and Apache
PHP can execute as a module of the Apache Web server, which makes its execution efficiency higher than ordinary CGI programs, and it can execute dynamic web pages faster than CGI or Perl. The specific steps to integrate PHP with the Apache server as a module are as follows.
1. First, to integrate PHP into the Apache server, find the configuration file named “httpd.conf” in the path “C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf”, then open the httpd.conf file and add the line “LoadModule php5_module “C:/php-5.3.5/php5apache2_2.dll””. This means loading PHP as a module. The result after adding it is shown in Figure apache-php-1.

2. In the httpd.conf file, add the two lines “AddType application/x-httpd-php .php” and “AddType application/x-httpd-php .html”. You can also add more; the essence is to add file types that can execute PHP. The result after adding them is shown in Figure apache-php-2.

3. In the httpd.conf file, add the line of code “PHPIniDir “C:/php-5.3.5″”. Its purpose is to indicate the path to the php.ini file for the Apache server. The result after adding it is shown in Figure apache-php-3.

4. By default, the directory where the Apache server executes the main web program is “C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs”, so when your main web program directory changes to “E:\wwwroot”, we need to modify the corresponding Apache configuration, that is, change
# DocumentRoot “C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs”
Modify it to:
DocumentRoot “E:/wwwroot”
Find
# <Directory “C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs”>
Modify it to:
<Directory “E:/wwwroot”>
5. Modify the specific order of index files. Find
DirectoryIndex index.html
Modify it to:
DirectoryIndex index.html index.php
6. After modifying httpd.conf, restart the Apache server to support PHP. Let’s test whether the PHP installation was successful. Create a new test file named “phpinfo.php” and place it in the “E:\wwwroot” directory. The code is as follows:
<?php
phpinfo();
?>
If you see the browser display the page shown in Figure apache-php-4, it proves that the PHP installation environment has been configured successfully.

4. Install MySQL 5.5.28
1. Prepare the MySQL installation file. The download URL is http://dev.mysql.com/downloads/file.php?id=409777, and the download name is mysql-5.5.28-winx64.msi.
2. Start the MySQL installation program, as shown in Figure mysql-1.

3. Click the “Next” button to proceed to the next step, as shown in Figure mysql-2.

4. Click the “Next” button to enter the installation type selection screen, as shown in Figure mysql-3. “Typical” means a typical installation, which provides most of the functionality needed to run MySQL; “Complete” means a full installation, which will install all optional components; “Custom” means a custom installation, allowing users to selectively install components. Here, I chose a full installation.

5. Click the “Next” button to enter the ready to install screen, as shown in Figure mysql-4. On this screen, you need to confirm the previously selected installation type and installation path.

6. Click the “Install” button to start the installation. After the installation is complete, as shown in Figure mysql-5, it asks whether you need to configure the MySQL server now. If you do not choose to configure it here, you can also start the configuration wizard through “Programs” in the “Start” menu.

7. Click the “Finish” button to complete the MySQL installation. Next, prepare to configure MySQL 5.5.28.
8. Corresponding information screenshots appear consecutively; just click the “Next” button, as shown in Figure mysql-6 and Figure mysql-7.


9. As shown in Figure mysql-8, the MySQL configuration wizard has started.

10. Click the “Next” button to enter the configuration type selection screen, as shown in Figure mysql-9. The “Detailed Configuration” option represents a detailed configuration; the “Standard Configuration” option represents a standard configuration. Here, I chose detailed configuration.

11. Click the “Next” button to enter the server type configuration screen, as shown in Figure mysql-10. “Developer Machine” means configuring the MySQL server to use minimal system resources when multiple desktop applications are running on the system; “Server Machine” means configuring the MySQL server to use an appropriate proportion of system resources; “Dedicated MySQL Server machine” means configuring the MySQL server to use all available system resources.

12. Click the “Next” button to enter the database usage screen, as shown in Figure mysql-11. On this screen, you can choose whether to use the InnoDB storage engine and what proportion of server resources InnoDB should occupy.

13. Click the “Next” button to enter the InnoDB tablespace settings screen, as shown in Figure mysql-12. If you do not want to use the default location for the InnoDB tablespace file, you can select a new path here.

14. Click the “Next” button to enter the concurrent connections settings screen, as shown in Figure mysql-13. “Decision Support (DSS)/OLAP” provides 20 concurrent connections; “Online Transaction Processing (OLAP)” provides 500 concurrent connections; the “Manual Setting” option allows the user to customize the number of concurrent connections.

15. Click the “Next” button to enter the networking options settings screen, as shown in Figure mysql-14. On this screen, you can enable or disable TCP/IP networking and configure the port number used to connect to the MySQL server. The default connection port number is “3306”.

16. Click the “Next” button to enter the character set settings screen, as shown in Figure mysql-15. The standard character set is used to support Western languages such as English, German, etc.; multilingual support can be used for Eastern languages such as Chinese, Japanese, etc.

17. Click the “Next” button to enter the Windows options settings screen, as shown in Figure mysql-16. The “Install As Windows Service” option sets MySQL as a Windows service; “Include Bin Directory in Windows PATH” adds the MySQL bin directory to the Windows system path.

18. Click the “Next” button to enter the security options settings screen, as shown in Figure mysql-17. On this screen, you can set the password for logging into MySQL.

19. Click the “Next” button, as shown in Figure mysql-18. The MySQL configuration will start executing until completion.

20. Test MySQL 5.5. After MySQL 5.5 installation and configuration are complete, you can run some tests to check whether it operates normally. The steps to test whether MySQL was installed successfully are: log in to MySQL 5, sequentially select “Start” -> “Programs” -> “MySQL Command Line Client” to enter the MySQL client interface. Enter the MySQL login password. If welcome information and the MySQL version number appear, it indicates a successful connection to the MySQL server. The operation result is shown in Figure mysql-19.

5. Install phpMyAdmin
1. Prepare the installation file. Download URL: http://www.phpmyadmin.net/home_page/downloads.php, file name: phpMyAdmin-4.2.9.1-all-languages.zip.
2. Extract phpMyAdmin-4.2.9.1-all-languages.zip to “E:\wwwroot\phpMyAdmin”, then open http://localhost/phpmyadmin/setup/ in your browser, as shown in Figure phpmyadmin-1.

3. Following the prompt, create a config folder in the “E:\wwwroot\phpMyAdmin” directory, then refresh the browser again, as shown in Figure phpmyadmin-2.

4. Create a new server, as shown in Figure phpmyadmin-3. Click the “Apply” button directly to use the default settings.

5. Configure the file. Select the default language as Simplified Chinese, as shown in Figure phpmyadmin-4, and click the “Save” button.

6. Copy the config.inc.php file from the “E:\wwwroot\phpMyAdmin\config” directory to “E:\wwwroot\phpMyAdmin\”, then delete the “E:\wwwroot\phpMyAdmin\config” directory. Open http://localhost/phpmyadmin/ in your browser, as shown in Figure phpmyadmin-5. Configuration is complete.

