1:apache Introduction
Apache is the world's top-ranked Web server software, which can run on almost all widely used computer platforms due to its widespread use across platforms and security, is one of the most popular Web server-side software. Apache, meanwhile, is a tribe of North American Indians called Apache, in the southwestern part of the United States. is also the name of a foundation, an armed helicopter and so on.
2:mysql Introduction
MySQL is a relational data management system developed by the Swedish MySQL AB company, currently owned by Oracle Corporation. MySQL is an associative data management system that keeps data in separate tables rather than putting all of the data in a large warehouse, which increases speed and increases flexibility. MySQL's SQL language is the most commonly used standardized language for accessing databases
Currently, the popular web site architecture in the Internet is lamp (Linux+apache+mysql+php/perl/python) and Lnmp (Linux+nginx+mysql+php/perl/python), Even with Linux as the operating system, Apache and Nginx as a Web server, MySQL as a database, Php/perl/python as a server-side script interpreter. Since all four of these software are free or open source software (FLOSS), it is possible to build a stable, free website system without spending a penny (except labor costs) in this way.
3: Introduction to the website system
Website system is also known as the site CMS system, the main purpose is to save the cost of Web site development and development of the construction station system. The early Web site system is generally called self-help station system. Now the website system is divided into Enterprise website system, forum system, portal station system and Shopping Network
All right, let's start building up here.
1: Install apache2.0
#sudo Apt-get Install Apache2
www.linuxidc.com @linux: ~$ sudo apt-get install apache2
After the installation is complete, open in the browser: http://localhost/or input http://127.0.0.1 The result is the same.
To restart Apache:
www.linuxidc.com @linux: ~$ sudo/etc/init.d/apache2 Restart
* Restarting Web server apache2 apache2:could not reliably determine the server ' s fully qualified domain name, using 127. 0.1.1 for ServerName
... waiting apache2:could not reliably determine the server ' s fully qualified domain name, using 127.0.1.1 for ServerName
2: Install PHP
Turn on the terminal in turn
sudo apt-get install php5
sudo apt-get install LIBAPACHE2-MOD-PHP5//configuration apache+php
Sudo/etc/init.d/apache2 restart
Test server:
sudo gedit/var/www/testphp.php
Then enter some content to save it.
Okay, just type http://localhost/testphp.php or http://127.0.0.1/testphp.php in your browser.
If displaying what you have entered is a success
4. Install MySQL
sudo apt-get install Mysql-server
You will be prompted to set the root password during the installation process.
5: Let appache,php support MySQL
sudo apt-get install Libapache2-mod-auth-mysql
sudo apt-get install Php5-mysql
Restart again
Sudo/etc/init.d/appache2 restart
Well, Apache2+php+mysql's environment is complete.
Reference Link:
Http://www.cnblogs.com/LiteraturePan/archive/2012/03/02/2377097.html
Http://www.linuxidc.com/Linux/2012-12/75286p2.htm
Apache2+php+mysql Environment Configuration