Home » Wisdom List » DetailsInvite

Setup Ubuntu server 12.10 with nvm + mongodb

Useful for general nodejs development

2013-02-24, 03:53:45-2013-02-24, 04:18:29


Add `node` user to the server #


$ useradd -d /home/node -m node
$ passwd node

edit /etc/passwd to make bash default shell for node user, it should contain on its last line this:

node:x:1000:1000::/home/node:/bin/bash

Make the user sudoer:

adduser node sudo


Install node via nvm #


$ sudo apt-get -y install git-core
$ git clone git://github.com/creationix/nvm.git ~/.nvm
$ sudo apt-get -y install g++ curl libssl-dev apache2-utils make
$ . ~/.nvm/nvm.sh
$ nvm install v0.10.24


Pair your server with git repo for readonly cloning & pulling #


Generate ssh key on the server : https://help.github.com/articles/generating-ssh-keys 
If you use github, just add a "deploy key" at this page https://github.com/<your repo>/settings/keys, which is been generated on the server by following this https://help.github.com/articles/managing-deploy-keys

In case you have multiple repos on the same server which need to pull from github you should follow these steps :

http://stackoverflow.com/questions/11656134/github-deploy-keys-how-do-i-authorize-more-than-one-repository-for-a-single-mac


comments powered by Disqus