This example is the installation and installation of
IIS5.1
php5.2.1(zip)
MySQL5.0.37
phpmyadmin2.10.0.2
ZendOptimizer-3.2.6
under wiondws XP Configuration
IIS installation
1 Put the WindowsXP SP2 system installation CD in the CD-ROM drive
2 Go to Control Panel> Add & Remove> Add/Remove Windows Components> Select Internet Information Services (IIS) in the Windows Component Wizard
3 Click Next to copy the files until the installation is completed
4 Complete the IIS installation
5 Open the browser and enter http://localhost. If the following interface appears, the installation is successful
MySQL installation
1 Click the MySQL installation package
2 The default is Typical, if you want to modify the installation path, you can also choose custom.
Note: In the path to install mysql, Cannot contain Chinese!
3 Click intall to start installation
4 Skip registration
5 Do you want to configure MySQL now? You can also configure it in the configuration wizard of the start menu later.
Here is the configuration now
6 Select Detailed Configuration and click Next to continue
7 The following option is to select the type of mysql application. The first is to develop the server , and the
will only use as little memory as possible. The second type is an ordinary WEB server, which will use a medium amount of memory.
The last one is a MySQL database that only runs on this server, which will occupy all the memory.
Users can choose options according to their own needs. Here are only Select the development server and click Next to continue
8 The following is to select the database purpose. The first one is multi-purpose.
will optimize the database into a good innodb (transaction) storage Type and high-efficiency myisam (non-transactional) storage type,
The second one is only used for transaction processing type, the best optimization innodb, but also supports myisam, only myisam supports full-text index
The last one The first is simple network development, suitable for simple applications. Only the myisam type that does not support transactions is supported.
Generally choose the first multi-functional one.
9 The following is to select the data storage location of InnodDB. It is generally the default and does not need to be changed
(If you want to modify the data saving path, you can also modify the datadir value of my.ini after installation)
10 The following is to select the maximum number of connections allowed by MySQL. The first is a maximum of 20 concurrent connections,
the second is a maximum of 500 concurrent connections, and the last is customized. You can customize it according to Choose according to your own needs.
Select the first one here
11 The following is whether to run the network link. Select the check box here. The port for database monitoring is generally 3306 by default.
If you change it to another port, you must remember the modified port when connecting to the database in the future, otherwise you will not be able to connect to the mysql database.
It is more troublesome. No modifications are made here. Use the default port of mysq: 3306
12 This step sets the default encoding of mysql. The default is latin1, which is also a standard encoding. The second is UTF8, and the third is manual setting.
encoding was introduced in version 4.1 or above. If To use data from the original database, it is best to determine what encoding the original database uses. If the encoding
set here is inconsistent with the encoding of the original database data, garbled characters may appear when using it. It is recommended to use latin1 standard encoding
Of course, if we need to, we can also modify its encoding (not recommended).
13 This step is whether to set mysql to For Windows services, generally choose to set it to a service,
so that you can start and close the MySQL database through the service in the future. Recommendation: also check the following check box,
In this way, in cmd mode, no need Do not go to the bin directory of mysql to execute the command. Consult the executable file on the command line
14 This step is to set the super user password of mysql. This super user is very important,
To have full permissions on mysql, please set it up and remember the super user password.
There is a check box below to create an anonymous account, which will make the database system unsafe.
If you have this requirement, you can also Please check.
15 Click Execute to install
16 Click Finish to complete the installation
17 We can start using mysql, open the mysql Command of all programs in the start menu line Client, enter the password
When this interface appears, it means that mysql has been installed
Possible problems:
If in the 15th Step, the following prompt appears
because you have installed mysql before. Some configuration files were retained when uninstalling.
Click retry to see if it can pass. Otherwise, click cancel to exit. Then click the MySQL Server Instance Config Wizard
in the start menu to reconfigure mysql
and repeat the previous operation. In step 14, the interface will appear as follows
There are three places to enter the password. You have installed mysql before.
You can enter the original root password in the first text box, and enter the new root password in the next two text boxes.
If it still doesn't work, reinstall MySQL.
Note on reinstallation: It is best to delete all the original files. If necessary, you can clear the registry.
If there are no other mysql-related programs on your machine. And be sure not to keep the original my.ini file.
The other thing is to delete the files in the original installation path and delete the ibdata1 file under the data directory.
More articles on PHP fan sitehttp://www.phpfans.net
Installation of PHP
Since php is a zip file (non-install version), the installation is relatively complicated Simply
decompress it. Rename the decompressed php-5.2.1-Win32 to php5 and copy it to the C drive directory. That is, the installation path is c:php5
1 Find php in the php directory .ini.recommended (or php.ini-dist) file, rename it to php.ini
and copy it to the windows directory of the system disk (take c:windows as an example).
2 Then Copy php5ts.dll and libmysql.dll in the php directory to the directory c:windowssystem32.
3 Copy the php_gd2.dll, php_mysql.dll and php_mbstring.dll files in the php5ext directory to c:windowssystem32
If php_gd2.dll is not loaded, php will not be able to process images. If php_mysql.dll is not loaded, php will not support the mysql function library
php_mbstring.dll supports wide characters when using phpmyadmin later
More articles on PHP enthusiast site http://www.phpfans.net
Installation of Zend Optimizer
Zend Optimizer Use code optimization methods to improve the execution speed of PHP applications. PHP programs that use Zend Optimizer execute 40% to 100% faster than those without. And some files encrypted with Zend SafeGuard must be installed with Zend Optimizer before they can run.
Note: Whether Zend Optimizer is installed or not does not affect the normal operation of php. If you find it troublesome, this step Can be omitted.
1 点击安装Zend Optimizer
2 接受协议,点击next
3 选定安装路径
4 我们用的是IIS5.1,所以这里选 IIS
5 选定 php.ini 的位置.我们的是在 C:\WINDOWS\ 下
6 选定IIS默认安装路径.我们的是 C:\Inetpub\
7 点击 Install 进行安装
8 点击 是.安装程序自动完成配置和服务器重启.
9 点击 Finish 完成安装
所有东西安装完成后我们再进行配置
配置php并关联MySQL
打开c:\windows\php.ini文件
<span style="COLOR: #000000"><span style="COLOR: #0000bb"></span><span style="COLOR: #007700"><?</SPAN><SPAN style="COLOR: #0000bb">php<BR></SPAN><SPAN style="COLOR: #0000bb">$host </SPAN><SPAN style="COLOR: #007700">= </SPAN><SPAN style="COLOR: #dd0000">"localhost"</SPAN><SPAN style="COLOR: #007700">;<BR></SPAN><SPAN style="COLOR: #0000bb">$user </SPAN><SPAN style="COLOR: #007700">= </SPAN><SPAN style="COLOR: #dd0000">"root"</SPAN><SPAN style="COLOR: #007700">;<BR></SPAN><SPAN style="COLOR: #0000bb">$password </SPAN><SPAN style="COLOR: #007700">= </SPAN><SPAN style="COLOR: #dd0000">"12345"</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #ff8000">//12345改成你的mysql密码<BR></SPAN><SPAN style="COLOR: #0000bb">$link</SPAN><SPAN style="COLOR: #007700">=</SPAN><SPAN style="COLOR: #0000bb">mysql_connect</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$host</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb">$user</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb">$password</SPAN><SPAN style="COLOR: #007700">); <BR>if(!</SPAN><SPAN style="COLOR: #0000bb">$link</SPAN><SPAN style="COLOR: #007700">) echo </SPAN><SPAN style="COLOR: #dd0000">"<h1>失败!</h1>"</span><span style="COLOR: #007700">;<br>else echo </span><span style="COLOR: #dd0000">"<h1>成功!</h1>"</span><span style="COLOR: #007700">;<br></span><span style="COLOR: #0000bb">mysql_close</span><span style="COLOR: #007700">();<br>?> </span><br></span>