{"id":165,"date":"2017-07-22T23:07:01","date_gmt":"2017-07-22T23:07:01","guid":{"rendered":"http:\/\/linuxresellerwebhosting.in\/blog\/?p=165"},"modified":"2017-07-23T00:00:39","modified_gmt":"2017-07-23T00:00:39","slug":"install-configure-ghostblogging-platform","status":"publish","type":"post","link":"https:\/\/linuxresellerwebhosting.in\/blog\/install-configure-ghostblogging-platform\/","title":{"rendered":"Install and Configure GHOST(blogging platform)"},"content":{"rendered":"<p><strong>Steps to Install GHOST\u00a0<\/strong><\/p>\n<p>First, we need to install Ghost. We&#8217;ll place Ghost in the <strong>\/var\/www\/\u00a0<\/strong>ghost directory, which is the recommended installation location.<\/p>\n<p>Download the latest version of Ghost from Ghost&#8217;s GitHub repository using wget:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">wget https:\/\/ghost.org\/zip\/ghost-latest.zip<\/pre>\n<p>&nbsp;<\/p>\n<p>Install the unzip program with the package manager. Make sure that the system is up-to-date before installing a new program, so update the packages and install unzip with the following commands:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">yum update -y\r\nyum install unzip -y<\/pre>\n<p>&nbsp;<\/p>\n<p>The -y flag in the preceding commands updates and installs packages automatically.<\/p>\n<p>Once unzip is installed, unzip the downloaded package to the <strong>\/var\/www\/<\/strong>ghost directory. First, create the <strong>\/var\/www<\/strong> folder, then unzip the file:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">mkdir \/var\/www\r\nunzip -d \/var\/www\/ghost ghost-latest.zip<\/pre>\n<p>&nbsp;<\/p>\n<p>Switch to the <strong>\/var\/www\/ghost\/<\/strong> directory:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">cd \/var\/www\/ghost\/<\/pre>\n<p>&nbsp;<\/p>\n<p>Then install the Ghost dependencies, but only the ones needed for production.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">npm install --production<\/pre>\n<p>&nbsp;<\/p>\n<p>Ghost is installed once this process completes, but we need to set up Ghost before we can start it.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Configure GHOST<\/strong><\/p>\n<p>Ghost uses a configuration file located at <strong>\/var\/www\/ghost\/config.js<\/strong>. This file doesn&#8217;t exist out of the box, but the Ghost installation includes the file <strong>config.example.js<\/strong>, which we&#8217;ll use as a starting point.<\/p>\n<p>Copy the example configuration file to <strong>\/var\/www\/ghost\/config.js<\/strong>. We&#8217;ll copy the file instead of moving it so that we have a copy of the original configuration file in case we need to revert your changes.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">cp config.example.js config.js<\/pre>\n<p>&nbsp;<\/p>\n<p>Open the file for editing:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">vi config.js<\/pre>\n<p>&nbsp;<\/p>\n<p>We have to change the URL that Ghost uses. If we don&#8217;t, the links on the blog will take visitors to my-ghost-blog.com. Change the value of the url field to your domain name, or to your server&#8217;s IP address if you don&#8217;t want to use a domain right now.<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">                \u00a0 \/var\/www\/ghost\/config.js\r\n\r\n\r\n\r\n...\r\n\r\nconfig = {\r\n\/\/ ### Production\r\n\/\/ When running Ghost in the wild, use the production environment\r\n\/\/ Configure your URL and mail settings here\r\nproduction: {\r\nurl: 'http:\/\/your_domain_or_ip_address',\r\nmail: {},\r\n...<\/pre>\n<p>&nbsp;<\/p>\n<p>The url value must be in the form of a URL, like <strong>http:\/\/example.com<\/strong> or <strong>http:\/\/11.11.11.11<\/strong>. If this value is not formatted correctly, Ghost will not start.<\/p>\n<p>Ghost can function without the mail settings; they&#8217;re only necessary if you need to support password recovery for Ghost users.<\/p>\n<p>You can customize Ghost further by following the configuration details at the official site.<\/p>\n<p>Save the file and exit the editor.<\/p>\n<p>While still in the <strong>\/var\/www\/<\/strong>ghost directory, start Ghost with the following command:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">npm start --production<\/pre>\n<p>&nbsp;<\/p>\n<p>Output<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true \">&gt; ghost@0.11.7 start \/var\/www\/ghost\r\n&gt; node index\r\n\r\nWARNING: Ghost is attempting to use a direct method to send email.\r\nIt is recommended that you explicitly configure an email service.\r\nHelp and documentation can be found at http:\/\/support.ghost.org\/mail.\r\n\r\nMigrations: Creating tables...\r\n...\r\n\r\nGhost is running in production...\r\nYour blog is now available on http:\/\/your_domain_or_ip_address\r\nCtrl+C to shut down<\/pre>\n<p>&nbsp;<\/p>\n<p>Ghost is listening on port <strong>2368<\/strong>, and it&#8217;s not listening on the public network interface, so you won&#8217;t be able to access it directly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Steps to Install GHOST\u00a0 First, we need to install Ghost. We&#8217;ll place Ghost in the \/var\/www\/\u00a0ghost directory, which is the<\/p>\n","protected":false},"author":1,"featured_media":168,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[4],"tags":[9,10,8],"class_list":["post-165","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps","tag-blogging","tag-cms","tag-ghost"],"_links":{"self":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=165"}],"version-history":[{"count":3,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":174,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/165\/revisions\/174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/media\/168"}],"wp:attachment":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}