In Ubuntu, LAMP is not installed by default. The Server version will be installed by default. Of course, you can make full customization during the installation, so I don't like the built-in things when installing the system, and I have no idea what to install. A few days ago it was okay to switch to LAMP. Now paste the installation process. Make a record! Apache $ sudoapt-getinstallapache2 test http: // localhost in a browser
In Ubuntu, LAMP is not installed by default. The Server version will be installed by default. Of course, you can make full customization during the installation, so I don't like the built-in things when installing the system, and I have no idea what to install. A few days ago it was okay to switch to LAMP. Now paste the installation process. Make a record!
Apache
$ Sudo apt-get install apache2
Test http: // localhost in a browser
PHP
$ Sudo apt-get install php5 libapache2-mod-php5
Restart the Apache service
$ Sudo/etc/init. d/apache2 restart
Test installation
$ Sudo gedit/var/www/testphp. php
Add test statement
Save and exit.
Test http: // localhost/testphp. php In the browser
$ Sudo rm/var/www/testphp. php
MySQL
$ Sudo apt-get install mysql-server
By default, MySQL only allows access from the local machine. If you want to access from another host, www.linuxidc.com can edit the configuration file/etc/mysql/my. cnf.
$ Sudo gedit/etc/mysql/my. cnf
Comment out the line bind-address = 127.0.0.1, save, and exit.
$ Sudo/etc/init. d/mysql restart
MySQL Administrator
$ Sudo apt-get install mysql-admin
Applications-> System Tools-> MySQL Administrator
MySQL for Apache HTTP Server
$ Sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
PHP and MySQL collaboration
$ Sudo gedit/etc/php5/apache2/php. ini
Remove the; number comment in the line "; extension = mysql. so ".
Restart Apache
Sudo/etc/init. d/apache2 restart