LAMP on Ubuntu 14.04

Install Apache

sudo apt-get update
sudo apt-get install apache2





Install MySQL

sudo apt-get install mysql-server php5-mysql


Follow the prompts to complete the installation of MySQL.

If the installation fails due to an error like this:

/var/lib/dpkg/info/mysql-server-5.5.postinst: line 144: logger: command not found


You should run the following command:

apt-get --reinstall install bsdutils



Create the database directory structure

sudo mysql_install_db



Secure MySQL

sudo mysql_secure_installation





Install PHP

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt



Force Apache to look for index.php before index.html

Open dir.conf:

sudo nano /etc/apache32/mods-enabled/dir.conf


Make the dir.conf file look like this, by moving index.php to the front of the list to match the following:

<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>


Now save and close the file.

Restart Apache

sudo service apache2 restart




  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

IP rDNS/PTR records

You can configure PTR or Reverse DNS records via the VPS Control Panel under rDNS. The record...

Serial Console

You may wish to use the Serial Console if the SSH console becomes inaccessible. The Serial...

LAMP on CentOS 6

Install Apache Web sudo yum install httpd Edit Apache's httpd.confThe httpd.conf...

LAMP on Debian 7

Install Apache Web sudo apt-get install apache2 Edit Apache's httpd.confThe...

WordPress on Ubuntu 14.04

NOTE: You must have the LAMP stack installed before installing WordPress.Create the WordPress...