Before the Windows Write Hello World, after all, is not enough Ah, because the development environment is Linux, how to do it ~ ~ ~ Learn to learn and learn again
Written in front of the words: I from the Baidu Library of an article picked out, the original article name "Linux installation Apache+php+mysql build PHP running Environment"
Http://wenku.baidu.com/link?url=7A49L1QOIznRoJVz7fC6qaHGiCHTYacwYTLZJEIT_E7URXqgoftdsZdl0tLfKn2n_Tb8PPZ4LqYsA_ f1xn5jbovpir-ag7quvmppx34ft9a
Installation environment: Red Hat 4.8.2-16
Required installation software:
An Apache installation
1 checking, deleting, installing
Rpm-qa|grep httpd // Check if ApacheRPM-E package name is installed--nodeps // If any , remove PS: I did not delete, Directly with the original server.
Yum install httpd //installation, follow the prompts, enter Y to install the success
2 Start, test
/ETC/INIT.D/HTTPD start
Note: You can use/ETC/INIT.D/HTTPD Status/stop/start/restart to View status/stop/start/restart respectively
You can also use the service httpd status/stop/start/restart command, with the same effect
Enter the server IP in the Windows browser and view the page as follows to indicate that the Apache installation was successful
Two install MySQL
1 checking, deleting, installing
rpm-qa|grep-i MySQL // Check if the MySQLrpm-e package name is installed--nodeps // Delete If any, there are some libraries and header files, None of my side, after installation, had not been found in the path he had said. // installation, as prompted, enter Y to install successfully. If you are prompted for a lack of dependency, use the Yum install directly, I have not met
2 Configuring, booting
Three-install PHP
1 installation
// Install PHP // installing components, supporting MySQL
2 Configuring, booting
- The original article wrote a lot of configuration, I do not know what to do, temporarily did not follow his change
- Start: Restart httpd mysqld
- After you finish writing the PHP program or modify the program, execute the command service php-fpm Reload Reload
Four-Test
1 Test procedure
2 Put it in the root directory of PHP ,
- and perform service php-fpm reload
- Can also be configured yourself: cat/etc/httpd/conf/httpd.conf (documentroot "/var/www/html/")
- You can also modify the file path such as:/var/www/html/test/index.php.
- The corresponding access URL is ip/test/index.php
3 in the browser page access ip/index.php ip/index1.php, the following page
"PHP" Linux build PHP running environment