Configuring apche + php + mysql in linux recently requires servers to learn about android network development. Therefore, configuring apche + php + mysql in linux takes ubuntu as an example.
Configuration process: 1. install apache
Enter sudo apt-get install apache2 on the terminal
After the installation is complete, open http: // localhost/or http: // 127.0.0.1 in the browser. if the following interface appears, congratulations, apche2 has been installed successfully.
2. install php
Enter sudo apt-get install php5 on the terminal
Enter y to continue,
After the installation is complete, you can test whether php is successfully installed.
First, enter the following command on the terminal:
cd /var/wwwsudo gedit phptest.php
Enter the test text in the new text. enter php install success here!
Finally, enter http: // localhost/phptest. php in the address bar of the browser. if the test text is displayed, it indicates that php has been installed successfully.
3. install mysql
Enter sudoapt-get install mysql-server on the terminal
During the installation process, you need to set a password for mysql, and then enter it.
After the installation is successful, enter the sudoapt-get install libapache2-mod-auth-mysql on the terminal to make apche2 support mysql; then enter the sudoapt-get install php5-mysql to make php5 support mysql.
4. restart apache
Enter sudo/etc/init. d/apache2 restart on the terminal to restart apche2. in this way, all the apache + php + mysql configurations in linux are complete, and then you can perform web development.