PHP setup (windows64 + apache2.4.7 + mysql-5.6 + php5.5 + phpMyAdmin) and Discuz Installation

Source: Internet
Author: User
PHP build (windows64 + apache2.4.7 + mysql-5.6 + php5.5 + phpMyAdmin) and Discuz installation, the following articles refer to the three sources, in addition to my build problems encountered in the process of repair notes:

PHP environment setup and Discuz! Install

Http://www.myxzy.com/post-386.html

Http://www.discuz.net/thread-3258186-1-1.html

Currently, most of the one-click installation packages are 32-bit and do not support 64-bit packages. If you use them directly on a 64-bit system, an error is returned, so here I will talk about how to build an Apache + PHP + MySQL environment in a windows 64-bit system!

The windows 2008 64-bit Simplified Chinese version, apache, php, and mysql I used here are 64-bit versions. The local environment is created, so I use the default settings.

1. Download the PHP, Apache, Mysql software, and VC library.

The following are the official addresses of PHP, Apache, and Mysql.

PHP: http://windows.php.net/qa/

Mysql: http://www.mysql.com/downloads/mysql/

Apache: http://www.apachelounge.com/download/win64/

Php, apache, mysql, and vc libraries used in this tutorial: Baidu online storage

2. precautions before installation.

Pay attention to the download of PHP and Apache websites, which have prompts you to install the Visual C ++ library.

Apache2.4.4 requires VC10 library support, Microsoft Visual C ++ 2010 SP1 Redistributable Package (x64)

PHP5.6 requires support from the VC11 library, Visual C ++ Redistributable for Visual Studio 2012 Update 1

Note 1: If the VC10 library is not installed in Apache2.4.4, the following error is prompted.

Error message: "unable to start this program because MSVCR100.dll is lost in the computer. Try to reinstall the program to solve this problem ."

NOTE 2: If the VC11 library is not installed in PHP5.5.0beta2, the following error occurs.

3. install Apache (under the root directory of the D Drive)

(1) Open the httpd. conf file under D: \ discuz \ Apache24 \ conf and use NotePad to open and edit the file as follows and save it.

Change ServerRoot "c:/Apache24" to ServerRoot "D:/discus/Apache24"; // the location of the Apache program.

It doesn't matter if the ServerAdmin of Row 3 is changed;

Remove the "#" before the ServerName in line 3;

Line 3: DocumentRoot "c:/Apache24/htdocs" changed to DocumentRoot "D:/discus/Apache24/htdocs"; // the root directory of the website

238th rows Change ;

Change DirectoryIndex index.html to DirectoryIndex index.html index. php index.htm in Row 3. // support more response pages

Line 2 ScriptAlias/cgi-bin/"c:/Apache24/cgi-bin/" changed to ScriptAlias/cgi-bin/"D:/discus/Apache24cgi-bin /"

370th rows Change

(2) start Apache.

Start --- run, Enter cmd, and open the command prompt. Enter the following commands respectively (Press enter on each line)

D:

Cd Apache24 \ bin

Httpd

If httpd. conf is correctly configured, enter httpd and press Enter. Do not close the command window (close the command window is close Apache), visit the local browser. If "It works" appears, It means that apache has been correctly installed.

(3) add Apache to the System Service

Close the httpd command window. Otherwise, an error will be reported.

Start --- run, Enter cmd, and then open a command prompt. Enter the following commands respectively (Press enter on each line)

D:

Cd Apache24 \ bin

Httpd.exe-k install-n "servicename" \ to join the service. Servicename is the name in the Service and can be customized.

If you want to uninstall the service, stop the service first, and then enter httpd.exe-k uninstall-n "servicename" to uninstall the service.

4. install PHP (under the root directory of the D Drive)

PHP5.5.0 is configured with php5apache2_4.dll. You don't need the PHP. ini file. You can use the default PHP file.

(1) Open httpd. conf under Apache24 \ conf and add

# Php5 support

LoadModule php5_module "d:/discuz/php/php5apache2_4.dll"

AddHandler application/x-httpd-php. php

# Configure the path to php. ini

PHPIniDir "d:/discuz/php"

(2) restart the Apache server.

Website folder D:/discuz/Apache24/htdocs create an index. php WITH THE CONTENT Save. Accessing the php information indicates that php has been successfully installed. For example.

5. Install MySQL

To install MySQL, simply run the cmd command. (Press enter on each line)

D:

Cd mysql \ bin

MySQLd -- install MySQL

Net start MySQL

Under the php Directory

