+ All Categories
Home > Software > Installing GravCMS

Installing GravCMS

Date post: 12-Apr-2017
Category:
Upload: george-sumpster
View: 107 times
Download: 0 times
Share this document with a friend
32
Installing Grav with Nginx on Ubuntu 14.04
Transcript
Page 1: Installing GravCMS

Installing Gravwith Nginx on Ubuntu 14.04

Page 2: Installing GravCMS

Dependencies Installation• A web server• PHP 5.5.9 or higher

o gdo curlo openssl

o zipo mbstringo xml

Page 3: Installing GravCMS

Dependencies Installation• A web server• PHP 5.5.9 or higher

o gdo curl

Page 4: Installing GravCMS

Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl

Page 5: Installing GravCMS

Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl

php5A widely-used general purpose scripting language

Page 6: Installing GravCMS

Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl

php5-cliCommand line interpreter for PHP

Page 7: Installing GravCMS

Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl

php5-fpmStands for ‘FastCGI Process Manager’, scales PHP processes based on load

Page 8: Installing GravCMS

Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl

php5-gdSupports graphics manipulation abilities directly from PHP

Page 9: Installing GravCMS

Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl

php5-curlA library for getting files from servers

Page 10: Installing GravCMS

Dependencies Installation$ sudo apt-get install nginx git-core

Page 11: Installing GravCMS

Dependencies Installation$ sudo apt-get install nginx git-core

nginxHigh performance web and reverse proxy server

Page 12: Installing GravCMS

Dependencies Installation$ sudo apt-get install nginx git-core

git-coreA popular distributed version control system

Page 13: Installing GravCMS

Downloading & Installing Grav$ cd /usr/share/nginx/$ sudo rm –rf html

$ sudo git clone –b master https://github.com/getgrav/grav.git html

Page 14: Installing GravCMS

Downloading & Installing Grav$ cd /usr/share/nginx/$ sudo rm –rf html

$ sudo git clone –b master https://github.com/getgrav/grav.git html

cd /usr/share/nginxChange directory to the directory above our web rootApache Users: cd /var/www/

Page 15: Installing GravCMS

Downloading & Installing Grav$ cd /usr/share/nginx/$ sudo rm –rf html

$ sudo git clone –b master https://github.com/getgrav/grav.git html

sudo rm –rf htmlRemove the existing web root

Page 16: Installing GravCMS

Downloading & Installing Grav$ cd /usr/share/nginx/$ sudo rm –rf html

$ sudo git clone –b master https://github.com/getgrav/grav.git html

sudo git clone –b branch master https://git.../grav.git htmlClone the master branch (latest release) of Grav from Github and place the contents in the webroot

Page 17: Installing GravCMS

Downloading & Installing Grav$ cd html$ sudo bin/composer.phar install --no-dev -o$ sudo bin/grav install

Page 18: Installing GravCMS

Downloading & Installing Grav$ cd html$ sudo bin/composer.phar install --no-dev -o$ sudo bin/grav install

cd htmlChange directory our web root

Page 19: Installing GravCMS

Downloading & Installing Grav$ cd html$ sudo bin/composer.phar install --no-dev -o$ sudo bin/grav install

bin/composer.phar install --no-dev -oInstall vendor dependencies

Page 20: Installing GravCMS

Downloading & Installing Grav$ cd html$ sudo bin/composer.phar install --no-dev -o$ sudo bin/grav install

bin/grav installInstall plugin and theme dependencies

Page 21: Installing GravCMS

Downloading & Installing Grav$ sudo chown www-data:www-data . && sudo chown –R www-data:www-data *$ find . -type f | sudo xargs chmod 664$ find ./bin -type f | sudo xargs chmod 775$ find . -type d | sudo xargs chmod 775$ find . -type d | sudo xargs chmod +s$ umask 0002

Page 22: Installing GravCMS

Downloading & Installing Grav$ sudo chown www-data:www-data . && sudo chown –R www-data:www-data *$ find . -type f | sudo xargs chmod 664$ find ./bin -type f | sudo xargs chmod 775$ find . -type d | sudo xargs chmod 775$ find . -type d | sudo xargs chmod +s$ umask 0002

sudo chown www-data:www-data . && sudo chown –R www-data:www-data *

Change the group of the current folder and all of it’s sub-folders to ‘www-data’

Page 23: Installing GravCMS

Downloading & Installing Grav$ sudo chown www-data:www-data . && sudo chown –R www-data:www-data *$ find . -type f | sudo xargs chmod 664$ find ./bin -type f | sudo xargs chmod 775$ find . -type d | sudo xargs chmod 775$ find . -type d | sudo xargs chmod +s$ umask 0002

find . –type f | sudo xargs chmod 664Find files/directories and changes the permissionsaccordingly

Page 24: Installing GravCMS

Downloading & Installing Grav$ sudo chown www-data:www-data . && sudo chown –R www-data:www-data *$ find . -type f | sudo xargs chmod 664$ find ./bin -type f | sudo xargs chmod 775$ find . -type d | sudo xargs chmod 775$ find . -type d | sudo xargs chmod +s$ umask 0002

umask 0002Change the default permissions for all new files

Page 25: Installing GravCMS

Configuring Nginx$ cd webserver-configs$ sudo nano nginx.conf

Page 26: Installing GravCMS

Configuring Nginx$ cd webserver-configs$ sudo nano nginx.conf

cd webserver-configsChange directory to the webserver-configs folder

Page 27: Installing GravCMS

nano nginx.confOpen the nano text editor to edit nginx.conf

Configuring Nginx$ cd webserver-configs$ sudo nano nginx.conf

Page 28: Installing GravCMS

Configuring Nginx01 server {02 #listen 80;03 index index.html index.php;04 05 ## Begin - Server Info06 root /home/user/www/html; ## change to /usr/share/nginx/html07 server_name localhost; ## change to web address08 ## End - Server Info09 10 ## Begin - Index11 # for subfolders, simply adjust:12 # `location /subfolder {`13 # and the rewrite to use `/subfolder/index.php`14 location / {15 try_files $uri $uri/ /index.php?_url=$uri;16 }17 ## End - Index

Page 29: Installing GravCMS

Configuring Nginx$ sudo cp nginx.conf /etc/nginx/sites-available/default$ sudo service nginx restart

Page 30: Installing GravCMS

Configuring Nginx$ sudo cp nginx.conf /etc/nginx/sites-available/default$ sudo service nginx restart

sudo cp nginx.conf /etc/nginx/sites-available/defaultCopy & overwrite the default server configuration

Page 31: Installing GravCMS

sudo service nginx restartRestarts the Nginx process

Configuring Nginx$ sudo cp nginx.conf /etc/nginx/sites-available/default$ sudo service nginx restart

Page 32: Installing GravCMS

Grav is Installed@gsumpster

learn.getgrav.org


Recommended