LAMP on Ubuntu 14.04 Print

  • 0

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





Was this answer helpful?

« Back