Before the computer changed the ubuntu16.04, the local need to reconfigure, but forget all, so reconfigure a bit, and then this record.
Install Apache:
sudo apt-get install apache2
To restart Apache:
Sudo/etc/init.d/apache2 restart
----------------------------------------------------------------Split Line------------------------------------------------------ -----------------
Install MySQL:
1, sudo apt-get install Mysql-server
2, sudo apt-get install mysql-client
3, sudo apt-get install Libmysqlclient-dev
The user will set the MySQL password at the time of installation
Check that the module is installed successfully: sudo netstal-tap | grep MySQL
If a MySQL socket is in the listen state to indicate a successful installation
Login Mysql:mysql-u Root-p
----------------------------------------------------------Split Line------------------------------------------------------------ ---------------
Install PHP:
sudo apt-get install PHP
------------------------------------------------------------Split Line---------------------------------------------------------- ------------------
Installation of other modules
1,sudo Apt-get Install libapache2-mod-php
2, sudo apt-get install PHP-GD
3, sudo apt-get install Php-mysql
------------------------------------------------------------Split Line---------------------------------------------------------- ------------------
By this, Php+mysql+apache has been configured.
MySQL configuration file:/etc/mysql/my.cnf
Configuration file for Apache2:/etc/apache2/apache2.cnf
PHP configuration file:/etc/php/7.0/apache2/php.ini
Then the graphical interface of the database I used on Linux was phpMyAdmin
Installing Phpmyadmin:sudo apt-get Install phpMyAdmin
During installation, you are prompted to select Web server: You can choose Apach2 or lighttpd, I chose Apache2, and I installed it directly.
The process also has the following tips, I chose no
Connect phpMyAdmin with apache2, www directory in/var/www,phpmyadmin in/usr/share/phpmyadmin directory, so just use the command:
sudo ln-s/usr/share/phpmyadmin/var/www/html to establish a connection. Important
3, sudo/etc/init.d/apache2 Restart restart the apache2 server
4. Phpadmin Test in the browser: Open Http://localhost/phpmyadmin in the browser address bar
Collocation of the lamp environment under Linux