Install Apache Mysql PHP and apachemysql in Basic windows
This article mainly describes some steps and opinions on installing the wamp environment on my own, and provides a multi-chart warning in front. Please be careful !!!!!
PHPRunning environment:
LinuxThree installation methods: source code package installation, rpm package installation, and integrated environment installation (lnmp)
Two installation methods for windows: download and install a single, integrated environment (AppServ, phpstudy,Wamp)
Install the PHP development environment on Windows:
Independent installation of required software:
Preparations before installation
Install Apache
Install MySQL
Install PHP
Install phpMyA
Software name |
|
Apache download |
Http://httpd.apache.org/download.cgi |
PHP download |
Http://www.php.net/downloads.php |
MySQL |
Http://dev.mysql.com/downloads/mysql/. select the free installation version. |
PhpMyAdmin |
Http://www.phpmyadmin.net |
ApacheEnvironment installation:
Double-click the httpd-2.2.21-win32-x86-no_ssl.msi to start the installation. The installation welcome page is displayed.
Click "Next" to continue. The authorization protocol is displayed.
Select "I accept the terms in the license agreement" to agree to the authorization protocol, and click "Next" to continue. the installation instructions are displayed.
Click "Next" and the information filling page is displayed.
Set "Network Domain" to your Network Domain name, such as admindomain.com. If you do not have a Network Domain name, enter it as needed.
Set "Server Name" to your Server Name, for example, www.admindomain.com, that is, the host Name. If you do not have one, enter it as needed.
Administrator's Email Address fill in the system Administrator's contact Email Address, such as webmaster@admin10000.com. The contact email address will be provided to visitors when the system fails.
Tip: Because we install apache mainly for development on the local machine, you can enter localhost in the first two items. The above three items can be filled in at will, and can be modified in the httpd. conf file later.
There are two options below. The first one is to install the software for all users of the system, use the default port 80, and start the software automatically as the system service. The other one is to install the software only for the current user and use port 8080, start manually. Select the first "for All Users, on Port 80, as a Service-Recommended ". Click "Next" to continue.
The "Select installation type" page appears, where Typical is a Typical installation and Custom is a customized installation. Here we select Typical and press "Next" to continue.
Click "Change..." to manually specify the installation directory. Here, we install Apache to "D: \ Apache \". You can decide where to install it. We recommend that you do not install it on the disk where the operating system is located (usually the drive c). Otherwise, the Apache configuration file will be cleared after the operating system breaks down. After specifying the installation directory, click "Next" to continue.
Confirm that the installation options are correct. Click "Install" to start installation. If you want to check again, click "Back" to return to the check step by step.
The installation progress appears. Wait for a while and then the following interface appears.
Click "Finish" and a green icon will appear in the status bar in the lower right corner.
Indicates that Apache has started properly.
Enter http: // localhost/or http: // 127.0.0.1/in the browser to view the following interface.
Install MYSQL:
Open the mysqlinstallation file mysql-5.0.27-win32.zip, decompress the file, and run “setup.exe. The following interface is displayed:
Click "Next" to continue. The authorization protocol is displayed.
Select "I accept the terms in the license agreement" to agree to the authorization protocol, and click "Next" to continue. in the installation type selection window, "typical (default)" appears) "," Complete (Complete) "," Custom (Custom) "three options, we choose" Custom ", because custom settings allow us to familiarize ourselves with the installation process, which is helpful for learning MySQL database. Click "next" to continue the installation ,:
On the custom installation page, select the mysql database installation path. Here, I set "d: \ Program File \ MySQL" and click "next" to continue the installation ,:
Next, go to the installation preparation page. First, confirm the previous settings. If there is an error, press "back" to return. If there is no error, click "Install" to continue the installation ,:
After clicking the "Install" button, the following page is displayed ,:
Click "next" on this page.
Note that you should select the "Launch the MySQL Instance Configuration Wizard" option above. This is the Configuration for starting MySQL, and it is also the most critical (you can also set it later). Click "Finish, go to the configuration page.
The installation of the MySQL database is very simple. The key is the configuration after the installation is complete. After you click Finish, the following Configuration Wizard appears, and click "next" to configure the database ,:
In the open Configuration type window, select the Configuration method, "Detailed Configuration (manual precise Configuration)", and "Standard Configuration". To familiarize yourself with the process, select "Detailed Configuration (manual precise Configuration)" and click "next" to continue ,:
In the displayed window, select the Server type, such as Developer Machine, Server Machine, and Dedicated MySQL Server Machine) ", we only use it for learning and testing. By default, We can click" next "to continue ,:
On the displayed configuration page, select the mysql Database usage, such as "Multifunctional Database (Universal multi-function type)" and "Transactional Database Only (server type) "," Non-Transactional Database Only (Non-transaction processing type) ", here I select the first item, general installation, click" next "to continue the configuration ,:
On the page that appears, configure InnoDB Tablespace to select a bucket for the InnoDB database file. If you modify it, remember the location and select the same place for the reinstallation, otherwise, the database may be damaged. Of course, it is okay to back up the database ,:
On the displayed page, select the mysql access volume and the number of connections at the same time. For example, "demo-support (DSS)/OLAP (about 20)" and "Online Transaction Processing (OLTP) (about 500), Manual Setting (Manual Setting, set to 15) Here select Manual Setting, click "next" to continue ,:
By default, Mysql starts the TCP/IP network, and the port number is 3306. If you do not want to use this port number, you can also change it through the drop-down list box, but you must ensure that the port number is not occupied. The Add filewall exception for this Port check box is used to register this Port number on the firewall. Select this option here and Enable Strict Mode check box is used to start the standard MYSQL Mode, in this way, MYSQL will strictly check the input data, and small syntax errors are not allowed. It is not recommended for beginners to select this item to avoid troubles, I have selected this option. If you do not select this option, click "next" to continue ,:
On the open character encoding page, set the character encoding to be used by mysql. The first is the Spanish encoding, the second is the multi-byte universal utf8 encoding, and the third is manual, we choose UTF-8, if there is no UTF-8 encoding here, when using JDBC to connect to the database, it will appear garbled, at that time, you need to add the following code "useUnicode = true & characterEncoding = UTF-8" to solve the garbled problem, for future convenience so set to UTF-8 encoding, but there is a problem, that is, when you use the console to insert Chinese characters, an error is reported. When querying a table with Chinese characters, the Chinese characters cannot be displayed. After each entry to MySQL, set a system parameter "set names gbk" to solve the problem. Click "next" to continue the configuration ,:
On the page that appears, select whether to install mysql as a windows Service. You can also specify the Service Name (Service ID Name) and whether to add the mysql bin directory to the Windows PATH (after adding it, you can directly use the file in bin without specifying the directory name, such as connection, "mysql-u username-p password;". Click "next" to continue the configuration ,:
On the displayed page, set whether to change the password of the default root user (Super administrator) (empty by default) and "New root password". To change the password, enter the New password here, enable the root remote access function. Do not create anonymous users. Click "next" to continue the configuration ,:
All configuration operations have been completed. Click Execute to Execute the configuration ,:
After a few minutes, the following prompt appears, indicating that the MySQL configuration is complete and that the prompt is successful.
Start the mysql database in the service, and enter "mysql-h localhost-u root-p" or "mysql-h localhost-uroot-p password" in the Command window ", then, enter the user's password in the prompt ,:
PHP environment installation:
A. install Apache
B. install PHP (you only need to extract the compressed package to the corresponding location)
C. PHP configuration
Change php. ini-dist to php. ini. 486 and
Extension_dir = "D:/php-5.2.6/ext"
D. Configure the Apache configuration file httpd. conf.
# Loading the PHP Module
LoadModule php5_module "D:/php-5.2.6/php5apache2_2.dll"
# PHP configuration file location
PHPIniDir "D:/php-5.2.6"
# Which types of files will be processed by the PHP engine?
AddType application/x-httpd-php. php
E. Restart Apache
Modify the httpd. conf configuration file
A) Modify row 177th and reset the document root directory.
DocumentRoot "D:/ftp/Public/www"
B) modify the website directory of row 244th to be consistent with the document root directory.
<Directory "D:/ftp/Public/www">
C) Modify row 187th to set the website root directory access permission
<Directory/>
Options FollowSymLinks
AllowOverride None
Order allow, deny
Allow from all
</Directory>
D) Modify row 240th to set the default website document (if the configured html document does not exist, all files under the root directory of the website will be listed)
DirectoryIndex abc.html
E) restart the apache service.
PHP configuration
LoadModule php5_module "D: \ Program Files (x86) \ Apache Software Foundation \ php5.2.6 \ php5apache2_2.dll"
PHPIniDir "D: \ Program Files (x86) \ Apache Software Foundation \ php5.2.6"
AddType application/x-httpd-php. php
In this way, the installation is quite simple, that is, there are a lot of steps and I am exhausted. If you have any questions, please kindly advise.