Quantcast
Channel: linux – Logisek Security Blog
Viewing all articles
Browse latest Browse all 54

Install LAMP stack on Ubuntu 16.04

$
0
0

Update system

sudo apt-get update && sudo apt-get dist-upgrade

Install Apache

sudo apt-get install apache2

Install MySQL

sudo apt-get install mysql-server

Install PHP

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-mbstring php-gettext

Install PHPMyAdmin

sudo apt-get install phpmyadmin

Notes:
1. Web server to reconfigure automatically: choose apache2.
2. Configure database for phpmyadmin with dbconfig-common?: yes.

Remove default index file

sudo rm /var/www/html/index.html
sudo touch /var/www/html/index.php

Restrict PHPMyAdmin

sudo nano / etc/apache2/conf-available/phpmyadmin.conf
	Options FollowSymLinks
	DirectoryIndex index.php
	Order Deny,Allow
	Deny from all
	Allow from 127.0.0.1
	Allow from x.x.x.0/24
..
..

Restart Apache

sudo service apache2 restart

Viewing all articles
Browse latest Browse all 54

Trending Articles