Setting up a TileStream server on CentOS 5.6

The ReadMe directions work pretty quite well, this is mostly just another build-specific set of directions, simplified.

Getting the right dependency versions proved to be something of a pain, but the directions for dependencies while I was getting TileMill up and running are the same.

If you’re already moving, check your installed version with

node -v

I had picked up the dev release and ran into problems with the uninstall, so I ended up removing everything created in the standard install directions, as well as what shows up in the install directories, courtesy of

which node
which npm

At the moment, you’ll need to be running the latest stable release of node:

git clone git:// 
git checkout v0.4.12

Next, configure it for the custom directory you installed it at

./configure --prefix=/path/to/dir/node
make -j2
[sudo] make install
echo 'export NODE_PATH=/path/to/dir/node:/path/to/dir/node/lib/node_modules' >> ~/.bashrc
echo 'export PATH=$PATH:/path/to/dir/node/bin' >> ~/.bashrc 

Make sure you change the permissions on the node directory, otherwise the npm one-line install won’t work

[sudo] chown user:group /path/to/dir/node -r

With the right version of Node, the npm one-line install works fine:

curl | sh

Install TileStream globally (-g) with npm

npm install -g tilestream

I’ll write up setting it up as a service when I get a minute.

NodeJS installation directions