mortuzahossain
9/25/2017 - 2:46 PM

Install Full Webserver

Install Full Webserver

To install LAMP in Ubuntu or other linux machine Please follow along the command and you will be good to go

Before Starting

sudo apt-get update

Apache Part

sudo apt-get install apache2
sudo nano /etc/apache2/apache2.conf
At the bottom of the file append -- ServerName 127.0.0.1 --
sudo systemctl restart apache2
sudo chmod -R 777 /var/www
sudo chmod -R a+rwx /var/www

Mysql Part

sudo apt-get install mysql-server

PHP Part

 sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
 Open apache Dir conf == sudo nano /etc/apache2/mods-enabled/dir.conf
 Delete the -- index.php -- at the end of the second line
 Add -- index.php -- before index.html
 Restart apache == sudo systemctl restart apache2

phpmyadmin Part

sudo apt-get install phpmyadmin
Open apache config == sudo nano /etc/apache2/apache2.conf
Add at the bottom -- Include /etc/phpmyadmin/apache.conf --
Reload Apache == sudo apachectl restart

For Wordpress user

sudo cp /etc/group /etc/groups
sudo chown -R www-data:root /var/www

You are Done . Best of Luck