Install Ghost Blog With Lighttpd and Mariadb

Introduction:

Ghost is a blogging platform which run on nodejs. I have tested this in a Ubuntu-12.04 64bit- 128mb/128mb openvz vps. Ghost requires Node.js 0.10.x (latest stable). Recommended Node.js 0.10.30 & npm 1.4.21.
Objective:

We will install nodejs, npm, lighttpd, mariadb for ghost blog. Lighttpd is for reverse proxy for ghost blog and it is really light enough to run smoothly on small vps boxes. Mariadb for saving posts as it is better than Mysql in some cases and also optimized for good performance. A benchmark of Mysql vs Mariadb. We will also install sendmail for ghost blog to act as a fully functional blog.

Installation Procedure:

1st Step: Nodejs – Npm

Let us install nodejs and npm as ghost blog build to run on this. We need repository to install latest versions.
First install curl and nano to download and edit files and also unzip to extract files.

Then let’s use curl to get repository. This command will add repository and will let us to download/install latest nodejs.

After running above command we can now install nodejs.

Check the versions.

 2nd Step: Lighttpd and Mariadb

Install the repo manager to use “add-apt-repository” command.

Import the GnuPG signing key

Add repository.

Update Source and install:

Now create a database.( It will ask you for root database password.)

 3rd Step: Ghost

Let we will install ghost in a domain “domain.com”, so we will create folder.

Now enter into that folder.

Now we will download the zip file by which we will install ghost. (Latest) in this folder.

Now let’s extract the zip file into a directory.

Above unzip command will extract ghost blog to a folder “ghost”, enter ghost directory.

Now have to run below code as we will run our blog in production mode. This command will get the dependencies.

We have to configure config file by our choice. Let’s replicate the sample config file to config.js-

Now edit that config file by our need.

Find // ### Production. This is the start of Production based configuration. Also find // Developers only need to edit below here and above this line end of Production based configuration. You can just delete all from that and paste below codes which is good enough with sendmail and database.

 

Change that domain with yours and change database section like above with the latest created database and add the server/vps ip in 127.0.0.1 and save it. In database connection do not use localhost, use 127.0.0.1 instead.
Now let’s test the ghost and nodejs server.

the oputput should be something like this

So it is running but we will not be able to browse by that domain yet. We have to use http://domain.com:2368 as ghost or nodejs run by ports and we installed ghost in 2368 port.

 

4th Step: Start Script

Create a blank file as ghost.conf in /etc/init/ folder.

Edit that file by nano and put below code.

Change the location And save that file. Now you can start and stop the service by simply running below command.

 

This will also act as an auto start configuration file when reboot the server.

5th Step: Lighttpd and Virtualhost

Edit /etc/lighttpd/lighttpd.conf and pur below codes in the bottom of that config file. But remember to change the ip and domain name and directory name.

Save the file and run below command-

Then restart lighttpd server. Above command for enabling proxy feature of lighttpd server.

Now you can access your blog by the domain name only.

Final Step:

Make sure you restarted the service accurately.

Now you will be able to register and use your very fast blogging platform. 🙂

Conclusion: We have installed successfully our beloved ghost blog with sendmail function and mariadb+lighttpd. This box is 128mb openvz and it’s running smoothly.

ghost_in_lighttpd

I have also tested the server by Apache Benchmark. It just doesn’t bother. 🙂
You can tweak mysql/mariadb and lighttpd to give it a fast reaction capability. A good optimised lighttpd+mysql will give you a breeze with ghost blog and your small vps. You can find some interesting post in this site about how to tweak mysql for better traffic handling.
Happy Blogging !

