Install Apache, Mysql and PHP on Ubuntu 14.04

How to install Apache, MySQL and PHP on Ubuntu 14.04

Update

# sudo apt-get update

Apache

# sudo apt-get install apache2

Install MySQL

# sudo apt-get install mysql-server php5-mysql
# sudo mysql_install_db
# mysql_secure_installation

Install PHP

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

Restart Server

# sudo /etc/init.d/apache2 restart

Check Apache

Open a web browser and navigate to http://IPADDRESS. You should see a message saying It works!

Check PHP

# php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.