Date post: | 12-Apr-2017 |
Category: |
Software |
Upload: | george-sumpster |
View: | 107 times |
Download: | 0 times |
Installing Gravwith Nginx on Ubuntu 14.04
Dependencies Installation• A web server• PHP 5.5.9 or higher
o gdo curlo openssl
o zipo mbstringo xml
Dependencies Installation• A web server• PHP 5.5.9 or higher
o gdo curl
Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl
Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl
php5A widely-used general purpose scripting language
Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl
php5-cliCommand line interpreter for PHP
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
Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl
php5-gdSupports graphics manipulation abilities directly from PHP
Dependencies Installation$ sudo apt-get install php5 php5-cli php5-fpm php5-gd php5-curl
php5-curlA library for getting files from servers
Dependencies Installation$ sudo apt-get install nginx git-core
Dependencies Installation$ sudo apt-get install nginx git-core
nginxHigh performance web and reverse proxy server
Dependencies Installation$ sudo apt-get install nginx git-core
git-coreA popular distributed version control system
Downloading & Installing Grav$ cd /usr/share/nginx/$ sudo rm –rf html
$ sudo git clone –b master https://github.com/getgrav/grav.git html
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/
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
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
Downloading & Installing Grav$ cd html$ sudo bin/composer.phar install --no-dev -o$ sudo bin/grav install
Downloading & Installing Grav$ cd html$ sudo bin/composer.phar install --no-dev -o$ sudo bin/grav install
cd htmlChange directory our web root
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
Downloading & Installing Grav$ cd html$ sudo bin/composer.phar install --no-dev -o$ sudo bin/grav install
bin/grav installInstall plugin and theme dependencies
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
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’
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
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
Configuring Nginx$ cd webserver-configs$ sudo nano nginx.conf
Configuring Nginx$ cd webserver-configs$ sudo nano nginx.conf
cd webserver-configsChange directory to the webserver-configs folder
nano nginx.confOpen the nano text editor to edit nginx.conf
Configuring Nginx$ cd webserver-configs$ sudo nano nginx.conf
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
Configuring Nginx$ sudo cp nginx.conf /etc/nginx/sites-available/default$ sudo service nginx restart
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
sudo service nginx restartRestarts the Nginx process
Configuring Nginx$ sudo cp nginx.conf /etc/nginx/sites-available/default$ sudo service nginx restart
Grav is Installed@gsumpster
learn.getgrav.org