First, from Official websites, apache2.050, php5, mysql4.0.20, phpmyadmin2.57
Apache_2.0.50-win32-x86-no_ssl.msi php-5.0.0-win32.zip mysql-4.0.20d-win.zip phpMyadmin-2.5.7.zip
Operating system Win2003 system disk is: D disk
Step 1: Install Apache and configure support for PHP
Click the installation file apache_2.0.50-win32-x86-no_ssl.msi to install Apache in D: / Apache2 directory (with yourself) -------------------- --------------------------------- | Note: Automatically install and start Apache service after installation, if There is a problem in here: | "(OS 10048) usually per socket address (protocol / network address / port) only allows once: | make_sock: could not bind to address 0.0.0.0:80 ..." is generally IIS occupies 80 ports | Two solutions: | 1, open the control panel -> Services find IIS Admin Service Close and Disable | | 2, if you do not want to close the IIS service can change the port used by Apache to other ports | Change Apache2 / Conf / httpd.conf | Listen 80 to Listen (the port you want to use) such as Listen 8080 | But then add a port number after you visit the Web service under your Apache | Such as: http: // localhost: 8080 | | then use cmd to enter the command line mode to enter you install Apache directory / Apache2 / bin | Enter | Apache -k install | apache -k start | | If successful, then do the following ! --------------------------------------------- ---------------
Unzip php-5.0.0-win32.zip to D: / PHP to find php.ini-dist renamed PHP.INI in the PHP directory and copy it to the Windows directory (Win2k for Winnt) as mine PHP.INI is copy to the d: / windows directory again. PHP5TS.DLL in the HP directory, libmysql.dll is copied to the system directory (System / System32), if you are D: / Windows / System in the SYSTEM
Configuring httpd.conf in apache to open d: /apache2/conf/httpd.conf This file is found to change it to AddDefaultCharset GB2312 (let the default language code to Simplified Chinese) find DocumentRoot "D: / Apache2 / HTDOCS "change it to your web directory (can not change), as my DocumentRoot" D: / Website "found DirectoryIndex index.html index.html.var Add index.htm index.php
Select Installation Mode: Modular mode installation or CGI mode installation (optionally)
-------------- Modular installation configuration ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- Find #LoadModule SSL_Module Modules / MOD_SSL.SO this line, add a line loadModule php5_module d: /php/php5apache2.dll after this line where D: / php/php5apache2.dll is in your php directory PHP5APACHE2.DLL location Location finds the address of AddType Application / X-Gzip .gz .tgz, add a line of addtype application / x-httpd-php .php after this line -------------- -------------------------------------------------- ------------------ CGI installation configuration ----------------------------- -------------- Find this line, add Scriptalias / PHP / "D: / php /" AddType Application / X-httpd- PHP .PHP ACTION Application / X-httpd-php "/php/php-cgi.exe" ----------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
At this point, the PHP environment is basically configured in the web root directory (such as my D: / Website) to build a file content called Test.php as shown below Echo phpinfo ();?> Restart Apache service Browser opens Http://localhost/test.php If you can see the PHP configuration output information is OK.
The second step is installed in Mysql (first-click, the configuration of this article does not apply to mysql4.1 and mysql5.0 version)
Install MySQL to the specified directory. If you are D: / mysql, if you download is the non-installed MySQL compression package, you can download it directly to the specified directory and then click D: /Mysql/bin/winmysqladmin.exe this file where D: / MySQL is your MySQL installation directory Entering Winmysqladmin initial user, password (Note: This is not MySQL user, password) Just fill no need to determine the launch bar of your lower right corner task, there will be a traffic light icon, red light Light representative service stops, green lights, represents the service, if it is not a green light, execute the following: Left click this icon -> Winnt-> Install the service Install this service to click this icon -> Winnt-> Start The Service Launage MySQL Service
Modify the ROOT password of the mysql database Use the CMD to enter the life. This row mode input is as follows: (Note: D: / mysql is mysql installation directory) CD D: / mysql / bin mysqladmin -u root -p password 123456 Enter ENTER Password: (Note: This is called you to enter the original password. When you just install it, your password is empty, so you can use it directly) At this time, the password of the account root in MySQL is changed to 123456 installation.
Third, configure php.ini and test mysql (php.ini is pHP.ini under Windows)
Found extension_dir = "./" changed to extension_dir = "d: / php / ext" found; extension = php_mysql.dll will ';' remove it to extension = php_mysql.dll; session.save_path = "/ tmp" 'Remove the directory you saved the session, such as session.save_path = "d: / php / session_temp"; restart the Apache service in the web root directory (such as D: / Website) Established TestDb.php file content as follows: PHP $ link = mysql_connect ('localhost', 'root', '123456'); IF (! $ link) echo "fail"; Else Echo "Success"; mysql_close ();?> Open http: // localhost with browser / Testdb.php If the output Success is OK
Fourth, PHPMYADMIN installation configuration
Unzip phpMyadmin-2.5.7.zip to the web root directory, rename folders to pHPMYADMIN or other CONFIG.INC.PHP in the phpMyadmin directory to find $ CFG ['Servers'] [$ I] ['user' ] = 'root'; $ cfg ['servers'] [$ I] ['password'] = '123456'; fill in your MySQL user and password, respectively
If it is not used locally, it is best to add verification
I don't know if I write is right! However, I am basically worthy! It should be almost the same as learning.
What is wrong or missing, I hope everyone pointed out criticism! ---- BY LUCK_MLC