Right method for local openstreet map hosting

Hi All,
Please forgive me first cause I am very the new in this openstreet development. I have been googling and it say that we can host locally our own map servers. So I came across few different method among them is this two https://github.com/klokantech/tileserver-php and https://github.com/lijenpan/osm/blob/master/osm-centos7.md. I am not sure which to pick exactly. I will be limiting to just few countries the map not for the whole world. Each of the link is talking different ways to host one is with postgres and other tools such as mapnik etc. The other is talking tileserver and php? Hope some one can give me the right advice and path.

I suspect it depends on what you want to do. The “klokantech” example gets you vector tiles; the “lijenpan” one raster tiles based on the “OSM Bright” stylesheet. Each route will have different advantages and disadvantages, and you’ll get different-looking and behaving tiles from each.

As a “first tile server project” I’d actually instead try https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/ . I’d suggest that for a couple of reasons: It’s what more people are familiar with (and therefore more people will be able to help you with), it’s optimised for less “post-git clone editing” than other methods might need, and it’s designed to work with where possible what ships “out of the box” in Ubuntu 16.04 LTS. A disclaimer - I contributed to that page, so I might be somewhat biased(!). Also see https://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1604_tileserver_load , which is intended to be a “soup to nuts” set of instructions.

Edit: Change second sentence to be sensible

Hi Someoneslse,
Ok basically I will be having around 30K unit of vehicles with gps installed. So I will need to view them, show their status on map, run some tracks and replay of the journey etc etc. This is basically what I will need to do with openstreet map thus I feel the traffic will be heavy and need to have local installation.

Will the vector tiles be better compared to raster? Ok I have actually google on this https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/ before. Can I know if this works for centos cause I am familiar with this server as we run all our server on minimal centos installation? If it works on centos it will be easier for me to do the installation and less of another learning curve. The key reason why I search for this https://github.com/lijenpan/osm/blob/master/osm-centos7.md was because its on centos 7. Isnt lijenpan method is very similar to this https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/ except for the os ?

That will always depend on the use case. With vector tiles you split and shift the work of rendering the actual map image. This can be beneficial for certain use cases, but in any case will be more complex.

It is. While it certainly is possible to install a tileserver on CentOS, it’s going to be painful in a different way. Ubuntu comes with a lot of the dependencies of the rendering stack in the default repositories, so installing the software-stack is pretty much 90% “apt install …” (the equivalent of “yum install …”). CentOS does not have all those packages, so you will either have to compile and package them yourself, or rely on random third-party repos of unknown quality. Whether you consider “compile a bunch of software dependencies from scratch” or “use a distribution that we usually do not use” more painful is a question of personal preference.

Hi Poem,
So we are based all our server on centos currently. So we prefer to stick with it. What is the best workaround on this any suggestion please ?

OK - you’ll probably have a bit of tinkering to do to get things to work, especially if you want to use a different tile style. It’d be great if you could document that process and say what worked, what didn’t, and what you had to change - it’d potentially help a lot of other people.

The drawback is that there are fewer people using Centos-based tile servers rather than Ubuntu-based one, so if something goes wrong there will be fewer people able to help you - you’ll need to work it out for yourself.