[Liferay] How to install Liferay on Ubuntu, config virtualhost, connect to Active Directory, setup CAS for Liferay

This document is a step by step guide on how to install Liferay on Ubuntu, CentOS, config virtualhost Apache, connect Liferay to Active Directory and setup  CAS for Liferay.

1. Setup Liferay on Ubuntu
S1. Installing Apache2, mySQL server and Java
apt-get install apache2
apt-get install mysql-server
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer