Ghost Blog is a independent free, open source blogging platform written in JavaScript and distributed under the MIT License, Ghost Blog is design to simplify the process of online publishing both individuals and publishers. below are the diagram how Ghost Blog works the first diagram show the flow of creating an image added to your Ghost Site and Push to S3 via S3-Store Custom Storage Module. The 2nd diagram shows the flow of what happen when end users visit the site and how the image are download from CloudFront rather than your running server. and if you want to learn more about Ghost Blogging platform, please visit the link below,

Official Website of Ghost Blog
The Story of Ghost Blog

Ghost-Blog-Platform-DiagramGhost-Blogs-Diagram-

Required for this project.

* Raspberry Pi 2 Model B or Pi 1 Model B or B+
* Raspbian OS
* Wifi or Ethernet Connection
* SSH Server running on Raspbian

Firstly we need a fresh installed Rasbian on Raspberry an configured to run an SSH server. The easiest to do this is by opening raspi-config > advance menu > then use the SSH client to login to the Raspberry Pi Remotely, but first we need the IP Address, by opening the ifconfig command via CLI or accessing it via Raspbian Desktop Icon.

If you’re connected via ETHERNET check for eth0 and if your using WiFi it is wlan0. For the inet addr if you see a number like 192.168.192.168 this is the IP Address of your Pi. Using SSH client on Raspbian this option is already in your Raspbian Distribution, just login to your Raspberry Pi and type following;

>ssh pi@IP_ADDRESS_OF_PI

If your are connected, you’ll need to download Node.js and change directory to extract and install.

For 64 Bit

> sudo wget https://nodejs.org/dist/latest/node-v0.12.6-linux-x64.tar.gz
> cd/user/local
> sudo tar xvzf ~/ node-v0.12.6-linux-x64.tar.gz

For 32 Bit

> sudo wget https://nodejs.org/dist/latest/node-v0.12.6-linux-x86.tar.gz
> cd/user/local
> sudo tar xvzf ~/ node-v0.12.6-linux-x86.tar.gz

Now download and install GHOST in you home directory

> sudo mkdir ghost
>cd ghost
>ghost/>wget https://ghost.org/zip/ghost-0.5.8.zip
>unzip https://ghost.org/zip/ghost-0.5.8.zip

Node.js uses npm a packing tool.which you will use to install Ghost

>sudo npm install –production

This will take you some time to complete the process.

>sudo npm start

This command will start the Node.js service then run the Ghost in development mode. This time we’re just testing the service if it is working correctly. To stop the service press Control + C.

Lets install Nginx to act as Proxy:

>sudo apt-get install nginx

Next will going to install the Nginx to work with Ghost in terminal change the directory to where Nginx config files and delete the default configuration file

>cd /etc/nginx/
>sudo rm site-enabled/default

Change the directory to sites-available and create a new file called Ghost using the nano editor

>cd sites-available
>sudo nano ghost

This file requires to contain the configuration to connect
Ghost to Nginx to enable the user to access the blog.

Save the file then Control C/CTRL+C or exit nano by pressing Control+X
and change the directory and create a link.

>cd ..
>ln -s site-available/ghost sites-enable/ghost

Nginx will listen the packets on port 80 and it will redirect it to Ghost.

Next is we need to start the Nginx server and Ghost.

>cd /home/pi/ghost
>sudo service nginx restart
>sudo npm start

Use another PC to navigate the ip address where you’ll see the Ghost Login Screen.
To learn more about ghost visit www.ghostforbeginners.com

Ghost-Blogs-Diagram-2

 

Creating a Ghost Blog using Node.js, Nginx and Raspberry Pi 2
Facebooktwitterredditpinterestmail
Tagged on:     

JLCPCBPCBgogoPCBway4pcb

Leave a Reply

Your email address will not be published. Required fields are marked *