Windows Server 2008/2012 installation PHP IIS7 mysql Environment tutorial _php instance

Source: Internet
Author: User
Tags install php


Windows Server 2008/2012 installs the PHP IIS7 MySQL environment to set up a tutorial, the details are as follows



1. Install IIS



The IIS version of Windows Server 2008 is 7.0, including fastcgi, which is easy to install.



Open the Start menu → server management, the server Management interface appears 


Scroll down, or click "Role" on the main menu, click "Add Role", click Next when the wizard page appears, and select "Web Server (IIS)" 


After clicking "Next", you need to select a feature, where you need to add a "CGI" more than the default option 

Click "Next", you will need to confirm the installation of the content, click on the installation, you can install IIS in the operating system.



After you install IIS, you need to do a test, enter "http://localhost/" in the browser address bar, and if the IIS7 Welcome page appears, it is OK. Next need to match
To set up a new Web site, first open IIS Manager (start → All programs → administrative tools → Internet Information Services (IIS) manager).



Then delete the default Web site, in the main menu, expand the Site menu, and then the site name on the right button, click Delete 



And then create a new website, on the "site" on the right click, click Add Site, will appear in the information site added form, first enter the site name, such as "Dedecms", the path chosen for the site to store the path, single IP server can not choose IP, host head fill in as localhost, then click OK.









After adding a good site, open the Site directory, create a new index.html, and then open with Notepad, enter "Hello Dede" to do the test.



Also need to configure permissions, return to IIS Manager, on the website "Dedecms" on the right, click "Edit Permission", enter the "Security" tab, and then click "Edit" 







Click the "Add" button when you open the edit window. Add a "IUSR" to the list of permissions users, and then tick the permissions except Full Control. Then click "OK". 



You also need to click OK again in the Properties window, otherwise permissions cannot be saved.



After you finish this step, you can access the local address "http://127.0.0.1" for testing, and the page displays "Hello Dede", indicating that the configuration was successful.








2.php Installation



As mentioned earlier, IIS7 do not have to install fastcgi separately, so we only need to download the PHP installation package for installation, download the address: http://windows.php.net/downloads/releases/archives/



After downloading, open the installer, after booting, configure the path, to choose "Web Server Setup" where we choose "IIS fastcgi" 


Then click the "Next" button, to choose the installation option, the general installation of the default on it, if you want to add words need to click on the previous disk small icon, and then choose to install, the first is to install only the selected items, the second is to install all the project subprojects.  after configuration, go to the next step






Once configured, click "Next" and click "Install" To install PHP.



After the installation is complete, we still need to test, open the newly created Web site directory, create a new test.php file, open with Notepad, enter


<?php

Echo phpinfo ();

? >


Save exit, and then access http://127.0.0.1/test.php from the browser



Displays PHP information, which indicates that the PHP environment was successfully installed.



3.mysql Installation (Note: The following steps also apply to MySQL installation of Windows Server 2008)



MySQL (http://www.mysql.com), the installation process is relatively simple, first configure the path, and then choose the installation options, generally using the default installation method, and then enter a Configuration Wizard interface 


Continuous next, you need to choose the configuration mode, here Select the configuration, we need to manually configure, so select detailed configuration, then click "Next" 



Here you need to select the server type, if it is a test environment for development, select Developer Machine, if the server is used, then select Server Machine, when
However, a single purpose server can also choose dedicated MySQL server machine. Choose good and go to the next step



Next, select the server to use, the first is a multi-function database, you can use InnoDB engine and MyISAM engine. The second option, which has a performance bias
InnoDB, but supports MyISAM engine at the same time. The third option is the MyISAM that is biased towards the analysis feature. As for these three options, what is the difference, in fact, as long as you know
, the MyISAM type of database engine can provide PHP with powerful retrieval and analysis capabilities. The performance of InnoDB is biased towards storage.



So if you are only doing a Web server, select the third item, and if there are other uses, it is recommended that you select the first item.








Next, you need to select the number of connections on the server, where the test of the small server can choose the least first, if the traffic is huge site, you need to select the second item, or the third to fill out their own.



After the network connection options, "Enable TCP/IP networking" can be selected according to demand, if not to do the cluster can be removed, if it is in the intranet
Environment, do not make a routing rule for MySQL is completely open to this item. You can add a firewall exception to port 3306 directly. The port number can be selected, but the default 3306 is recommended.



Another is whether to open rigorous mode, this recommendation is checked


Click Next to select the default character set, where you choose the custom UTF8 character set 


To move to the next step, you need to set Windows options, which are recommended for installing Windows services and starting automatically. The second option, if necessary, optionally adds an environment variable that can be easily pointed to by the command line. 


Once configured, enter the next step, you need to set the password for the root user, there is also an option to allow root users from remote logins, it is best not to tick, or security will be reduced.



To this configuration is all over, click Next, will appear installation summary, click "Execute" to perform the installation.



After the installation is successful, we still need to test this.



The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.


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.