Blog

Installing LAMP on Ubuntu 15.10

Here is step by step tutorial on how to istall LAMP on Ubuntu 15.10. This installation is for PHP 7.0, which has lots of speed optimizations and security improvements.

1. Update Installation

apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoremove
apt-get autoclean

2. Install Commont Software

apt-get install landscape-common
apt-get install curl
apt-get install htop

3. Update Date and Time

apt-get install ntpdate
ntpdate ntp.ubuntu.com
date
dpkg-reconfigure tzdata
reboot

 

4. Install Apache

sudo apt-get install apache2
sudo a2enmod rewrite
sudo service apache2 restart

 

5. Install PHP 7.0

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
sudo apt-get install php7.0-mysql
sudo apt-get install php7.0-sqlite
sudo apt-get install php7.0-curl
sudo apt-get install php7.0-mbstring
apt-get install php7.0-dom
sudo apt-get install php7.0-mcrypt
sudo apt-get install libapache2-mod-php7.0
sudo a2enmod php7.0
sudo service apache2 restart

 

5. Install MySQL Database

sudo apt-get install mysql-server
sudo mysql_secure_installation

 

6. Other Configurations

6.1. Create Netbeans Remote Access User

sudo useradd -g www-data netbeans
sudo passwd netbeans

6.2. Install Composer

php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer

6.3.Find All Available PHP Packages

sudo apt-cache search php7-*