35 comments for “Install Ghost Blog With Lighttpd and Mariadb

  1. abangnoob
    November 15, 2015 at 06:39

    hello, my VPS LES 128 SG.

    when i start npm:

    it’s always: KILLED

    how i can fix it?

  2. March 28, 2016 at 19:01

    I’ve received to say that I was very impressed with the mmusicality aand complexity of those accompaniment chord patterns
    aand the facht you could also control different facets of the intelligent chords by
    taking out or muting the actual devices, bass line, orr drum rhythms, or a mixture of two or
    more of these features while you’re playing the chord.

  3. April 6, 2016 at 12:08

    Can I simply say what a relief to uncover somebody who truly understands
    what they’re discussing on the web. You certainly
    know how to bring an issue to light and make it important.
    More people ought to check this out and understand this side of your story.
    I was surprised you are not more popular because you most certainly possess the gift.

  4. April 15, 2016 at 18:10

    Excellent goods from you, man. I’ve be mindful your stuff prior to
    and you are simply too wonderful. I actually like what you have bought here, really like
    what you’re stating and the way in which through which you
    are saying it. You make it enjoyable and you continue to take care of to stay it wise.

    I can not wait to read far more from you. This is really a wonderful site.

  5. April 16, 2016 at 07:50

    I am no longer positive the place you’re getting your information,
    but good topic. I must spend some time learning much more or understanding more.
    Thanks for wonderful information I was searching for this information for my mission.

  6. April 17, 2016 at 08:39

    I likewise chechk in (as well as went down bucks) at St Marks Seems, Used Rose, aand also Academy on 18th.

  7. April 18, 2016 at 10:59

    Howdy I am so thrilled I found your blog page, I really found you by accident, while I was searching on Aol for something else, Anyways I am here now and would just like to say kudos for a marvelous post and a all round entertaining blog (I also love the theme/design), I don’t have time to look over it all at the
    minute but I have saved it and also added in your RSS feeds,
    so when I have time I will be back to read a lot more,
    Please do keep up the superb job.

  8. April 19, 2016 at 15:31

    You should be a part of a contest for one of the most useful sites on the web.
    I most certainly will highly recommend this site!

  9. May 2, 2016 at 22:56

    Woah! I’m really loving the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between superb usability and visual
    appearance. I must say you have done a great job with this.
    Also, the blog loads super quick for me on Firefox.
    Superb Blog!

  10. July 24, 2016 at 21:43

    I like reading a post that can make men and women think.
    Also, thank you for allowing for me to comment!

  11. July 27, 2016 at 18:18

    Genuinely no matter if someone doesn’t understand after that its up
    to other visitors that they will help, so here it takes place.

  12. August 20, 2016 at 14:24

    We stumbled over here by a different website and thought
    I should check things out. I like what I see so now i am following you.

    Look forward to going over your web page again.

  13. August 23, 2016 at 13:40

    Definitely believe that which you said. Your
    favorite reason seemed to be on the web the simplest thing to
    be aware of. I say to you, I definitely get irked while people consider worries that they just don’t know about.
    You managed to hit the nail upon the top as well as defined out the whole
    thing without having side-effects , people could take a
    signal. Will probably be back to get more. Thanks

  14. September 7, 2016 at 21:02

    Experrts are advising real property licensees to build more time
    into the contract for consumrs to acquire loan approval and longer periods of time to shut the transaction when TRID applies.

  15. September 8, 2016 at 00:20

    Listening To Her Talk About It.

  16. September 8, 2016 at 05:07

    I know this site presents quality dependent articles and additional stuff, is there any other
    web site which gives these kinds of data in quality?

  17. September 10, 2016 at 05:51

    Original birthday and Christmas present ideas foor teen boyts whoo love taking part in sports activities and being lively.

  18. October 12, 2016 at 03:05

    I just like the valuable info you provide for your articles.

    I will bookmark your weblog and check once more here regularly.
    I’m quite sure I will learn many new stuff right here!
    Good luck for the next!

  19. October 17, 2016 at 08:06

    I blog often and I genuinely appreciate your information. Your article has really peaked my interest.

    I’m going to bookmark your website and keep checking for new details about once a week.

    I subscribed to your RSS feed as well.

  20. October 21, 2016 at 08:43

    Good post. I certainly love this website. Thanks!

  21. October 28, 2016 at 19:23

    With the Paul Mitchell Protools now you can change the look
    of your haiir simply as your mood sizzling iron flattens hair utterly,
    removes wavy nature and curliness of hair in a fraction of the time it takes
    different scorching irrons to do the same.

  22. October 29, 2016 at 18:26

    I enjoy, lead to I discovered just what I was looking for.
    You’ve ended my 4 day long hunt! God Bless you man. Have a great day.
    Bye

  23. October 31, 2016 at 04:16

    Asking questions are truly pleasant thing if you are not understanding
    anything completely, except this paragraph offers good understanding even.

  24. November 4, 2016 at 04:40

    Hi there Dear, are you truly visiting this web page on a regular basis, if so
    after that you will absolutely take good know-how.

  25. November 11, 2016 at 05:54

    Nonetheless, it is the high quality of their building, and the intricate precision in the usage of the silk, that makes it so effective.
    While corporate artwork, likke fantastic work and sculptures, can enhance the
    image of an organization, using silk within the flowers
    in places of work provides much more to the pictude of the business.

  26. November 12, 2016 at 10:15

    Great web site. A lot of useful info here. I’m sending it to some pals ans
    also sharing in delicious. And certainly, thanks on your
    sweat!

  27. November 16, 2016 at 18:37

    Don’t ask for insurance coverage. Paying for insurance coverage is dear annd
    as soon as your prime is in you cannot seee your contractors insurance coverage in the top.

    If one of the workmen get harm they can sue
    you because the homeowner iff the contractor can noot cowl the declare.

    If thee installer damages your own home and disappears there will be no
    insurance firm to stand bbehind you.

  28. November 20, 2016 at 04:22

    It’s awesome for me to have a web page, which is helpful for my knowledge.
    thanks admin

  29. November 27, 2016 at 18:17

    Thank you a bunch for sharing this with all people
    you actually understand what you are speaking approximately!
    Bookmarked. Please also consult with my site =). We could have a link change contract between us

  30. November 27, 2016 at 20:02

    If you don’t get a complrtely automated system, an workplace in a new location might just
    imply lots oof extra expensze to be able to reht a particular employee at the new office to track and enter all
    the main points of employee hours and pay grades iinto your present payroll system.

  31. November 28, 2016 at 22:39

    Great article.

  32. November 29, 2016 at 10:52

    For the aim of cleansing drains, it is rather effective as a result of iit is able to
    reduce and burn via hair and other large particles because it froths its method down the drain.

  33. December 5, 2016 at 05:35

    I’ve bbeen sᥙurfing on-line greater than 3 hours toⅾay, yet I never found anyy fascinating articⅼe like
    yours. It is ⲣrеtty worth enough forr me. Personalⅼy,
    if all webmasters and bloggers made excellent content as
    you did, thee web wilⅼ likely be mhch more hеlρful than ever before.

Leave a Reply

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