Configuration of discuzx2.0 in Windows

Source: Internet
Author: User
Tags vc9 mysql command line

Abstract: There is a forum in this project that needs to be upgraded, specifically to be expanded. In the past, the forum used discuz nt, which is somewhat weaker than the current discuz x2.0 function. Therefore, users have the idea to upgrade, upgrade all forums, logs, and photos to discuz x2.0. Because discuz NT is based on. net, and discuz X is based on PHP, so direct upgrade is definitely not possible. In the middle, you must use the import library and modify the relevant PHP to meet the needs. For the moment, we will not talk about how to upgrade discuz x2.0. Let's take a look at how to configure discuz x2.0 in windows.

Main content:

    1. PHP environment Configuration
    2. Install MySQL
    3. Install discuz x2.0
I. php Environment

You can deploy IIS on windows in two ways: ISAPI and FastCGI. The ISAPI method is no longer supported since php5.3 (if you need ISAPI, you can go to another blogIis7.xConfigurationPHPRunning Environment), But only the FastCGI mode is provided (it is said that the FastCGI mode is used on Windows Server 2008 to run php 130% faster than ISAPI deployment ). In this case, the latest php-5.3.6-win32-vc9-x86_threadsafe.zip is used for project demands. Therefore, FastCGI is used for deployment. If you are using IIS6 or earlier versions, you need to install FastCGI separately. iis7.x has the FastCGI function, if it is not installed by default, you can open it in Control Panel \ Programs and features (Internet Information Services-World Wide Web Services-Application Development Features -- CGI ). Next extract the downloaded PHP zip package, put the unzipped php-5.3.6-Win32-VC9-x86_ThreadSafe folder in the root directory of the d disk (this location can be arbitrary ).

1. Locate PHP. ini-development in the php-5.3.6-Win32-VC9-x86_ThreadSafe and change the file name to PhP. ini.

2. Open the php. ini file,

First configure PHP extension, find; Extension_dir = "Ext"Change to (that is, the directory where your extension is located)Extension_dir = "D: \ php-5.3.6-Win32-VC9-x86_ThreadSafe \ Ext".

Then open the required extension items (the corresponding extension configuration already exists in PHP. ini, and you only need to remove;Note). Common configurations are as follows:

Extension = php_gd2.dll

Extension = php_mbstring.dll

Extension = php_mysql.dll

In php5.3, you also need to set the time zone; Date. timezone =ChangeDate. timezone ="Asia/Shanghai"

Enable fastcig (also remove related comments)

FastCGI. Impersonate = 1;

FastCGI. Logging = 0

CGI. fix_pathinfo = 1

CGI. force_redirect = 1

3. next, configure FastCGI for IIS. Of course, create a site before that (Here we create a site discuzx20 pointing to F: \ working directory \ discuzx20), click site, in the features view, select handlermappings-add module mapping and configure the following request paht:*. Php, Module:Fastcgimodule, Executable (optional ):D: \ php-5.3.6-Win32-VC9-x86_ThreadSafe \ php-cgi.exe, Name:Phpmodule(Of course, executable should be selected based on the specific path, and the name can also be defined by itself ).

Note:

A. in iis7.x, the corresponding configuration file is generated. For example, after the above configuration is completed, the Web can be generated in the root directory of the website. in the future, if the configurations of other websites are the same, you only need to copy the specific configuration content.

B. FastCGI is different from ISAPI in that ISAPI does not require hosting when running PHP.ProgramTherefore, the application pool can be modified to be unmanaged, but FastCGI is different, and its application pool is the same as ASP. net is the same (and pay attention to 32-bit and 64-bit systems, but not 64-bit systems, there are two situations: 1. if the default value is 32 bits. net Framework, you can set the website application pool Enable32-bit application to true 2. if the default value is 64-bit.. NET Framework.

C. ISAPI-based PHP deployment usually copies PHP. ini to the C: \ Windows Directory, while FastCGI does not.

D. To deploy PHP using ISAPI, you usually need to copy php_mysql.dll to c: \ windows \ system32. This is not required for FastCGI deployment.

4. Add index. php to the site default document. Then, create an index. php In the site and enter . We can see the relevant PHP information without an accident, but some may say that FastCGI unexpectedly exits.

C: \ Users \ kenshincui> D:

D :\> cd d :\ php-5.3.6-Win32-VC9-x86_ThreadSafe

D: \ php-5.3.6-Win32-VC9-x86_ThreadSafe> PHP-V

Now you can see the relevant information. At this time, a friend usually prompts that php_zip.dll cannot be found, and then you can open PHP. INI, comment out the related extensions (if you need this extension, you can find it in the php5.2 package ).

Ii. Install MySQL

The latest version of mysql5.5.11.7 is downloaded here. Compared with the old version, MySQL has a much better performance and many new features, such as MySQL workbench, it is a graphical management tool for MySQL. With it, you do not need to use MySQL command line client or install phpMyAdmin and other third-party management tools by yourself.

The process of installing MySQL is relatively simple. You only need to pay attention to the following points of attention:

    1. Select the installation type. This option is available for both the new version and the old version, especially for actual deployment. Here we select developer default.

2. In configuration, You need to select whether to be used as a development machine or as a server. Generally, the server's access traffic is much larger.

If you choose to install MySQL workbench, you can use it to manage your server. Of course, you can use MySQL command line client, as shown in.

3. Install discuz x 2.0

After downloading the installation package, decompress the package to three folders, where upload needs to be deployed, you can copy the content to the site root directory (here we will put the configured site root directory on it ).

Next, visit the site and the page appears:

Click Next (if the above configuration does not cause any problems, pay attention to the troubleshooting items as prompted ):

Click Next to select a new installation:

Click Next and enter the admin password and other configuration items:

Then discuz x2.0 starts to generate the relevant database:

After the above is successful, you can see the discuz x2.0 homepage:

Now, let's take a look at discuz x2.0, including how to upgrade discuz nt to discuz x2.0.

BenWorksUse the Knowledge Sharing signature 2.5 mainland China License Agreement for licensing. You are welcome to reprint, interpret, or use it for commercial purposes. However, please indicate that the record is from Cui jiangtao (kenshincui) and contains related links.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.