Line 2; extension_dir = "ext", remove the previous ";" and change it to extension_dir = "d: \ discuz \ php \ ext"

Find extension and add the following two lines

Extension = php_mysql.dll

Extension = php_mysqli.dll

Extension = php_mbstring.dll (here it is mainly used for phpMyAdmin to support Chinese)

Restart httpd to test

; D: \ discuz \ php \ ext

PhpMyAdmin4.1.2Install

Http://www.phpmyadmin.net/home_page/downloads.php official website download

Decompress it to your website and directory and rename phpMyAdmin (my website root directory is: D: \ discuz \ Apache24 \ htdocs)

Find the libraries/config. default. php file in the phpMyAdmin directory.

Find the password and enter the mysql user and password.

$ Cfg ['servers'] [$ I] ['Password'] = '*****';

$ Cfg ['servers'] [$ I] ['user'] = 'root ';

Set $ cfg ['pmaabsoluteuri '] = ''To The phpMyAdmin directory path (for example, http: // localhost/phpMyAdmin /)

$ Cfg ['defaultlang '] = 'en'; you can set the encoding zh here.

$ Cfg ['ultconnectioncollation'] = 'utf8 _ general_ci '; sets the database encoding.

Test (apache and mysql have been started) Open http: // localhost/phpMyAdmin/and the following page appears, the installation is successful

Enter the user name and password you set before, and log on to the system.

Discuz Forum Construction

Create a new website and directory folder web under drive D,

Copy phpMyAdmin under D: \ discuz \ Apache24 \ htdocs to the web.

Change DocumentRoot in conf/httpd. conf file under apache to DocumentRoot "D:/web"

Change

Restart apache

Edit the test file web. php In the D:/web file.

You can open http: // localhost/web. php In the browser and the video is displayed successfully.

Discuz! X3 installation graphic tutorial

Download x3.1

Http://www.comsenz.com/downloads/install/discuzx

2. decompress and upload Discuz! X3 program to the server and modify the corresponding directory permissions
1. Upload Discuz! X3 program to the server
Extract the following three files:

All the files under the upload directory are available program files that need to be uploaded to the server;
The readme directory describes the product introduction, authorization, installation, upgrade, conversion, and version update logs;
The utility directory is a tool attached to the Forum, including the Upgrade Program.

Two separate methods are described here: local and Space

(1) Copy all files in upload to the web.
(2) If the file is uploaded to a space, use the FTP software in binary mode to upload all files in the upload directory.

(Common methods for setting FTP software binary: Click to View Details) Upload to space. As shown in:

(1) Enter http: // localhost/install/to display the installation directory.

(2) After the upload is complete, start to install Discuz in the browser! X3, run http://www.domain.com/bbs/install/ in a browser

Start a fresh installation (where the http://www.domain.com/bbs is your site access address)

After reading the authorization agreement, click "I agree". The system will automatically check the environment and file directory permissions, as shown in:

After the detection is successful, click "Next" to go to the detection server environment and the UCenter settings page, as shown in:

1. Select "Install Discuz! X (including UCenter Server )"
If you have not installed our products before and need to install them all, select this option.
2. Select "Install Discuz only! X (manually specify the UCenter Server that has been installed )"
If you have installed our product before and only want to upgrade it, select this option and ensure that the previous UCenter version is UCenter 1.6.0. If the previously installed UCenter Server is not upgraded, generally, the version is 1.5.1 or 1.5.2. You must first upgrade Ucenter to version 1.6.0. Otherwise, the installer will prompt an error and cannot continue. Here we will install Discuz! X is used as an example.

Create Database

Enter Password

Create a database

Mysql> create database discus;

Discus (Database Name, which can be specified by yourself)

Query OK, 1 row affected (0.02 sec) (SUCCESS)

Exit mysql

Exit;

Click "Next" to go to the database installation page, as shown in:

Enter Discuz! X database information and administrator information.
Click "Next", and the system will automatically install the database until it is complete, as shown in:

After the installation is successful, you are welcome to activate Discuz! Cloud Platform and Discuz! Application Center installation interface:

If you want to enable the cloud platform immediately, click "Activate Discuz! As shown in:

Activate Discuz! On the cloud platform, you can select "Do not activate now". You only need to log on to the background to activate it when you need to activate it.
If you want to install Discuz now! Click "install application now", and the founder logs on to the site background, as shown in:

Select the application to install.
After installation, enter Discuz! X homepage:

So far, Discuz! X3 has been successfully installed! You can log on to Discuz! Site X is configured.

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.