Skip to content

Instantly share code, notes, and snippets.

@aduartem
Last active May 21, 2022 19:39
Show Gist options
  • Save aduartem/23a60e4a128c8212403aadcf9576cfe9 to your computer and use it in GitHub Desktop.
Save aduartem/23a60e4a128c8212403aadcf9576cfe9 to your computer and use it in GitHub Desktop.
Install LAMP stack on Elementary OS

Install LAMP stack on Elementary OS

Install Apache

$ sudo apt-get install apache2

Install MySQL Server and MySQL Client

$ sudo apt-get install mysql-server mysql-client

Test login mysql

$ mysql -u root -p

Install PHP 7.0

$ sudo apt-get install php7.0 libapache2-mod-php7.0

Install PHP modules

$ sudo apt-get install php7.0-mysql php7.0-curl php7.0-gd php7.0-xml php7.0-mbstring php7.0-mcrypt php7.0-soap

Restart Apache

$ sudo /etc/init.d/apache2 restart

Create a test file

$ sudo nano /var/www/html/info.php

Now type the following into the file:

<?php
phpinfo();
?>

Save the file.

Go to http://localhost/info.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment