Skip to content

Instantly share code, notes, and snippets.

@mongoltolbo
Created May 10, 2016 22:51
Show Gist options
  • Save mongoltolbo/d41bb078929041392c0d93619d29f27f to your computer and use it in GitHub Desktop.
Save mongoltolbo/d41bb078929041392c0d93619d29f27f to your computer and use it in GitHub Desktop.
How to install PHP to run Grav CMS under Linux
:~$ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment