Difference between revisions of "Setting up tilestream"

From stgo
Jump to: navigation, search
Line 43: Line 43:
 
</code>
 
</code>
  
* run TileStream from within the tilestream directory <code>./index.js start</code> (or use "--help" to check out the startup option)
+
* start TileStream from ''within'' the tilestream directory <code>./index.js start</code> (or use "--help" to check out the startup option)
* tilestream should be available in the machines web browser (requires setup of XFCE desktop)  at <code>http://localhost:8888</code>.  
+
* now TileStream should be available in the machines web browser at <code>http://localhost:8888</code> (for a web browser one needs to setup XFCE desktop, etc, as described under: [accessing server infra])  .  
 
* To make the port 8888 of the VM available externally there has to be added a new --natpf1 rule with VBoxManage. Then I started TileStream with <code>./index.js start --host 146.155.17.113</code> to see it in my webbrowser on cedeusgis.  
 
* To make the port 8888 of the VM available externally there has to be added a new --natpf1 rule with VBoxManage. Then I started TileStream with <code>./index.js start --host 146.155.17.113</code> to see it in my webbrowser on cedeusgis.  
 
* To see TileStream running at port 80 one should use <code>./index.js start --uiPort=[80]</code> , but this gave me actually an error.
 
* To see TileStream running at port 80 one should use <code>./index.js start --uiPort=[80]</code> , but this gave me actually an error.
 +
* for running TileStream longer:
 +
** the tile server can be startup using <code>./index.js start --host 146.155.17.113 &<code>. This should return a PID to later use the kill command.
 +
** or (ToDo): Ubuntu settings should be adapted so that TileServer is automatically run on machine startup

Revision as of 19:18, 26 February 2014

>> return to Cedeus IDE


This page documents how to install TileStream, a tile server for MapBox Tiles generated with MapBox TileMill, on Ubuntu 12.04. The basic description is taken from TileStreams Github page. But note, that this description does say that TileStream runs only with Ubuntu 10.04 and 11.04... so maybe this will not after all.

  • I took an existing copy of my VirtualBox with Ubuntu 12.04 installed, including Apache2
  • sudo apt-get update
  • Note: there are 2 ways to install TileStream, one from source and one from directly (described on the github page a bit below). The latter is useful for running multiple applications that use node.js. However, as I am having a separate VirtualBox just for that I am trying to install from source.
  • sudo apt-get install curl build-essential libssl-dev libsqlite3-0 libsqlite3-dev git-core This installs curl, sqlite, git etc. When running the command I also got some problems with a repository location so I did add the parameter "--fix-missing" as suggested.
  • next step is to add a further apt repository, but for that I needed to enable add-apt using sudo apt-get install python-software-properties
  • add the node.js repository: sudo apt-add-repository ppa:chris-lea/node.js
  • update: <code>sudo apt-get update
  • install node.js: sudo apt-get install nodejs Note, the TileStream install instructions say that nodejs-dev and npm should be installed too, but this blog entry says that for nodejs version 0.10.0 these packages don't exist anymore, while they did for node.js 0.8.x.
  • get TileStream from GitHub: git clone https://github.com/mapbox/tilestream.git
  • switch to the folder cd tilestream and install TileStream npm install
    • the output I got after was like this

[sqlite3] Success: "lib/node_sqlite3.node" is installed
sphericalmercator@1.0.2 node_modules/sphericalmercator

step@0.0.5 node_modules/step

underscore@1.3.3 node_modules/underscore

modestmaps@3.3.5 node_modules/modestmaps

wax@6.4.2 node_modules/wax

tilelive@4.3.3 node_modules/tilelive
├── generic-pool@1.0.12
└── optimist@0.3.7 (wordwrap@0.0.2)

bones@1.3.29 node_modules/bones
├── underscore@1.1.7
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.8)
├── backbone@0.3.3
├── mirror@0.3.3 (uglify-js@1.0.2)
├── express@2.5.11 (qs@0.4.2, mime@1.2.4, mkdirp@0.3.0, connect@1.9.2)
└── jquery@1.6.3 (htmlparser@1.7.7, jsdom@0.10.1)

mbtiles@0.2.9 node_modules/mbtiles
├── underscore@1.5.2
└── sqlite3@2.2.0 (node-pre-gyp@0.2.6)

  • start TileStream from within the tilestream directory ./index.js start (or use "--help" to check out the startup option)
  • now TileStream should be available in the machines web browser at http://localhost:8888 (for a web browser one needs to setup XFCE desktop, etc, as described under: [accessing server infra]) .
  • To make the port 8888 of the VM available externally there has to be added a new --natpf1 rule with VBoxManage. Then I started TileStream with ./index.js start --host 146.155.17.113 to see it in my webbrowser on cedeusgis.
  • To see TileStream running at port 80 one should use ./index.js start --uiPort=[80] , but this gave me actually an error.
  • for running TileStream longer:
    • the tile server can be startup using ./index.js start --host 146.155.17.113 &<code>. This should return a PID to later use the kill command.
    • or (ToDo): Ubuntu settings should be adapted so that TileServer is automatically run on machine startup