Installation graphics and text method for apache+mysql+php running environment under Windows _win Server

Source: Internet
Author: User
Tags anonymous manual documentation mysql client win32 root access server port

1. Install Apache

A) Double click on the file Apach_2.2.8_win32-x86-no_ssl.msi to eject the Welcome interface. A single Next button to enter the License Agreement (License agreement) interface.

b The user needs to agree to the terms in the interface to continue the installation. After selecting the I accept the terms in the License Agreement radio button, click the Next button, as shown in Figure 1, to enter the program description and description interface.

Figure 1

C After browsing the description and description of the program, click the Next button to enter the server information interface, as shown in Figure 2.

Figure 2

d The Server information interface requires the user to fill in the domain name, server name and admin email. Fill in your domain name (for example: goodwaiter.com) under network domain, in the server Name below your server (e.g. www.goodwaiter.com, host name plus domain name), in the administrator ' s Email Address to fill in the system administrator's contact e-mail addresses (such as: yinpeng@xinhuanet.com), the above three information for reference only, which contact e-mail address in the system when the failure to provide visitors, three of information can be arbitrarily filled out, invalid also line. Finally, there are two radio buttons, and if you select the default First radio button, the server is open to everyone and the server has a port number of 80, this is the recommended option. The second radio button is that the server is open only to the current user and the server port is 8080. Select the first option here, and then click the Next button to enter the Setup type interface, if 3 shows.

Figure 3

E in the Setup type interface, you can choose the installation types, there are typical default installation, customuser-defined installation of two kinds of installation, here to maintain the Custom installation option, click the Next button to enter the destination The Folder (path selection) interface, as shown in Figure 4. The Select installation options interface appears, as shown, with the left-click "Apache HTTP Server 2.0.55" selected, "This feature, and all subfeatures, would be installed on the local hard Driv E. "", that is, "this section, and subordinate parts, all installed on the local hard drive."

Figure 4

f) Click the Change button to select the installation path. Here the path is set to "D:\Apache2.2\" and click the Next button. (You selected, the general recommendation does not install the operating system on the disk, so that the operating system does not work, restore operation of the Apache configuration file also cleared.) )

g) Access to the file installation interface. This is the final step of the Apache installation, and the program starts the installation file. After the installation finishes, click the Finish button to end the installer.

h) When the installation is complete, the Apache server will automatically open. An icon appears in the lower-right corner of the desktop, when the Apache server starts, the icon style is, the server does not start, and the icon style is.

Click on the small icon, you will see the server turned on and off features, you can also right-click the small icon, the pop-up shortcut menu to choose Open Apache Monitor command, open the Apache monitor program.

