I stood to install a new Drupal-8 site on local environment.I faced a lot of errors related to php and couldn't open the site on browser. I searched about the error and I knew Drupal8 was work in PHP 5.4.5 or higher versions. So I started upgrading my current php version.
Command for latest PHP version installation:
sudo add-apt-repository ppa:ondrej/php5 sudo apt-get update sudo apt-get install apache2 php5 sudo apt-get install php5-curl sudo a2enmod php5
Finally restart apache.
sudo service apache2 restart
After the php updation some libraries and files of now available apache2 will be automatically remove. So we want to remove the current apache and re-install with new one. For that below command is used
sudo apt-get install libapache2-mod-php5 sudo apt-get install apache2-bin apache2 sudo service apache2 restart
Then for proper working go to the /etc/apache2/mods-enable/php.conf file and commented the line-'php_admin_flag engine Off'.
Then again I start to run the drupal8 site But there is another problem due to the internal server issues.
So go to /etc/apache2/mods-enabled/userdir.conf file and change the AllowOverride is All.
finally execute the drupal8 site successfully.