Friday, 25 November 2016

$ sudo apt-get install apache2
$ sudo update-rc.d apache2 defaults
$ sudo apt-get install php
$ sudo apt-get install libapache2-mod-php

$ wget https://github.com/getgrav/grav/releases/download/1.1.8/grav-admin-v1.1.8.zip
$ cd /var/www/html/
$ sudo unzip ~/grav-admin-v1.1.8.zip
$ sudo chown -R www-data:www-data html/
$ sudo mv grav-admin/* .
$ sudo mv grav-admin/.htaccess .

http://localhost/
Message shown: 'mbstring' extension is not loaded. This is required for Grav to run correctly

$ sudo apt-get install php-mbstring
$ sudo service apache2 restart

http://localhost/grav-admin
Message shown: Issues Found - Please Review and Resolve before continuing...
  • mod_rewrite Apache module is not installed or enabled
  • PHP GD (Image Manipulation Library) is not installed
  • PHP Curl (Data Transfer Library) is not installed
  • PHP XML Library is not installed
  • PHP Zip extension is not installed
$ sudo a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
$ sudo apt-get install php-gd
$ sudo apt-get install php-curl
$ sudo apt-get install php-xml
$ sudo apt-get install php-zip

Allow override to activate .htaccess functionality:
$ sudo nano /etc/apache2/apache2.conf
<Directory /var/www/>
        Options Indexes FollowSymLinks
        #AllowOverride None
        AllowOverride All
        Require all granted
</Directory>

$ sudo service apache2 restart

Create admin user:
http://localhost/

Install Themes
$ cd /var/www/html/
$ sudo bin/gpm index
$ sudo bin/gpm install themename
$ sudo chown -R www-data:www-data user/themes/themename/