i) after the server is turned on, the final test server is required. Open a browser window, enter "HTTP://127.0.0.1/" or "http://localhost" in the Address bar, and press ENTER to see the interface shown in Figure 5 (the following interface is seen in the tutorial, but I haven't seen this interface yet. Just see two English words it works, but it doesn't matter.

Figure 5

2. Install PHP5

After the Apache server has started successfully, you need to install PHP5. The procedure for installing PHP5 is as follows:

① the PHP5 installation file Php-5.2.6-win32.zip to the appropriate directory, such as C:\php-5.2.6-Win32, D:\php-5.2.6-Win32, and so on. This will be put into the D:\php-5.2.6-Win32 directory, as shown in Figure 2.1.

Figure 2.1

② copies all the DLL files in the directory to the system disk Windows\System32 directory (Windows 2000 users are under the Winnt\System32 directory).

③ Copy the file php.ini-dist to the system disk's Windows directory and rename it to PHP.ini.

④ opens the "; Extension=php_mysql.dll" line, which will precede the semicolon ";" Remove, so that PHP can support the MySQL database.

⑤ Save exit, PHP5 installation ended, but now the Apache server can not resolve php5 file, because there are some settings on the server side. How to set please refer to the 4th Chapter, "Configure Apache and PHP5".

3. Install MySQL

Open the download MySQL installation file mysql-4.1.14-win32.zip, double-click Decompression, run "Setup.exe", the following interface appears

The MySQL Setup Wizard starts, press "Next" to continue

Choose the installation type, there are "typical (default)", "Complete (Full)", "Custom (user-defined)" Three options, we choose "Custom", there are more options, but also easy to familiarize yourself with the installation process

Left-click on the "Developer components (developer part)", select "This feature, and all subfeatures, will is installed on the local hard drive.", that is, "this part, and the next Sub-part content, all installed on local hard drive. This is done on the MySQL server (MySQL servers), client Programs (MySQL client), and documentation (documentation) to ensure that all files are installed. Click Change ... to manually specify the installation directory.

Fill in the installation directory, my "D:\mysql" is also recommended not to be placed in the same partition as the operating system, so as to prevent the system backup restore time, the data is emptied. Press "OK" to continue.

Return to the interface just now and press "Next" to continue.

Confirm the previous settings and, if wrong, press "back" to redo. Press "Install" to start the installation.

is in the installation, please wait until the following interface appears

Here is to ask if you want to register a mysql.com account, or use the existing account login mysql.com, generally do not need, click "Skip Sign-up", press "Next" skip this step.

Now the software installation is complete, the above interface, there is a good function, the Mysql Configuration Wizard, not to the same as before, their own manual mess configuration My.ini, will "Configure the Mysql Server now" in front of the tick, point "Finish "End the installation of the software and start the MySQL Configuration Wizard."

The MySQL Configuration Wizard starts the interface and presses "Next" to continue.

Select the configuration mode, "Detailed Configuration (Manual precise configuration)", "Standard Configuration (Standard configuration)", we choose "Detailed Configuration" to facilitate familiarity with the configuration process.

Select server Type, "Developer Machine (Development test class, MySQL takes very little resources)", "Server Machine (server type, MySQL takes up more resources)", "dedicated MySQL server Machine (dedicated database server, MySQL occupies all available resources) ", we choose according to their own type, the general election of" server Machine ", not too little, will not fill.

Choose the approximate use of MySQL database, "Multifunctional db (Universal multi-function, good)", "Transactional database only (server type, focus on transaction, General)", " Non-transactional Database only (non-transactional processing type, simpler, mainly do some monitoring, counting, MyISAM data types of support limited to non-transactional), with their own use and chose, I choose here " Transactional Database only, press "Next" to continue.

InnoDB tablespace configuration, is to InnoDB database files to choose a storage space, if modified, to remember the location, when reloading to choose the same place, otherwise it may cause database damage, of course, to do a backup of the database is no problem, here is not detailed. I have not modified here, use the default location, press "Next" to continue

Select the general MySQL traffic for your site, the number of simultaneous connections, "Decision Support (DSS)/olap (20 or so)", "Online Transaction Processing (OLTP) (500 or so)", " Manual Setting (manually set, lose a number) ", I choose" Online Transaction Processing (OLTP), your own server, should be enough, press "Next" to continue

Whether to enable TCP/IP connections, set the port, if not enabled, you can only access the MySQL database on their own machine, I am enabled here, the front of the tick, Port number:3306, press "Next" to continue

This is more important, is the MySQL default database language encoding settings, the first is the western code, the second is multibyte universal UTF8 encoding, is not our common code, here Select the third, and then in character set there to select or fill in "GBK", of course, can also use " gb2312 ", the difference is that GBK's font size, including the gb2312 of all Chinese characters, and add traditional characters, and other messy words-when using MySQL, run the data Operation command before the" SET NAMES GBK; " (Run once on the line, GBK can be replaced by other values, depending on the settings here), you can normally use Chinese characters (or other text), otherwise can not display Chinese characters normally. Press "Next" to continue.

Choose whether to install MySQL as a Windows service, or you can specify the service name (Services identity name) and whether to add MySQL's Bin directory to Windows PATH (after joining, you can use the file directly under bin without having to indicate a directory name, such as a connection, "Mysql.exe-uusername-ppassword;" On it, do not point out the full address of mysql.exe, very convenient, I have all ticked here, Service name unchanged. Press "Next" to continue.

This step asks if you want to modify the default root user (super Admin) password (default is null). New root Password "If you want to modify it, fill in this password (if it's a reload, and you've already set a password, you may have an error changing the password here, leave it blank, and" Modify Security Settings "in front of the check out, the installation configuration is completed after a separate change password)," Confirm (again) "to fill in again, to prevent the wrong. "Enable root access from remote machines (whether or not to allow root users to log on to other machines, if you want to be safe, do not hook, if it is convenient to hook it up)". Finally "Create a Anonymous account (a new anonymous user, anonymous users can connect to the database, cannot manipulate data, including queries)", generally do not have to tick, set up, press "Next" to continue.

Verify that the settings are correct, and if so, press "back" to return to check. Press ' Execute ' to make the settings effective.

Set up, press "Finish" to end the installation and configuration of MySQL--here is a more common mistake, is not "Start service", generally appear in the previous installation of MySQL server, the solution, first of all, to ensure that the MySQL server installed before the total uninstall off the , if not, check to see if the previous password has been modified according to the above, the operation above; if still not, the MySQL installation directory of the Data folder backup, and then deleted, after the installation is completed, will install the generated Data folder deleted, the backup of the data folder to move back, Restart the MySQL service, in which case you may need to check the database and fix it once to prevent data errors.

4. Configure Apache and PHP5

To use the Apache server to support PHP files, you need to make some settings in the Apache configuration file httpd.conf. The location of the httpd.conf file is located in the Conf directory under the Apache root directory, mainly set up the following content.

♫ Find the LoadModule configuration block and add the following information at the end of LoadModule:

LoadModule Php5_module D:\php-5.2.6-Win32\php5apache2_2.dll

The results of the added file are shown in Figure 4.1.

Figure 4.1

♫ Modify the DocumentRoot parameter to modify the root directory of the Apache server master. The location of the original root directory is the Apache2.2\hotdocs directory where the user can specify any location, such as:

DocumentRoot "d:/htdocs/"

Below the DocumentRoot 28 lines of the position, there is a behavior <directory "d:/apache2.2/htdocs/", changed to <directory "d:/htdocs/". (Note that DocumentRoot and the values here are consistent.)

♫ add PHP extensions that you want the Apache server to recognize. The code added is as follows:

AddType application/x-httpd-php.php

Add the location as shown in Figure 4.2.

♫ default display page. The default display page for Apache is index.html. That is, when the server does not named the file, first look for index.html, if you find index.html, then the server will load the file, otherwise display the list of files in the directory. Add a PHP default page index.php here. The changed code is as follows:

DirectoryIndex index.html index.php

(In fact, do not necessarily have to "index.html", such as "test.php", etc., CAN)

♫ Modify the Apache port number. Apache's port number is 80. To modify the value of the option listen, you can modify the port number, such as 82, then the changed code is as follows (generally do not change):

Listen 82

When the above configuration is complete, restart the Apache server.

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.