Build a perfect server platform in Windows (APACHE + JSP + CGI + PHP + ASP + MYSQL)
Author: Ziqi [EST]
Information Source: evil
You need to download several software packages:
1. php-5.0.2-Win32
2. apache_2.0.52-win32-x86-no_ssl
3. mysql-5.0.1-alpha-snapshot-win
4. iASP2.1.01
5. jakarta-tomcat-4.1.31
7. j2sdk-1_4_2-windows-i586
PhpMyAdmin-2.6.0-pl2
9. ActivePerl-5.8.4.810-MSWin32-x86
1. download the software package:
1. PHP5 RC3
For PHP: http://www.php.net/downloads.php, find the two software packages in the box. The PHP 5.0.0RC3 zip package is the PHP5 software package, while the Collection of PECL modules for PHP 5.0.0RC3 is the PECL extension module package of PHP5.
2. Apache 2.0.52
Apache official: http://httpd.apache.org/download.cgi, find such as location, download For Windows MSI installation package, click to select an image to download.
3. MySQL 5.0.1
The official version of MySQL is SQL .com/downloads/mysql/5.0.1-snapshot.html "target = offline Windows downloads. Download The Without installer package and save it to the local disk, as shown in:
4. jakarta-tomcat-4.1.31
Jakarta-tomcat-5.5.3 is the latest version, because 5.5.3 version requires jdk5.0 support, I can not download this version, so the use of 4.1.31, JDK is also the use of j2sdk-1_4_2-windows-i586, of course if you have 5.0 version, the installation method is the same. This version: The http://jakarta.apache.org/site/binindex.cgi to find the corresponding version to download,
5. iASP2.1.01
A program that enables APACHE to support ASP is a http://www.stryon.com.cn/products.asp? S = 1 found, simple application can be downloaded.
6. j2sdk-1_4_2-windows-i586
Because the JSP page requires javac for compilation and running, JDK must be installed (JRE cannot be installed only ). Open page http://java.sun.com/j2se/1.4.2/download.html download j2sdk-1_4_2-windows-i586
7. phpMyAdmin-2.6.0-pl2
PhpMyAdmin-2.6.0-pl2 allows you to manage MYSQL databases in a WEB environment, which is: http://sourceforge.net/projects/phpmyadmin/
Find the download link below and select a closer image to download.
ActivePerl-5.8.4.810-MSWin32-x86
Installing ActivePerl enables Apache to support CGI and PL programs: http://www.activestate.com/Products/Download/Download.plex? Id = ActivePerl
Find the following page to download the MSI package:
Ii. installation and configuration
1, install the apache_2.0.52-win32-x86-no_ssl, install it in the D: Apache2 folder, the installation process needless to say, one way to NEXT can, after the installation can be in the taskbar to see such an icon, indicates that the instance has been started successfully. Go to http: // 127.0.0.1, and the successful installation page is displayed.
Configure the Apache configuration file to support PHP. use NotePad to open D: Apache2conf, according to your installation path) httpd in the directory. conf file, locate the following line:
DirectoryIndex index.html. var
Add a PHP Example page after it, usually index. php, as follows:
DirectoryIndex index.html. var index. php
To enable Apache to identify related extensions of PHP, search for and locate the following section:
<Directory "D:/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow, deny
Allow from all
</Directory>
Add the following two lines:
AddType application/x-httpd-php. php. phtml. php3. php4
AddType application/x-httpd-php-source. phps
Specify the php module and locate the following line:
# LoadModule ssl_module modules/mod_ssl.so
Add a row below:
LoadModule php5_module D: PHPphp5apache2. dll
Make it point to the php5apache2. dll file under the PHP5 directory. The path must be accurate.
To specify Apache to recognize Chinese characters, we specify GB2312 as the default encoding. Find and locate the following line
Adddefacharcharset ISO-8859-1
Modify it:
Adddefacharcharset GB2312
In addition, if you want to disable directory browsing, find and locate the following lines:
#......
# Some Annotations
#......
Options Indexes FollowSymLinks
Just remove the Indexes of the line following the comments. After modification:
#......
# Some Annotations
#......
Options FollowSymLinks
OK. Save the httpd. conf file and restart the Apache server.
2. install PHP 5.0.2
Decompress the downloaded PHP5 RC3(php-5.0.0RC3-Win32.zip) to the D: PHP Directory. Copy the php5ts. dll file under the D: PHP Directory to the C: windows Directory (if it is a windows 2000 operating system, it is the C: WINNT directory, the same below, no repeated instructions.
Copy the following dll files in the D: PHP Directory to the C: windowssystem32 directory:
Fdftk. dll
Fribidi. dll
Gds32.dll
Libeay32.dll
Libintl-1.dll
Libmhash. dll
Libmysql. dll
Libmysqli. dll
Ntwdblib. dll
Ntwdblib. dll
Yaz. dll
Libmysql. dll is supported by MySQL 4.1 and later versions. Because I downloaded MySQL 4.0.20 above, copy libmysql. dll.
Copy the php. ini-dist file under the C: PHP5 directory to the C: windows Directory, change it to php. ini, and open and edit it in Notepad:
Locate the following two rows:
; Directory in which the loadable extensions (modules) reside.
Extension_dir = "./"
Modify the following line to point it to the D: PHPext directory. The modification is as follows:
; Directory in which the loadable extensions (modules) reside.
Extension_dir = "D: PHPext"
Test whether PHP is configured successfully:
Open notepad and enter the following line of code:
<? Php phpinfo ();?>
Save as phpinfo. the php file is stored in the Apache2htdocs directory. Now, open your browser and enter http: // localhost/phpinfo in the address bar. php and press Enter. If everything goes well, you will see the following page. The configuration of PHP5 is successful:
3. Install mysql-5.0.1-alpha-snapshot-win
It's very easy. Let's assume that we have installed it in the D: mysqldirectory, open the binfolder under the directory, and run winmysqladmin.exe to configure mysql.
Enter the Administrator's username and password.
You can see that the MYSQL process has been opened in the service every time you start the service.
4, install phpMyAdmin-2.6.0-pl2
You do not need to install phpadmin. COPY it to the webpage directory and name it phpadmin. Open the C: Windows/php. ini file and find the extension = php_mysql.dll string. Delete the previous string; No. extension = php_mysql.dll, and start PHP to support the MYSQL module.
Open the config. inc. php3 file under the phpmyadmin folder and locate the following content:
$ Cfg [Servers] [$ I] [host] = localhost; // MySQL hostname or IP address
$ Cfg [Servers] [$ I] [auth_type] = config; // Authentication method (config, http or cookie based )?
$ Cfg [Servers] [$ I] [user] = root; // MySQL user
$ Cfg [Servers] [$ I] [password] =; // MySQL password (only needed
// With config auth_type)
Change host, user, and password to your own IP address, user, and password. Open the http: // 127.0.0.1/phpmyadmin/index page. php. If you can see the following page, congratulations, the installation is successful.
5, install ActivePerl-5.8.4.810-MSWin32-x86
The installation process is very simple. You can use the NEXT step. We will install it under D: usr, note that the default root directory of the ActivePerl-5.8.4.810-MSWin32-x86 is the Perl folder, according to international conventions, it is best to Use usr as my root directory, in order to avoid troubles in future program debugging.
Configure Apache to support CGI and PL files. Use NotePad to open the httpd. conf file in the D: Apache2conf directory and find
# ScriptAlias/cgi-bin/"D:/Apache/cgi-bin /"
Remove the # sign and open D:/Apache/cgi-bin/to the directory where you need to support CGI programs. I set f:/Web/cgi-bin.
Search
<Directory "D:/Apache/cgi-bin">
Similarly, it is modified to f:/Web/cgi-bin.
Search
AddHandler cgi-script. cgi
Add. pl, that is, AddHandler cgi-script. cgi. pl.
OK. Write a CGI program to test it:
#! /Usr/bin/perl
Print "Content-type