This article explains in detail how to configure the development environment to install PHP and the required libraries, to run Grav CMS under Linux operative system.

To run Grav under Linux, in particular under an Ubuntu distribution, you just need to install the PHP package. The only thing you have to pay attention is to install the 5.4 package version or higher and some required external libraries.

The first step is to install PHP, so just open a terminal and run the following command:

:~$ sudo apt-get install php5

That will install the latest available release of the PHP package. Next, you should verify the version running the following command:

:~$ php -v

Be sure you get at least the 5.4 release, otherwise Grav will not work.

PHP 5.6.4-4ubuntu6.2 (cli) (built: Jul  2 2015 15:29:28)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.6, Copyright (c) 2002-2014, by Derick Rethans

When the installed version matches the requirements, just install the following libraries, to complete the installation::

:~$ sudo apt-get install php5-gd
:~$ sudo apt-get install php5-curl
:~$ sudo apt-get install php5-xsl

Now, just download Grav, unzip the package everywhere in your home folder, then enter that directory:

:~$ cd my/grav/installation/path

Next, run then the PHP internal web server as follows:

:~$ php -S localhost:8080

Now open your favorite browser and point it to:

http://localhost:8080

and you can start playing with Grav.

At last, if you need to run the Grav gpm system, just run it from your Grav installation path:

~$ bin/gpm

Next Post Previous Post

Related Posts