Enter the command in the terminal
<span>sudo</span> apt-get <span>install</span> apache2
<span>sudo</span> apt-get <span>install</span> php5 libapache2-mod-php5 php5-mysql
<span>sudo</span> /etc/init.d/apache2 restart
Note: If you want to shut down the apache service, you can do the following Command: sudo /etc/init.d/apache2 stop If you want to open the apache service, you can execute the following command: sudo /etc/init.d/apache2 start MySQL's restart, shutdown, and startup commands are also Similar to the corresponding commands of Apache2 |
<span>sudo</span> gedit /var/www/testphp.php
<?php <span>phpinfo</span>(); ?>
<span>sudo</span> apt-get <span>install</span> mysql-server mysql-client
<span>sudo</span> apt-get <span>install</span> libapache2-mod-auth-mysql php5-mysql phpmyadmin
<span>sudo</span><span>chmod</span><span>777</span> /var/www
The above introduces the LAMP environment for installing the Ubuntu branch Linux operating system, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.