Download the source of Node.js for Linux. Make sure you have the Ubuntu package 'build-essential' already installed before building Node.js.
You can check if Ubuntu package 'build-essential' is already installed by issuing the following command on the terminal:
suleman@devbox:~$apt-cache policy build-essential
build-essential:
Installed: 11.5ubuntu2.1
Candidate: 11.5ubuntu2.1
Version table:
*** 11.5ubuntu2.1 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64
The above Installed line indicates, which version of 'build-essential' is installed, if it was not installed then you would have seen something like the following:
build-essential:
Installed: Installed: (none)
Candidate: 11.5ubuntu2.1
Version table:
*** 11.5ubuntu2.1 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64
If you don't have package 'build-essential' installed then please install it:
suleman@devbox:~$sudo apt-get install build-essential
Issue the following commands in the terminal to build Node.js for local use as opposed to system wide use:
suleman@devbox:~$tar xzf node-v0.10.26.tar.gz
suleman@devbox:~$cd node-v0.10.26
suleman@devbox:~/node-v0.10.26$./configure
suleman@devbox:~/node-v0.10.26$make
suleman@devbox:~/node-v0.10.26$mkdir ~/local
suleman@devbox:~/node-v0.10.26$./configure --prefix=~/local
suleman@devbox:~/node-v0.10.26$make && make install
Then I would add the following in your ~/.bashrc:
export PATH=~/local/bin:$PATH
Either open new terminal or source ~/.bashrc in current terminal and check you have node installed successful:
suleman@devbox:~$node -v
v0.10.26
I installed Node.js for tutorial I was doing on AngularJS, once I have finished this tutorial I am hoping to have look in anger at Node.js for server side programming.
The book Node: Up and Running looks good for Node.js server side programming.
Sunday, March 02, 2014
Friday, August 19, 2011
Ubuntu 11.4 using Gnome Keyring as a SSH agent
It has been a long time since I tried public key authentication for SSH (2005 was the last time I did this).
Well since then 'Gnome Keyring SSH Agent' has been added by Linux distributions, as I found out to my surprise when I typed the following into Linux terminal:
ssh roy@example.com
I got the following pop-up, which I did not expect:
I expected the following message because I created non standard named key (i.e. roy_ssh_key) and did not specify the identity file when running ssh command:
Permission denied (publickey).
'Gnome Keyring SSH Agent' found both the public (roy_ssh_key.pub) and private (roy_ssh_key) keys in the directory ~/.ssh and was trying to load the private key into 'Gnome Keyring SSH Agent' and was asking for the private key password.
If you enter the private key password in the 'Unlock private key' dialogue then the private key is loaded into the SSH agent, then any tempts in the future to ssh it will try to use the private key in the agent.
The following command showed me that the agent had loaded my private key:
ssh-add -l
2048 4e:a9:25:8b:05:0d:c7:a5:25:eb:5e:92:6a:e7:aa:8a roy@dell.pc (RSA)
This fingerprint will match the public key in ~/.ssh
If you reboot your machine and then log back in Gnome Keyring SSH Agent automatically loads the private key this time without asking you for the password. It will protect the private key password using login password for user account that holds the private key in ~/.ssh
You can check to verify that this is the case by running this familiar command:
ssh-add -l
But I feel unease with this feature, where Gnome Keyring SSH Agent automatically loads files in ~/.ssh, which have corresponding *.pub paired files. One solution to stop automatically loading private keys is to remove the corresponding *.pub from ~/.ssh
Well since then 'Gnome Keyring SSH Agent' has been added by Linux distributions, as I found out to my surprise when I typed the following into Linux terminal:
ssh roy@example.com
I got the following pop-up, which I did not expect:

I expected the following message because I created non standard named key (i.e. roy_ssh_key) and did not specify the identity file when running ssh command:
Permission denied (publickey).
'Gnome Keyring SSH Agent' found both the public (roy_ssh_key.pub) and private (roy_ssh_key) keys in the directory ~/.ssh and was trying to load the private key into 'Gnome Keyring SSH Agent' and was asking for the private key password.
If you enter the private key password in the 'Unlock private key' dialogue then the private key is loaded into the SSH agent, then any tempts in the future to ssh it will try to use the private key in the agent.
The following command showed me that the agent had loaded my private key:
ssh-add -l
2048 4e:a9:25:8b:05:0d:c7:a5:25:eb:5e:92:6a:e7:aa:8a roy@dell.pc (RSA)
This fingerprint will match the public key in ~/.ssh
If you reboot your machine and then log back in Gnome Keyring SSH Agent automatically loads the private key this time without asking you for the password. It will protect the private key password using login password for user account that holds the private key in ~/.ssh
You can check to verify that this is the case by running this familiar command:
ssh-add -l
But I feel unease with this feature, where Gnome Keyring SSH Agent automatically loads files in ~/.ssh, which have corresponding *.pub paired files. One solution to stop automatically loading private keys is to remove the corresponding *.pub from ~/.ssh
Sunday, July 24, 2011
Fedora 15 Default Run-level
It has been a long time since I've used Fedora Linux distribution, so recently I installed it. Fedora 15 has changed the way you change the run level on it.
To change the run level you need to issue the following two Linux commands as root:
rm /etc/systemd/system/default.target
ln -s /lib/systemd/system/<target name>.target /etc/systemd/system/default.target
To change the run level you need to issue the following two Linux commands as root:
rm /etc/systemd/system/default.target
ln -s /lib/systemd/system/<target name>.target /etc/systemd/system/default.target
Subscribe to:
Posts (Atom)