Thursday, August 13, 2009

Getting Started with Linode

‹prev | My Chain | next›

Today I start deploying to a VPS. I opt for Linode for this—it has the right features for the money.

Creating the node is trivial with Linode. I will not bother with screenshots and a description—it is both intuitive and well documented. Once I have my Debian node up and running (<5 minutes, if that), I log in an create myself a user account and set the password:
li97-191:~# useradd -U -m cstrom
li97-191:/home/cstrom# passwd cstrom
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
I apt-get install sudo, visudo to enable myself to have sudo access, and vigr to put my user account into the proper group for that access. I logout and log back in as that user account.

As described yesterday, I need to use Debian testing (to get the right version of CouchDB), so I add testing repositories :
#...
deb http://http.us.debian.org/debian testing main contrib non-free
deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
deb http://security.debian.org testing/updates main contrib non-free
I then need to install these packages:
apt-get install sudo openssh-server \
couchdb \
ruby ruby-dev rubygems rake irb make curl git-core \
libopenssl-ruby \
libidn11 \
maven2 openjdk-6-jdk
That works, but I see all sorts of messages like this:
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Odd, it seems that locales is not installed. I install it via sudo apt-get install locales and then select en_US.UTF-8 as the default locale in sudo dpkg-reconfigure locales.

Next up, I install the couch_docs gem:
cstrom@li97-191:~$ sudo gem sources -a http://gems.github.com
http://gems.github.com added to sources
cstrom@li97-191:~$ sudo gem install eee-c-couch_docs
Building native extensions. This could take a while...
Successfully installed json-1.1.7
Successfully installed rest-client-1.0.3
Successfully installed eee-c-couch_docs-1.0.0
3 gems installed
Installing ri documentation for json-1.1.7...
Installing ri documentation for rest-client-1.0.3...
Installing ri documentation for eee-c-couch_docs-1.0.0...
Installing RDoc documentation for json-1.1.7...
Installing RDoc documentation for rest-client-1.0.3...
Installing RDoc documentation for eee-c-couch_docs-1.0.0...
After uploading my CouchDB seed data, I use curl to create my CouchDB database and couch_docs to upload the seed data:
cstrom@li97-191:~/seed$ curl -X PUT http://localhost:5984/eee
{"ok":true}
cstrom@li97-191:~/seed$ /var/lib/gems/1.8/bin/couch-docs load . http://localhost:5984/eee
To verify, I use ssh port forwarding:
cstrom@jaynestown:~$ ssh -L 15984:localhost:5984 97.107.136.191
Connecting to the forwarded port, I see:



Nice! I will get my application server up and running tomorrow.

No comments:

Post a Comment