Avkash Chauhan's Blog

Windows Azure, Windows 8, Cloud Computing, Big Data and Hadoop: All together at one place.. One problem, One solution at One time...

Installing Node.js on a CentOS Linux Virtual Machine in Windows Azure

Installing Node.js on a CentOS Linux Virtual Machine in Windows Azure

Rate This
  • Comments 2

First I created a CentOS Linux Virtual Machine with host names as “nodejsbox” and the DNS name as http://nodejsbox.cloudapp.net

 

 

As I will use this machine as node.js web server so I have added https endpoint for protocol TCP at port 80 as below:

 

 

Now I can log into my Linux machine by following instructions as directly here How to Log on to a Virtual Machine Running Linux.

After that I ran the following commands:

$ sudo –i
Entered my password

Installing stable release of node.js directly from node.js repo

[root@nodejsbox ~]# wget http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm
[root@nodejsbox ~]# yum localinstall --nogpgcheck nodejs-stable-release.noarch.rpm
[root@nodejsbox ~]# yum install nodejs-compat-symlinks npm

Verify that node is running in my machine:

[root@nodejsbox /]# node --version
v0.6.18

Now created a folder name nodeserver at /usr/local and then created server.js as below:

# cd /usr/local
# mkdir nodeserver
# cd nodeserver
# vi server.js

var http = require("http");
http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello from Node.js @ Windows Azure Linux Virtual Machine");
  response.end();
}).listen(80);

 

Finally launch node.js

[root@nodejsbox nodeserver]# node server.js

 

You can verify that your node.js is running on Linux machine:

 

Keywords: Windows Azure, Node.js, CentOs, Linux, Virtual Machine

Leave a Comment
  • Please add 2 and 1 and type the answer here:
  • Post
  • Hello friends,

    Now you can send 5000 FREE emails per month using our email marketing servers with multiple IPs to get your campaign to

    inbox.Get great inbox deliveries and land your 95% emails to inbox.

    With our userfriendly and beautiful web-app you would be able to track every movement of your campaign. You would be able

    to see the users who have opened, clicked, unsubscribed, bounced and marked as spam.

    You can register here for your FREE account:www.client.hostwiser.com/cart.php

    HURRY!!

    * You must have access to your own opt-in list of your subscribers.You must be compliant with the ICANN-SPAM ACT of anti

    spamming.We do not sell email lists.

  • EmailOcean is a brand new platform to cater to your email marketing needs.

    It provides promotional emailing at an amazingly low rate of $0.10 per 1000 emails. The customer only pay for what is utilised. The brilliance of EmailOcean lies in it making the process easier and faster for the customer,as compared to Amazon and Sendgrid, EmailOcean has a beautiful Web-app which makes creating and sending the campaign a lot more easier. Using this web-app one can also send and track their campaigns.

    As of now,the registrations are open by invitation but register yourself with the website and keep self updated as to when they are open to all or for your surprise invitation code.

    www.emailocean.com

Page 1 of 1 (2 items)