php5.6-apache2.4-mysql5.6 Environment configuration (win7_64 bit), php5.6apache2.4
-----------------------------------------------------
★ Software Tools: (note download the corresponding version, different version of the installation details may be differences!!) )
1>httpd-2.4.18-win64-vc14.zip Download Address: http://www.apachelounge.com/download/
2>php-5.6.16-win32-vc11-x64.zip Download Address: http://windows.php.net/download/
3>mysql-5.6.29-winx64.zip Download Address: http://dev.mysql.com/downloads/mysql/
4> mysql-front Download Address: http://www.mysqlfront.de/
-----------------------------------------------------
★ Pre-installation Required know: win7 Configuring environment variables (MySQL for example)
(The environment variable with the corresponding command is configured without the "Go to Directory" action)
Copy the absolute path of the MySQL-installed/bin to a location such as 7 (note that each path ends with a; number), and then determine the change
--------------------------------------------------------------------
First, installation configuration Apache2.4.18 (Httpd-2.4.18-win64-vc14.zip)
1> Enter the httpd-2.4.18-win64-vc14.zip download address to download this package. (e.g.)
(Download address: http://www.apachelounge.com/download/)
2> Extract the downloaded Httpd-2.4.7-win64-vc11.zip from the Apache24 folder and put it in your installation directory (my directory is d:/file/phpenv)
3> then go to the Conf directory under the Apache24 folder (apache24/conf/), find the httpd.conf file and open it with Notepad and modify some of the contents.
(The following path related should be based on their own decompression path to do the corresponding changes!!) )
(1) Modify the root path of the ServerRoot Apache:
< Panax Notoginseng Line > ServerRoot "C:/apache24" changed to = = ServerRoot "D:/file/phpenv/apache24"
(2) modify servername Your host name:
(255 lines) ServerName www.example.com:80 removes the previous #, which is required when launching Apache from the command line.
(3) modify DocumentRoot Apache access to the home folder directory, is the location of PHP, HTML code files. Apache default path is under Htdocs (Apache24/htdocs), there will be a simple entry file index.html. This path can be modified on its own, I am here to configure it in my own new www folder (d:/file/phpenv/www), according to their own needs to make the corresponding changes.
(249 lines) DocumentRoot "C:/apache24/htdocs" <Directory"c:/apache24/ Htdocs "> changed to = DocumentRoot" d:/file/phpenv/www "< "d:/file/phpenv/www">
(4) Modify the Portal file configuration: DirectoryIndex generally we are index.php, index.html, index.htm as the portal for Web projects. Apache Default portal only index.html need to add the other two support, of course, the settings of this portal file can be increased or decreased according to their own needs, if the requirements are more stringent can only write a index.php, so that the entry in the project can only be index.php
(282 lines) < Ifmoduledir_module > directoryindex index.html
ifmodule> Change to = < Ifmoduledir_module > directoryindex index.php index.htm index.html
ifmodule>
(5) Set the Serverscript directory:
(366 lines) scriptalias/cgi-bin/"c:/apache24/cgi-bin/" to = = scriptalias/cgi-bin/"D:/file/phpenv/apache24/cgi-bin"
(6) Change Cgi-bin directory:
(382 lines) < Directory "C:/apache24/cgi-bin" > allowoverride None Options None Require all granted
Directory > changed to =<"D:/file/phpenv/apache24/cgi-bin" > allowoverride None Options None Require all granted
Directory >
4> then we can launch Apache.
Mouse click (start) à (run) (or win+r), enter cmd, open command prompt.
Then enter the D:/file/phpenv/apache24/bin directory to enter httpd enter.
CMD into the specified directory command (take my path as an example): D: carriage return CD d:/file/phpenv/apache24/bin carriage return
You can test without an error (Keep the command window open for the state!!!!!! )。
(If you configure the environment variable for the httpd command, you do not have to "go to the Directory" action)
You can put the index.html in the Apache24/htdocs directory under the D:/file/phpenv/www directory and enter the address in the browser: Localhos or 127.0.0.1 access will appear "It works" This means that Apache is properly installed and started.
You can also write a simple index.html file or open it yourself.
5> Add Apache to the window service startup entry and set it to boot
1. Turn off the httpd service first (Close the command window in ❹)
2. reopen a new command window into the D:/file/phpenv/apache24/bin directory:
The command to add the HTTP service is: Httpd.exe-kinstall-n "ServiceName" ServiceName is the name of the service, I added: Httpd.exe-k install-n "Apache24" After the command succeeds, you will be prompted to see the Apache24 Service in the Window service startup item.
3. then click on to start, if you do not want to set up the boot, you can also modify the startup type to Manual.
4. If you want to uninstall this service, first stop the service, then enter Httpd.exe-k uninstall-n "Apache24" to uninstall the service.
5. Of course, you can also start Apache by d:/file/phpenv/apache24bin the following ApacheMonitor.exe
So the Apache configuration is basically done.
--------------------------------------------------------------------------
Second, installation configuration php-5.6.16 (php-5.6.16-win32-vc11-x64.zip)
1> Enter the php-5.5.16-win32-vc11-x64.zip download address to download this package. (e.g.) to download the thread-safe version of PHP!!!!!!!!
(Download address: http://windows.php.net/download/)
After opening the link, select the appropriate version and go to the download page (please note that the downloaded version!!!!! )
2> Unzip the downloaded php-5.5.10-win32-vc11-x64.zip to install to your favorite directory my Yes (d:/file/phpenvphp)
3> Copy the Php.ini-development file in the directory and rename it to php.ini it is a php configuration file
4> add PHP support for Apache Services
Open the Apache configuration file http.conf and add the following code at the end:
Apache joins PHP note space (below is the correct wording) PS: I pretend because of this problem start Apache24 delayed for a long time "
# php5 Supportloadmodule php5_module d:/file/phpenv/php/php5apache2_4.dlladdtype application/x-httpd-php. php. html. htm# Configure Thepath to Php.iniphpinidir "d:/file/phpenv/php"
I was added underneath the LoadModule
Add the time to ensure that your Php5apache2_4.dll file does exist php5.5 earlier version of the file does not have this, but the high-point version is already available, you can open the PHP installation directory to find this file
Phpinidir "d:/file/phpenv/php" This is your PHP root directory.
5> Restart the Apache server.
6> test.
Delete other files in WWW index related files, create a new index.php, the content is saved, access to the information that appears in PHP indicates that PHP has been successfully installed.
Note:
Some common configuration changes in PHP: (D:/file/phpenv/php/php.ini)
Settings for time zone: Date.timezone = Asia/shanghai
Error Reporting level: Error_reporting = E_all This can all be opened in development mode.
---------------------------------------------------------------------------
Three, installation configuration mysql-5.6.29 (mysql-5.6.29-winx64.zip)
1> Enter the mysql-5.6.29-winx64.zip download address to download this package. (e.g.)
(Link: http://dev.mysql.com/downloads/mysql/)
1) After opening the link, select the appropriate version and then go to the download page (please note that the downloaded version!!!!! )
2) Select "No Thanks, just start my download." No, thanks, start my download "To download the
2> Install (unzip): Unzip to your favorite folder
3> Configure default Files
Under the Mysql-5.7.10-winx64 directory, create a new My.ini. Copy the following code to save it. My.ini will replace the following My-default.ini file. INI file is a configuration file inside the window. Save the various default data inside.
Replace the code in the My.ini with the following code (change the two code of the installation path to its own path!!!) ):
[mysql]# set MySQL client default character set Default-character-set=utf8 [mysqld] #skip-grant-tables# set 3306 port = 3306 # Set the MySQL installation directory basedir=d:\file\phpenv\mysql\mysql-5.6.29-winx64# set the data storage directory for the MySQL database datadir=d:\file\phpenv\mysql\ mysql-5.6.29-winx64\data# allow maximum number of connections max_connections=200# the character set used by the service side defaults to a 8-bit encoded latin1 character Set character-set-server=utf8# The default storage engine that will be used when creating a new table Default-storage-engine=innodb
4> Enter the command-line window as an administrator to install the MySQL service
(The following CMD enters the path operation, if the environment variable is configured without entering the/bin directory)
In cmd into the mysql-5.6.29-winx64.zip extracted from the/bin directory (enter the corresponding directory command: CD d:.../.../...)
Input mysqld install MySQL
(Remove the service: SC delete mysql//MySQL here is the service name you want to delete)
Then enter the net start MySQL startup service
After successful as (I have already configured the environment variable so directly enter the installation command and start command on the line):
5> set a new password for the first time
/bin directory input mysql-uroot-p, default is no password, directly press ENTER (I have set the password)
Follow these steps to add a database password:
1. Enter MySQL database:mysql> use mysql;database changed2. Set a new password for the root user mysql> update user set Password=password ("New password") where user= "root"; Query OK, 1 rows affected (0.01 sec) rows matched:1 changed:1warnings:03. Refresh the database (always remember to refresh) Mysql>flush privileges; Queryok, 0 rows Affected (0.00 sec) 4. Quit mysql:mysql> quit
6> add MySQL support for PHP
1) (736 lines); extension_dir = "ext", remove the front ";" and change to Extension_dir = "D:\phpEnv\php\ext" to open PHP extension support, Ext folder has a lot of PHP extension support . dll files, interested can see.
2) And then it's the MySQL extension that opens PHP.
(890, 891 lines) remove the front ";" Extension=php_mysql.dll Extension=php_mysqli.dll
Of course you can also open 895 rows of Php_pdo_mysql.dll enable PHP PDO support I usually use this.
Note: There are many expansion options, what you need to use, remove the front ";" You can do it. Of course if you want to add additional extension support such as Redis support, PHP itself may not provide the corresponding DLL files, you need to find the appropriate version of the DLL to add to the Ext folder, and then add a extension= in the configuration file ...
3) after completion, restart Apache24
You can see it when you visit Phpinfo (enter the address in the browser: localhost or 127.0.0.1)
7> MySQL GUI management software installation (here is : mysql-front):
1) Go to download link to download the latest version of Mysql-front:
(Mysql-front download Address: http://www.mysqlfront.de/)
2) To start the installation (a full picture form description):
Starting from: 2016.3.24
http://www.bkjia.com/PHPjc/1112812.html www.bkjia.com true http://www.bkjia.com/PHPjc/1112812.html techarticle php5.6-apache2.4-mysql5.6 Environment configuration (win7_64 bit), php5.6apache2.4--------------------------------------------------- --★ software tool: (note download the corresponding version, ...