For those who were stalking my Twitter, you must have realized that today I’ve been tweeting quite a lot technical jargons. Here’s why: I subscribed Amazon EC2 Free Tier to launch the Ghost. I spent first 1 hour and half installing and configuring both NodeJS and Ghost but I failed, and I blame my carelessness. It has been quite a long time I haven’t used Linux. Realizing that I executed few commands with noticeable slip-ups, then I took a 2-hour break (DotA 2 included) before working on it again.
I deleted the first instance (or you can say a VM, tho not really an accurate term), then got a new one running. I used the Amazon Linux AMI (I should have used Ubuntu AMI, because I still don’t know what is the base distro of Amazon Linux AMI. CentOS, probably). Launched the second instance, still on Amazon Linux AMI but this time with extra care with what I typed.
First, according to the guide, is to run the update. That’s the common task when working with any Linux distribution (we don’t bother any Windows update, do we?). Then, grab the NodeJS and install it by compiling it yourself (should be easy, with make and make install command). Then, fetch the latest version of Ghost, edit the config file (use command cp config.example.js config.js, then use command nano config.js). I used the default Development configuration (the first section). Don’t bother editing the rest sections in the config file, otherwise you know what you are doing.
Yerp, I prefer nano over vim, because I’m not that pro.
I got everything pretty right for the second attempt, then I start the npm inside the Ghost folder by using sudo /usr/local/bin/npm start command. Caught no error.
Just leave the terminal open. Don’t close it. Once you close it, Ghost will stop running.. I think. So, let’s go to the Ghost’s web interface. Dealing with the CLI was quite nauseating, so I was hoping the GUI would give a pleasant smell of satisfaction. It did, btw.
I was greeted with this registration page (with few warning messages below the browser’s navbar, about mail app and… something I couldn’t remember.. haha). As for now with Ghost 0.3.2, only 1 user can be created on a single Ghost installation. Maybe next time we can have multiple users on a Ghost, and maybe multiple Ghost from a single user (like the WordPress Multisite feature).
Once the registration was done, I logged out and tried logging in. Purrfect!
No need to verify email address (maybe the developers might wanna add email verification feature next time).
If we talk about improvements?
Sure we want improvements. Here are few ideas.
1) Friendlier installation process. I won’t compare it with WordPress or any other PHP-based CMS, because Ghost isn’t built to run on PHP/Apache stack. It is built on NodeJS, and this NodeJS isn’t widely adapted yet. However, I think I can see quite a bright future with NodeJS.
2) Still on installation process, I sincerely hope that installation of Ghost in aspect of editing config.js file would be more easier in the coming future. Not that editing the config.js is troublesome (it wasn’t troublesome at all), but at least make it inviting. I can’t complaint anything other than that, given the fact that to run Ghost, command line is required to run the npm. Hands down.
3) Ghost’s Markdown editor is great, seriously. I would like to emphasis on how fast the reaction time of the preview pane. Unlike any other online Markdown editors I have used before, there was no noticeable lag when I was using Ghost’s editor. But, here’s something I think I want to tweak, if I know how. The font size is ridiculously big. Is there any standard says Markdown must use big fonts? The same case on iA Writer (OS X). I hate big fonts.
4) Err, can you please fix the code to display page header properly? Thanks!
Few misconception. My misconception, at least.
Just learnt about the existence of NodeJS few days ago. I’m quite adept with the basics of Apache stack (and Nginx stack, too). Just the basic configuration stuffs only. The concept of deployment on NodeJS is quite different. Here’s why:
Once Apache stack is installed, it listens to any incoming request (in this example, we assume a connection comes from port 80). Once a request hit Apache, even tho the web folder (/var/www) is empty, it returns a page on browser like Error 404, or anything similar. But on NodeJS stack (in my case, on Amazon Linux AMI), NodeJS is running all the time (is it? I think it is), but NodeJS doesn’t listen to any incoming request. Only application listens to incoming request.
I was dumbfounded when I set up NodeJS but when I navigated to the browser, I got “Firefox can’t establish a connection to the server at bla bla bla”. I thought I skipped a part or two, but when I rechecked, I did nothing wrong.
When I ran the command sudo /usr/local/bin/npm start inside the Ghost installation directory, then I was served correctly. Lesson learned; NodeJS just runs the app, it doesn’t listen to any request.
Can’t keep running forever. For now.
Having trouble with Forever (npm module) and Cron. I tried these 2 methods to keep my Ghost alive, but I failed without knowing what was wrong. Also I tried running it as service but this time I was sure I did it wrongly (again, I don’t know what Amazon Linux AMI really is, I should’ve used Ubuntu AMI instead). But as long as my second attempt of running a usable Ghost came to fruition, I can sleep soundly tonight although the site went down the moment I logged out from the server.
Rating comes later, testing first. I wanna be enlisted in the developers’ team (a beta tester, maybe.. or working with Wiki. Sounds great).
Good night, sleep tight.
– Aizan Fahri, Malaysia.
p/s: Oh yea. I encountered permission error with npm install -g forever, and when I used sudo npm install -g forever, I was greeted with a freaking annoying npm: command not found. All you need is to fix permission error. No need to use sudo npm.