Construction of Discus under windows
discuz! X is a PHP programming language, MySQL as a database, and the use of Apache/iis/nginx (any one can) provide Web services products. To build discuz! X site, the server must have an environment consisting of PHP, MySQL, and Apache/iis/nginx. Among them, IIS is mainly used for Windows servers, Apache, Nginx and more for Linux servers (i.e. LAMP and LNMP).
When you deploy a Windows server, you need to follow a certain deployment order, namely:
System environment check MySQL, PHP package download, MySQL, PHP installation
The following is an example of deploying IIS, MySQL, and PHP on a Windows server to demonstrate the specific process of setting up an environment.
First, the system contract
Environment software storage location after download |
X:\Server_Tools |
Environment Software Installation Location |
X:\Server_Core |
PHP Installation Location |
X:\Server_Core\PHP |
MySQL Installation location |
X:\Server_Core\MySQL |
Zend Optimizer Mounting position |
X:\Server_Core\Zend |
IIS Web site site root directory |
X:\wwwroot |
MySQL Database Location |
X:\Database |
PHP.ini Storage Location |
Y:\Windows\php.ini |
My.ini Storage Location |
X:\Server_Core\MySQL\my.ini |
Note: x and Y are variables in this standard, and x represents only the partition letter that the application actually holds, installs, and y is the partition letter of the system.
Second, the system environment check and prepare the required software 1, check whether the system has IIS installed
Click: Start, Administrative tools.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis.jpg "alt=" Windows_iis.jpg " />
Check for Internet Information Services (IIS) Manager, because IIS components are available in the operating system disk, it is recommended that you also install the IIS components when you install the operating system. If it is not installed, you can download the corresponding operating system version of IIS to the network.
2. View disk partition capacity and determine usage policy
Open My Computer to view the available space capacity for each disk partition except for zone C. Use a larger disk partition as the Web root, and the MySQL database storage directory, try not to be in the same disk partition as the Web root directory. A smaller disk partition can be used as the installation directory partition for the service environment software.
Note: If there are special requirements, deploy as required.
3. Download environment software
Download all the software in the Server_tools folder:
Mysql-5.5.19-win32.msi |
http://dev.mysql.com/downloads/ |
Php-5.2.17-win32.zip |
http://php.net/downloads.php |
Zendoptimizer-3.3.3-windows-i386.exe |
Http://www.zend.com/en/products/guard/zend-optimizer |
Phpmyadmin-3.1.0-all-languages.zip |
http://www.phpmyadmin.net/home_page/downloads.php |
Note: PHP version select 5.2.x, the smaller version number is better, temporarily do not use the PHP5.3 version, no special reason, do not use PHP4, PHP officially no longer provide PHP4 support, MySQL version choose 5.5.x, the smaller version number of the new better, no special reasons for no other version. PHP try to use a non-installed green version, MySQL try to use the installation version.
Environment deployment Installation MYSQL1, installation software
Enter the X:\Server_Tools directory, double-click Mysql-5.5.19-win32.msi;
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_1.jpg "alt=" Windows_ Mysql_1.jpg "/>
Select Custom Installation
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_2.jpg "alt=" Windows_ Mysql_2.jpg "/>
Click "Change" to make changes to the MySQL installation directory
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_3.jpg "alt=" Windows_ Mysql_3.jpg "/>
After the file copy is installed, proceed to the MySQL Setup screen and click Finish.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_4.jpg "alt=" Windows_ Mysql_4.jpg "/>
Select detailed configuration for detailed configurations
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_5.jpg "alt=" Windows_ Mysql_5.jpg "/>
Select MySQL Run mode: Server machine
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_6.jpg "alt=" Windows_ Mysql_6.jpg "/>
Select the default storage mode for MySQL database: Non-trans only (MYISAM)
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_7.jpg "alt=" Windows_ Mysql_7.jpg "/>
Set MySQL Maximum connection number: An integer that is generally set to 128-512.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_8.jpg "alt=" Windows_ Mysql_8.jpg "/>
Set MySQL network parameters, note: Do not tick enable Strict mode! The Addfirewall option is only checked when it needs to be connected to MySQL, that is, a strategy for adding a station to the firewall.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_9.jpg "alt=" Windows_ Mysql_9.jpg "/>
Set MySQL default Character set: The user site language, the default we fill GBK.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_10.jpg "alt=" Windows_ Mysql_10.jpg "/>
Windows Environment settings
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_11.jpg "alt=" Windows_ Mysql_11.jpg "/>
To change the root password, please set it more complicated.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_12.jpg "alt=" Windows_ Mysql_12.jpg "/>
Note: Do not start the remote connection mode if it is not necessary! Complete the MySQL installation and start the MySQL service.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_13.jpg "alt=" Windows_ Mysql_13.jpg "/>
2, test MySQL work is normal
Open cmd Command Prompt window, enter command: Mysql–u root–p
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_14.jpg "alt=" Windows_ Mysql_14.jpg "/>
When you enter the password you just installed, if you can enter the MySQL console correctly, the MySQL installation is normal.
3. Change the MySQL database storage directory
Open the cmd Command Prompt window and enter the command: net stop MySQL to stop the MySQL service running;
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_mysql_15.jpg "alt=" Windows_ Mysql_15.jpg "/>
Open X:\Server_Core\MySQL\my.ini, find:
DataDir = "X:\Server_Core\MySQL\data"
Modified to:
DataDir = "X:\Database"
Copy the X:\Server_Core\MySQL\data folder to X:\ and rename the X:\Database;
Open the cmd Command Prompt window and enter the command:
net start MySQL
Start the MySQL service.
Re-test if MySQL is working properly.
4, mobile libmysql dynamic link library to the system directory
Copy the X:\Server_Core\MySQL\bin\libmySQL.dll file to the Y:\Windows\System32 directory.
Install PHP1, unzip
Unzip the downloaded Php-5.2.8-win32.zip file and copy it to:
X:\Server_Core\PHP;
2, modify the php.ini
Enter the X:\Server_Core\PHP folder and rename the php.ini-dist to php.ini;
Opens the php.ini file and found:
Extension_dir= "./"
Change it to:
Extension_dir= "X:\Server_Core\PHP\ext"
Found in: Windows Extensions
In the dynamic module configuration under Windows Extensions, you need to open the following module support: (Remove the semicolon in front of each line of the module configuration)
Php_gd2.dll
Php_mbstring.dll
Php_mcrypt.dll
Php_mhash.dll
Php_ming.dll
Php_mysql.dll
Php_openssl.dll
Php_sockets.dll
Php_xmlrpc.dll
Php_zip.dll
Found it:
disable_functions=
Switch
Disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_ Alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server
Save the php.ini file and copy it to the Y:\Windows
Integration of IIS with PHP configuration 1, building a website
Start IIS Manager and create a new Web site (virtual host);
650) this.width=650; "class=" Limit "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_1.jpg " alt= "Windows_iis_php_1.jpg"/>650) this.width=650; src= http://faq.comsenz.com/library/system/image/env/ Windows_iis_php_2.jpg "alt=" Windows_iis_php_2.jpg "/>
Enter the site name, changing the name to only the identity in IIS
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_3.jpg "alt=" Windows_ Iis_php_3.jpg "/>
The website IP address does not need to fill in, the port if does not have the special request to maintain 80, finally correctly enters the website domain name.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_4.jpg "alt=" Windows_ Iis_php_4.jpg "/>
Establish wwwroot and subordinate site folders in the site partition BBS
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_5.jpg "alt=" Windows_ Iis_php_5.jpg "/>
For PHP applications, you need to give the site "read" and "Run Script" permissions.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_6.jpg "alt=" Windows_ Iis_php_6.jpg "/>
Thus, a new site has been successfully created.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_7.jpg "alt=" Windows_ Iis_php_7.jpg "/>
2. Integrated configuration of IIS and PHP
Open the site properties you just created
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_8.jpg "alt=" Windows_ Iis_php_8.jpg "/>
In the Site Properties window, click the Home Directory tab, click the Configure button, and in the New Application Configuration dialog box that pops up, click the Add button, join PHP's ISAPI support, select the executable file: X:\Server_Core\PHP\php5isapi.dll, The extension is. php, the Limit action is: Get,post. Click OK to add and view the. php extension in the Application Configuration window to see if the load was successful. If successful, click OK to close the configuration window and return to the Site Properties main window.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_9.jpg "alt=" Windows_ Iis_php_9.jpg "/>
Click the Documents tab, add Index.htm, index.html, index.php three files in the default content document, and sort all the default documents in the order shown. When you are finished, click OK to close the Site Properties Configuration window and return to the IIS manager main interface.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_10.jpg "alt=" Windows_ Iis_php_10.jpg "/>
Right-click Web Service Extensions to add support for PHP extensions.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_11.jpg "alt=" Windows_ Iis_php_11.jpg "/>
In the "New WEB Service Extensions" dialog box shown, "Extension" fills in PHP, "file" selects X:\Server_Core\PHP\php5isapi.dll, and the PHP extension is set to allow by default.
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_12.jpg "alt=" Windows_ Iis_php_12.jpg "/>
Restart the IIS service
650) this.width=650; "src=" http://faq.comsenz.com/library/system/image/env/windows_iis_php_13.jpg "alt=" Windows_ Iis_php_13.jpg "/>650) this.width=650;" Src= "Http://faq.comsenz.com/library/system/image/env/windows_iis_php_ 14.jpg "alt=" Windows_iis_php_14.jpg "/>
At this point, the integration of IIS with PHP is complete.
3. Test if PHP is installed correctly
Enter the X:\wwwroot\bbs\ directory and create a new phpinfo.php file with the contents:
<php
Phpinfo ();
?>
Open IE Browser, enter: http://www.domain.com/phpinfo.php;
Note: www.domain.com for your server domain name, this machine can fill in localhost
If the PHP support information is displayed correctly, the configuration consolidation is successful.
Installing Zend Optimizer
Go to the X:\Server_Tools folder, double-click the downloaded Zendoptimizer-3.3.3-windows-i386.exe file, the installation process is very friendly and relatively simple, so this is no longer explained here. However, the following points should be noted:
Zend Optimzer The installation directory to be designated as X:\Server_Core\Zend;
During installation, the php.ini is prompted to observe if the Y:\Windows is not required, if not manually specified as Y:\Windows;
During installation, you are prompted for the location of the IIS Web site root directory, specified as: X:\wwwroot;
Zend Optimizer automatically restarts the IIS service after the installation is complete, restart the Internet Explorer window after reboot, view phpinfo.php support information, see if Zend Optimizer support information is included, if not, then Zend Optimi Zer not installed successfully!
This article is from "Happy Life" blog, please make sure to keep this source http://tyjhz.blog.51cto.com/8756882/1537385