Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiyali/ac494e08e902b35e3107112b441130e1 to your computer and use it in GitHub Desktop.
Save hiyali/ac494e08e902b35e3107112b441130e1 to your computer and use it in GitHub Desktop.
grav-installation-requirements-php-composer-and-another
### install php
sudo add-apt-repository ppa:ondrej/php
### install requirements
sudo apt install php5.6-gd php5.6-xml php5.6-mbstring php5.6-curl php5.6-zip
### install grav
git clone -b master https://github.com/getgrav/grav.git
### install composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
### composer install
composer install --no-dev -o
### grav install
bin/grav install
bin/grav new-project compWeb01
### permessions
sudo chgrp -R www-data .
find . -type f | xargs chmod 664
find . -type d | xargs chmod 775
find . -type d | xargs chmod +s
umask 0002
### enabled mod_rewrite
sudo a2enmod rewrite
sudo service apache2 restart
### done, enjoy ! ###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment