Categories
Uncategorized

LAMP on Ubuntu 16.04 LTS

Install Apache:

  • sudo apt-get update
  • sudo apt-get install apache2
  • sudo nano /etc/apache2/apache2.conf
    • At end of file, add:  ServerName IPAddress
  • sudo apache2ctl configtest
  • sudo systemctl restart apache2

Install Mysql:

  • sudo apt-get install mysql-server mysql-client
  • sudo systemctl status mysql

Install PHP:

  • sudo apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7 php7.0-gd php libapache2-mod-php php-mcrypt php-mysql
  • sudo nano /etc/apache2/mods-enabled/dir.conf and move index.php at the befinning of the text, i.e DirectoryIndex index.php index.html …
  • sudo systemctl restart apache2

Install phpMyAdmin

  • sudo apt-get install phpmyadmin
  • edit, sudo nano /etc/apache2/apache2.conf
    • at the end of the file, add: Include /etc/phpmyadmin/apache.conf
  • sudo systemctl restart apache2