<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Delanover &#187; lipman</title>
	<atom:link href="http://delanover.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://delanover.com</link>
	<description>Blog sobre Informática y Seguridad</description>
	<lastBuildDate>Sun, 19 May 2013 15:36:02 +0000</lastBuildDate>
	<language>es-ES</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>JMReversi</title>
		<link>http://delanover.com/2013/04/28/jmreversi/</link>
		<comments>http://delanover.com/2013/04/28/jmreversi/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 05:33:36 +0000</pubDate>
		<dc:creator>lipman</dc:creator>
				<category><![CDATA[Sin categoría]]></category>

		<guid isPermaLink="false">http://delanover.com/?p=1629</guid>
		<description><![CDATA[This entry is about JMReversi, a free implementation of classic Reversi. At this moment, this application is not in the Store but hopefully will be available soon, because I didn&#8217;t have any problem validating it locally. My personal reason to develop this application is to implement Alfa-Beta algorithm. My idea is release some day another [...]]]></description>
				<content:encoded><![CDATA[<p>This entry is about <a href="http://apps.microsoft.com/windows/es-ES/app/jmreversi/4721766e-5876-410d-a885-22e7d288904b" target="_blank">JMReversi</a>, a free implementation of classic Reversi. At this moment, this application is not in the Store but hopefully will be available soon, because I didn&#8217;t have any problem validating it locally.</p>
<p>My personal reason to develop this application is to implement Alfa-Beta algorithm.</p>
<p>My idea is release some day another version with more features that are currently half developed, but now I don&#8217;t have time so I decided release it.</p>
<p>Any comment and suggestion is well appreciated.</p>
<p><a href="http://apps.microsoft.com/windows/es-ES/app/jmreversi/4721766e-5876-410d-a885-22e7d288904b" target="_blank">Windows Store</a></p>
<h2>General features</h2>
<p><u>Version 1.0</u></p>
<ul>
<li>Play classic Reversi game.</li>
<li>Computer decissions are based on Alfa-Beta algorithm.</li>
</ul>
<h2>Screenshots</h2>
<p><a href="/wp-content/uploads/jmreversi/reversi.jpg" target="_blank"><img src="/wp-content/uploads/jmreversi/reversi.jpg" width="150" height="70"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://delanover.com/2013/04/28/jmreversi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JMTwitter</title>
		<link>http://delanover.com/2013/04/24/jmtwitter/</link>
		<comments>http://delanover.com/2013/04/24/jmtwitter/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 13:20:22 +0000</pubDate>
		<dc:creator>lipman</dc:creator>
				<category><![CDATA[Sin categoría]]></category>

		<guid isPermaLink="false">http://delanover.com/?p=1617</guid>
		<description><![CDATA[This entry is about JMTwitter, a free Twitter client for Windows 8 (metro style) I&#8217;m currently developing. At this moment, the application is not published in the official store (in fact, has been rejected because didn&#8217;t pass performance tests, therefore I need to improve it, sure). I think I will also release the source code [...]]]></description>
				<content:encoded><![CDATA[<p>This entry is about JMTwitter, a free Twitter client for Windows 8 (metro style) I&#8217;m currently developing. At this moment, the application is not published in the official store (in fact, has been rejected because didn&#8217;t pass performance tests, therefore I need to improve it, sure).</p>
<p>I think I will also release the source code when I finish to comment it and have time for that. I would like to continue developing this application and all comments and suggestions will be well appreciated.</p>
<h2>General features</h2>
<p><u>Version 1.0</u></p>
<ul>
<li>Visualize your timeline, mentions and trending topics (refresh every minute).</li>
<li>Automatically stores your timeline and mentions to visualize offline.</li>
<li>Send tweets and replies.</li>
<li>Automatic splited tweets and replies.</li>
<li>Snapview mode.</li>
</ul>
<h2>Screenshots</h2>
<p><a href="/wp-content/uploads/jmtwitter/firstlogin.png" target="_blank"><img src="/wp-content/uploads/jmtwitter/firstlogin.png" width="150" height="70"></a> <a href="/wp-content/uploads/jmtwitter/loadingtweets.png" target="_blank"><img src="/wp-content/uploads/jmtwitter/loadingtweets.png" width="150" height="70"></a> <a href="/wp-content/uploads/jmtwitter/timeline.png" target="_blank"><img src="/wp-content/uploads/jmtwitter/timeline.png" width="150" height="70"></a> <a href="/wp-content/uploads/jmtwitter/attachedmode.png" target="_blank"><img src="/wp-content/uploads/jmtwitter/attachedmode.png" width="150" height="70"></a> <a href="/wp-content/uploads/jmtwitter/multipletweets.png" target="_blank"><img src="/wp-content/uploads/jmtwitter/multipletweets.png" width="150" height="70"></a></p>
<h2>External libraries (credits)</h2>
<ul>
<li><a href="http://linqtotwitter.codeplex.com/" target="_blank">LinqToTwitter</a> by <a href="http://www.codeplex.com/site/users/view/JoeMayo" target="_blank">Joe Mayo</a> is the library used to interact with Twitter service itselft.</li>
<li><a href="https://github.com/praeclarum/sqlite-net" target="_blank">SQLite-net</a> by Frank Krueger is the library used to store timeline tweets to have them available offline.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://delanover.com/2013/04/24/jmtwitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creando un servidor de OpenStreetMap en Ubuntu 10.04</title>
		<link>http://delanover.com/2012/12/21/creando-un-servidor-de-openstreetmap-en-ubuntu-10-04/</link>
		<comments>http://delanover.com/2012/12/21/creando-un-servidor-de-openstreetmap-en-ubuntu-10-04/#comments</comments>
		<pubDate>Fri, 21 Dec 2012 17:27:52 +0000</pubDate>
		<dc:creator>lipman</dc:creator>
				<category><![CDATA[Información]]></category>

		<guid isPermaLink="false">http://delanover.com/?p=1559</guid>
		<description><![CDATA[Índice 1.-Introducción 2.-Empecemos 3.-Preparando la base de datos 4.-Instalando la libreria Mapnik 5.-Instalando las fronteras del mapa 6.-Renderizado del primer mapa 7.-Troubleshooting 1.-Introducción Primeramente, me gustaria agradecer a &#8220;rw&#8221;, el autor del post en el que este post está basado. Este post está basado en un 95% en este otro (actualmente no está disponible, pero [...]]]></description>
				<content:encoded><![CDATA[<style>
div.commandsosm {
border:1px dashed grey;
margin-left:15px;
margin-bottom:13px;
}
p.commandsosm {
margin-left:20px;
margin-top:10px;
}
a.linkerror {
color:red;
}
a.nameerror {
color:red;
}
div.errordesc {
font-size:10px;
background-color:white;
border:1px solid black;
margin-bottom:13px;
}
div.commandresponses {
background-color:#B0B0B0;
border:1px dotted black;
margin-left:15px;
margin-bottom:13px;
}
p.commandresponses {
margin-left:20px;
margin-top:10px;
}
a.nameerror {
font-size:15px;
font-weight:bold;
}
a.titletext {
color:black;
}
</style>
<p><u>Índice</u><br />
<a href="#index1" class="indextext">1.-Introducción</a><br />
<a href="#index2" class="indextext">2.-Empecemos</a><br />
<a href="#index3" class="indextext">3.-Preparando la base de datos</a><br />
<a href="#index4" class="indextext">4.-Instalando la libreria Mapnik</a><br />
<a href="#index5" class="indextext">5.-Instalando las fronteras del mapa</a><br />
<a href="#index6" class="indextext">6.-Renderizado del primer mapa</a><br />
<a href="#index7" class="indextext">7.-Troubleshooting</a></p>
<p><a href="http://delanover.com/2012/12/21/build-an-openstreetmap-server-on-ubuntu-10-04/"><img src="http://delanover.com/wp-content/uploads/flags/england.png"></a></p>
<h1><u><a name="index1" class="titletext">1.-Introducción</a></u></h1>
<p>Primeramente, me gustaria agradecer a &#8220;rw&#8221;, el autor del post en el que este post está basado. Este post está basado en un 95% en <a href="http://weait.com/content/build-your-own-openstreetmap-server" target="_blank">este otro</a> (actualmente no está disponible, pero puedes verlo <a href="http://web.archive.org/web/20100612043730/http://weait.com/content/build-your-own-openstreetmap-server" target="_blank">aquí</a>).</p>
<p>Mi principal intención es divulgar este post a todos mis lectores y almacenar esta información acerca de la plataforma OSM para que al menos haya una referencia online para todos (y por supuesto, para mi). Este post no trata acerca de una introducción ni información acerca de OSM, sino que es información técnica para construir tu propio servidor OSM. También me gustaria mejorar mi conocimiento acerca de este servidor (no simplemente descargarlo, instalarlo y correrlo, estaría bien tratar de entenderlo).</p>
<p>No copiaré y pegaré el mismo contenido del post, porque (como una instalación grande ordinaria) tuve problemas instalando esta plataforma y los he resuelto, por lo que escribiré acerca de lo que he visto, resuelto y conclusiones personales. También iré un poco en profundidad acerca de algunos comandos y demás, cuya explicación si que la dejaré inglés.</p>
<h1><u><a name="index2" class="titletext">2.-Empecemos</a></u></h1>
<h4>Actualiza tu sistema</h4>
<p>Por razones de seguridad, está recomendado actualizar el sistema, aunque no es necesario.</p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get update<br />
sudo apt-get upgrade</p>
</div>
<h4>Algunas herramientas del sistema</h4>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install subversion autoconf screen munin-node munin htop</p>
</div>
<p><b>Subversion</b>: we&#8217;ll use it to donwload files from some repositories.<br />
<b>Autoconf</b>: software to generate autoconfig scripts.<br />
<b>Screen</b>: Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.<br />
<b>Munin-node</b>: software to monitoring our server from the client.<br />
<b>Munin</b>: client of munin-node.<br />
<b>Htop</b>: software to check and monitoring the system used resources.</p>
<h4>Organicemos el sistema de archivos un poquito</h4>
<div class="commandsosm">
<p class="commandsosm">cd ~<br />
mkdir src bin planet</p>
</div>
<ul>
<li>src: source de mapnik.</li>
<li>bin: aquí tendremos los scripts para generar la imagen del mapa y cargar la base de datos.</li>
<li>planet: planeta (o una porción) de la base de datos que vamos a construir.</li>
</ul>
<h4>Obten el último fichero del planeta (OSM file)</h4>
<p>En esta parte, vamos a descargar <a href="http://planet.openstreetmap.org/" taget="_blank">la base de datos del mundo entero</a> (actualmente [20 dic 2012] pesa 24GBs) o quizás podemos descargar no el mundo entero sino <a href="http://download.geofabrik.de/openstreetmap/" target="_blank">una porción</a> de éste. Simplemente para probar, elegiré descargar una porción.</p>
<div class="commandsosm">
<p class="commandsosm">cd planet<br />
wget http://planet.openstreetmap.org/planet-latest.osm.bz2</p>
</div>
<h1><u><a name="index3" class="titletext">3.-Preparando la base de datos</a></u></h1>
<p>Aqui vamos a descargar postgresql para meter nuestra base de datos ahi, incluyendo algunas librerias para poder usarlo.</p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install postgresql-8.4-postgis postgresql-contrib-8.4<br />
sudo apt-get install postgresql-server-dev-8.4<br />
sudo apt-get install build-essential libxml2-dev<br />
sudo apt-get install libgeos-dev libpq-dev libbz2-dev proj</p>
</div>
<p><b>Build-essential</b>: This package contains an informational list of packages which are considered essential for building Debian packages.<br />
<b>Libxml2-dev</b>: Very useful if you wish to develop your own programs using the GNOME XML library.<br />
<b>Libgeos-dev</b>: GEOS provides a spatial object model and fundamental geometric functions. It implements the geometry model defined in the OpenGIS Consortium Simple Features Specification for SQL.<br />
<b>Libpq-dev</b>: Header files and static library for compiling C programs to link with the libpq library in order to communicate with a PostgreSQL database backend.<br />
<b>Libbz2-dev</b>: Static libraries and include files for the bzip2 compressor library.<br />
<b>Proj</b>: Standard Unix filter function which converts geographic longitude and latitude coordinates into cartesian coordinates, by means of a wide variety of cartographic projection functions.</p>
<h4>Instalar osm2pgsql del repositorio</h4>
<p>Primero descargamos osm2pgsql del repositorio, y depués, lo configuramos. osm2pgsql es un programa que convierte datos de OpenStreetMap en bases de datos para PostgreSQL</p>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin<br />
svn co http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/<br />
cd osm2pgsql<br />
./autogen.sh (<a href="#e1" class="linkerror">Error?</a>)<br />
./configure<br />
make</p>
</div>
<h4>Configurando la base de datos de PostGIS </h4>
<p>Editamos /etc/postgresql/8.4/main/postgresql.conf para modificar/añadir 4 lineas. Estos cambios ayudarán a usar grandes cantidadesd e datos.</p>
<div class="commandsosm">
<p class="commandsosm"><i>107:</i> shared_buffers = 128MB # 16384 para versión 8.1 y anteriores<br />
<i>170:</i> checkpoint_segments = 20<br />
<i>(nueva línea):</i> maintenance_work_mem = 256MB # 256000 para versión 8.1 y anteriores<br />
<i>387:</i> autovacuum = off</p>
</div>
<p>Editamos /etc/sysctl.conf</p>
<div class="commandsosm">
<p class="commandsosm"><i>(nueva línea)</i> kernel.shmmax=268435456</p>
</div>
<p>Recuerda que lo anterior solo tiene efecto después de reiniciar. Para que tenga efecto inmediatamente realizaremos lo siguiente.</p>
<div class="commandsosm">
<p class="commandsosm">sudo sysctl kernel.shmmax=268435456</p>
</div>
<p>Reiniciamos postgres para habilitar los cambios.</p>
<div class="commandsosm">
<p class="commandsosm">sudo /etc/init.d/postgresql-8.4 restart</p>
</div>
<p>Creamos una base de datos llamada &#8220;gis&#8221;. Algunas de nuestras herramientas suponen el uso de ese nombre en la base de datos, por lo que si elegis otro nombre, tenedlo en cuenta. Lo mismo para &#8220;username&#8221; con el usuario creado. Este deberia ser el nombre de usuario que va a renderizar los mapas con mapnik<br />
<b>Nota del autor de delanover</b>: Tuve problemas con el nombre de usuario, por lo que decidi usar el mismo que en el ordenador.</p>
<div class="commandsosm">
<p class="commandsosm">sudo -u postgres -i<br />
createuser username # responder &#8216;yes&#8217; para que sea superusuario<br />
createdb -E UTF8 -O username gis<br />
createlang plpgsql gis<br />
exit</p>
</div>
<p>Configuración de postgis en la base de datos postgresql</p>
<div class="commandsosm">
<p class="commandsosm">psql -f /usr/share/postgresql/8.4/contrib/postgis.sql -d gis</p>
</div>
<p>Deberia responder con algunas lineas y acabar en</p>
<div class="commandresponses">
<p class="commandresponses">&#8230;<br />
CREATE FUNCTION<br />
COMMIT
</p>
</div>
<p>Sustituir tu nombre de usuario por &#8220;username&#8221; en las siguientes lineas. Este deberia ser el que va a renderizar los mapas con mapnik, como dijimos anteriormente.</p>
<div class="commandsosm">
<p class="commandsosm">echo &#8220;ALTER TABLE geometry_columns OWNER TO username; ALTER TABLE spatial_ref_sys OWNER TO username;&#8221; | psql -d gis</p>
</div>
<p>Deberia devolver</p>
<div class="commandresponses">
<p class="commandresponses">ALTER TABLE<br />
ALTER TABLE</p>
</div>
<p>Activamos intarray</p>
<div class="commandsosm">
<p class="commandsosm">psql -f /usr/share/postgresql/8.4/contrib/_int.sql -d gis</p>
</div>
<p>Deberia devolver varias líneas acabadas en</p>
<div class="commandresponses">
<p class="commandresponses">&#8230;<br />
CREATE FUNCTION<br />
CREATE OPERATOR CLASS</p>
</div>
<p>Configuramos el Set the Spatial Reference Identifier (SRID) en la nueva base de datos.</p>
<div class="commandsosm">
<p class="commandsosm">psql -f ~/bin/osm2pgsql/900913.sql -d gis</p>
</div>
<p>Deberia devolver</p>
<div class="commandresponses">
<p class="commandresponses">INSERT 0 1</p>
</div>
<p>Cargamos el planeta en la base de datos con osm2pgsql</p>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin/osm2pgsql<br />
./osm2pgsql -S default.style &#8211;slim -d gis -C 2048 ~/planet/YourFileMap.osm.bz2 (<a href="#e2" class="linkerror">Error?</a>)</p>
</div>
<p><b>Nota</b>: cargar 8.4GB lleva 30 hours, y particularme 1.4GB me llevaron 8 horas (depende de la velocidad de E/S), por lo que <u>sé paciente</u>.</p>
<div class="commandresponses">
<p class="commandresponses">
Completed planet_osm_roads<br />
Copying planet_osm_polygon to cluster by geometry finished<br />
Copying planet_osm_line to cluster by geometry finished<br />
Creating indexes on  planet_osm_polygon finished<br />
All indexes on  planet_osm_polygon created  in 4257s<br />
Completed planet_osm_polygon<br />
Creating indexes on  planet_osm_line finished<br />
All indexes on  planet_osm_line created  in 5053s<br />
Completed planet_osm_line<br />
Stopped table: planet_osm_ways in 16095s<br />
Osm2pgsql took 29436s overall</p>
</div>
<h1><u><a name="index4" class="titletext">4.-Instalando la librería Mapnik</a></u></h1>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install libltdl3-dev libpng12-dev libtiff4-dev libicu-dev<br />
sudo apt-get install libboost-python1.40-dev python-cairo-dev python-nose<br />
sudo apt-get install libboost1.40-dev libboost-filesystem1.40-dev<br />
sudo apt-get install libboost-iostreams1.40-dev libboost-regex1.40-dev libboost-thread1.40-dev<br />
sudo apt-get install libboost-program-options1.40-dev libboost-python1.40-dev<br />
sudo apt-get install libfreetype6-dev libcairo2-dev libcairomm-1.0-dev<br />
sudo apt-get install libgeotiff-dev libtiff4 libtiff4-dev libtiffxx0c2<br />
sudo apt-get install libsigc++-dev libsigc++0c2 libsigx-2.0-2 libsigx-2.0-dev<br />
sudo apt-get install libgdal1-dev python-gdal<br />
sudo apt-get install imagemagick</p>
</div>
<p><b>Libltdl3-dev</b>: A small library that aims at hiding the various difficulties of dlopening libraries from programmers. It is a system independent dlopen wrapper for GNU libtool.<br />
<b>Libpng12-dev</b>: Library implementing an interface for reading and writing PNG format files.<br />
<b>Libtiff4-dev</b>: Library providing support for the Tag Image File Format (TIFF), a widely used format for storing image data. This package includes the development files, static library, and header files.<br />
<b>Libicu-dev</b>: ICU is a C++ and C library that provides robust and full-featured Unicode and locale support. This package contains the development files for ICU along with programs used to manipulate data files found in the ICU sources.<br />
<b>Libboost libraries</b>: Boost provides free peer-reviewed portable C++ source libraries.<br />
<b>Python libraries</b>: So obvious.<br />
<b>Libfreetype6-dev</b>: This package contains all supplementary files (static library, headers and documentation) you need to develop your own programs using the FreeType 2 library (digital typography library).<br />
<b>Libcairo2-dev</b>: Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends.<br />
<b>Libgeotiff-dev</b>: The GeoTIFF standard has been developed for reading, and writing geographic meta-information tags on top of TIFF raster.<br />
<b>Tiff libraries</b>: So obvious, to work with tiff format.<br />
<b>Libsigc libraries</b>: implement a typesafe callback system for standard C++. It allows you to define signals and to connect those signals to any callback function, either global or a member function, regardless of whether it is static or virtual.<br />
<b>Libgdal1-dev</b>: GDAL is a translator library for raster geospatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats.<br />
<b>Imagemagick</b>: software suite to create, edit, compose, or convert bitmap images.</p>
<p>Construimos la libreria de Mapnik desde el código fuente.</p>
<div class="commandsosm">
<p class="commandsosm">cd ~/src<br />
svn co http://svn.mapnik.org/tags/release-0.7.1/ mapnik (<a href="#e3" class="linkerror">Error?</a> <i>offline</i>)<br />
cd mapnik<br />
python scons/scons.py configure INPUT_PLUGINS=all OPTIMIZATION=3 SYSTEM_FONTS=/usr/share/fonts/truetype/ (<a href="#e4" class="linkerror">Error?</a> <i>boost version</i>)<br />
python scons/scons.py #be patient here<br />
sudo python scons/scons.py install<br />
sudo ldconfig</p>
</div>
<p>Confirmamos que la libreria Mapnik está instalada.</p>
<div class="commandsosm">
<p class="commandsosm">python<br />
>>> import mapnik<br />
>>> </p>
</div>
<h4>Instalamos herramientas para Mapnik</h4>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin<br />
svn co http://svn.openstreetmap.org/applications/rendering/mapnik</p>
</div>
<h1><u><a name="index5" class="titletext">5.-Instalando las fronteras del mapa</u></h1>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin/mapnik<br />
mkdir world_boundaries<br />
wget http://tile.openstreetmap.org/world_boundaries-spherical.tgz<br />
tar xvzf world_boundaries-spherical.tgz<br />
cd world_boundaries<br />
wget http://tile.openstreetmap.org/processed_p.tar.bz2<br />
bunzip2 processed_p.tar.bz2<br />
tar xvf processed_p.tar<br />
wget http://tile.openstreetmap.org/shoreline_300.tar.bz2<br />
bunzip2 shoreline_300.tar.bz2<br />
tar xvf shoreline_300.tar</p>
</div>
<h1><u><a name="index6" class="titletext">6.-Renderizado del primer mapa</a></u></h1>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin/mapnik<br />
chmod +x generate_xml.py<br />
./generate_xml.py &#8211;dbname gis &#8211;accept-none <b>[NOTA IMPORTANTE]</b></p>
</div>
<p><b>NOTA IMPORTANTE</b>: No se porqué no se ve bien el doble guión. Recuerda que es &#8220;&#8211;&#8221; (dos &#8220;-&#8221;) y no un solo &#8220;-&#8221;.</p>
<div class="commandresponses">
<p class="commandresponses">
Include files written successfully! Pass the osm.xml file as an argument if you want to serialize a new version or test reading the XML
</p>
</div>
<p>Finalmente generamos la imagen.</p>
<div class="commandsosm">
<p class="commandsosm">
./generate_image.py (<a href="#e5" class="linkerror">Error?</a>)
</p>
</div>
<p>El resultado será una imagen PNG de 10000x5000px de resolución del Reino Unido, en la carpeta de mapnik. Recuerda, sé paciente.</p>
<p>Espero que haya disfrutado de este tutorial!</p>
<h1><u><a name="index7" class="titletext">7.-Troubleshooting</a></u></h1>
<p><a name="e1" class="nameerror">Error 1: Configurando al instalar osm2pgsql</a><br />
Error al ejecutar ./configure cuando estamos instalando osm2pgsql:</p>
<div class="errordesc">
Can&#8217;t exec &#8220;libtoolize&#8221;: No such file or directory at /usr/bin/autoreconf line 189.<br />
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 189.<br />
autoreconf: Entering directory `.&#8217;<br />
autoreconf: configure.ac: not using Gettext<br />
autoreconf: running: aclocal &#8211;force -I m4<br />
configure.ac:41: warning: macro `AM_PROG_LIBTOOL&#8217; not found in library<br />
autoreconf: configure.ac: tracing<br />
autoreconf: configure.ac: not using Libtool<br />
autoreconf: running: /usr/bin/autoconf &#8211;force<br />
configure.ac:41: error: possibly undefined macro: AM_PROG_LIBTOOL<br />
     If this token and others are legitimate, please use m4_pattern_allow.<br />
     See the Autoconf documentation.<br />
autoreconf: /usr/bin/autoconf failed with exit status: 1
</div>
<p><font color="green">Solution</font><br />
No puedes ejecutar libtoolize, por lo que debes instalar libtool antes de continar, escribe:</p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install libtool</p>
</div>
<p><a name="e2" class="nameerror">Error 2: Cargando un planeta en la base de datos</a><br />
Quizás tengas un error mientras estés cargando los datos del planeta:</p>
<div class="errordesc">
The target database has the intarray contrib module loaded.<br />
While required for earlier versions of osm2pgsql, intarray<br />
is now unnecessary and will interfere with osm2pgsql&#8217;s array<br />
handling. Please use a database without intarray.</p>
<p>Error occurred, cleaning up
</p></div>
<p>Para arreglarlo, realizaremos un arreglo que aparece en la <a href="http://wiki.openstreetmap.org/wiki/Talk:Openptmap/Installation"  target="_blank">documentación oficial</a></p>
<div class="commandsosm">
<p class="commandsosm"><b>sudo -u postgres -i -H<br />
dropdb ptgis</b>  ### here the old database is dropped<br />
<b>createdb -E UTF8 -O ptuser ptgis<br />
createlang plpgsql ptgis</b><br />
# for Ubuntu <=9.10:<br />
  # psql -d ptgis -f /usr/share/postgresql/8.3/contrib/_int.sql ### (do not execute this line)<br />
  psql -d ptgis -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql<br />
# for Ubuntu >=10.04:<br />
  #psql -d ptgis -f /usr/share/postgresql/8.4/contrib/_int.sql ### (do not execute this line)<br />
  <b>psql -d ptgis -f /usr/share/postgresql/8.4/contrib/postgis.sql<br />
psql ptgis -c &#8220;ALTER TABLE geometry_columns OWNER TO ptuser&#8221;<br />
psql ptgis -c &#8220;ALTER TABLE spatial_ref_sys OWNER TO ptuser&#8221;<br />
exit</b></p>
<p># for Ubuntu <=9.10:<br />
  sudo /etc/init.d/postgresql-8.3 reload<br />
# for Ubuntu >=10.04:<br />
<b>  sudo /etc/init.d/postgresql-8.4 reload</p>
<p>psql ptgis ptuser -f osm2pgsql/900913.sql</b></p>
</div>
<p>Ahora, intentaremos cargar los datos de nuevo.</p>
<p><a name="e3" class="nameerror">Error 3: Repositorio de Mapnik offline</a><br />
Establezco esto como un error porque, quien sabe, igual algún dia vuelva a estar online. Pero ahora no lo está, por lo que debemos encontrar otro sitio para descargarlo.<br />
Necesitamos descargar el software de git para poder descargar desde un repositorio git, y despues de eso, podremos descargar mapnik desde <a href="http://mapnik.org/download/" target="_blank">aquí</a></p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install git-core<br />
git clone https://github.com/mapnik/mapnik.git</p>
</div>
<p><a name="e4" class="nameerror">Error 4: Boost version >= 1.47 required</a><br />
Podemos comprobar nuestra versión de boost actual mirando en la línea 30 en el fichero /usr/include/boost/version.hpp para darnos cuenta de que no tenemos la versión 1.47 o superior, por lo que, tenemos que actualizarla. Esto no es tan sencillo como un simple apt-get install, pero es tan sencillo como: descargar e instalarlo.</p>
<p>Necesitamos descargar la última versión (<a href="http://www.boost.org/" target="_blank">http://www.boost.org/</a>) (a dia de hoy, la 1.52, desde <a href="http://sourceforge.net/projects/boost/files/boost/1.52.0/" target="_blank">http://sourceforge.net/projects/boost/files/boost/1.52.0/</a>). Seleccionamos el fichero tar.bz2, lo descomprimimos, configuramos y demás.</p>
<div class="commandsosm">
<p class="commandsosm">bunzip2 boost_1_52_0.tar.bz2<br />
tar xvf boost_1_52_0.tar<br />
./bootstrap.sh<br />
./b2<br />
sudo ./b2 install</p>
</div>
<p><a name="e5" class="nameerror">Error 5: No existen algunos archivos necesarios!</a><br />
Después de intentar generar la imagen (vaya suerte, justo fallando en el último paso&#8230;) se nos podria devolver el siguiente error.</p>
<div class="errordesc">
RuntimeError: Shape Plugin: shapefile &#8216;/home/lipman/bin/mapnik/world_boundaries/110m_admin_0_boundary_lines_land.shp&#8217; does not exist  encountered during parsing of layer &#8216;necountries&#8217; in Layer at line 58 of &#8216;osm.xml&#8217;</div>
<p>El único problema aquí es que necesitamos algunos archivos que no tenemos, por tanto, descarguémoslos y movámoslos a la carpeta world_boundaries para arreglarlo.</p>
<p>Encontré los archivos <a href="http://www.mmnt.net/db/0/0/195.16.220.82/pub/osm/mapnik-data-files/world_boundaries" target="_blank">aquí</a>. Tenemos que descargar los siguientes:</p>
<ul>
<li>110m_admin_0_boundary_lines_land.shp</li>
<li>110m_admin_0_boundary_lines_land.dbf</li>
<li>10m_populated_places.shp (*)</li>
<li>10m_populated_places.dbf (*)</li>
</ul>
<p>(*): Tenemos que renombrarlos a &#8220;<b>ne_</b>10m&#8230;&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://delanover.com/2012/12/21/creando-un-servidor-de-openstreetmap-en-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build an OpenStreetMap server on Ubuntu 10.04</title>
		<link>http://delanover.com/2012/12/21/build-an-openstreetmap-server-on-ubuntu-10-04/</link>
		<comments>http://delanover.com/2012/12/21/build-an-openstreetmap-server-on-ubuntu-10-04/#comments</comments>
		<pubDate>Fri, 21 Dec 2012 13:49:50 +0000</pubDate>
		<dc:creator>lipman</dc:creator>
				<category><![CDATA[Información]]></category>

		<guid isPermaLink="false">http://delanover.com/?p=1471</guid>
		<description><![CDATA[Index 1.-Introduction 2.-Let&#8217;s start 3.-Preparing the database 4.-Install Mapnik library 5.-Install prepared world boundary data 6.-Render your first map 7.-Troubleshooting 1.-Introduction Firstly I woudl like to thank &#8220;rw&#8221;, the author of the post this post is about. This post is based (95%) on this one (currently not available, but you can check it out here) [...]]]></description>
				<content:encoded><![CDATA[<style>
div.commandsosm {
border:1px dashed grey;
margin-left:15px;
margin-bottom:13px;
}
p.commandsosm {
margin-left:20px;
margin-top:10px;
}
a.linkerror {
color:red;
}
a.nameerror {
color:red;
}
div.errordesc {
font-size:10px;
background-color:white;
border:1px solid black;
margin-bottom:13px;
}
div.commandresponses {
background-color:#B0B0B0;
border:1px dotted black;
margin-left:15px;
margin-bottom:13px;
}
p.commandresponses {
margin-left:20px;
margin-top:10px;
}
a.nameerror {
font-size:15px;
font-weight:bold;
}
a.titletext {
color:black;
}
</style>
<p><u>Index</u><br />
<a href="#index1" class="indextext">1.-Introduction</a><br />
<a href="#index2" class="indextext">2.-Let&#8217;s start</a><br />
<a href="#index3" class="indextext">3.-Preparing the database</a><br />
<a href="#index4" class="indextext">4.-Install Mapnik library</a><br />
<a href="#index5" class="indextext">5.-Install prepared world boundary data</a><br />
<a href="#index6" class="indextext">6.-Render your first map</a><br />
<a href="#index7" class="indextext">7.-Troubleshooting</a></p>
<p><a href="http://delanover.com/2012/12/21/creando-un-servidor-de-openstreetmap-en-ubuntu-10-04/"><img src="http://delanover.com/wp-content/uploads/flags/spain.png"></a></p>
<h1><u><a name="index1" class="titletext">1.-Introduction</a></u></h1>
<p>Firstly I woudl like to thank &#8220;rw&#8221;, the author of the post this post is about. This post is based (95%) on <a href="http://weait.com/content/build-your-own-openstreetmap-server" target="_blank">this one</a> (currently not available, but you can check it out <a href="http://web.archive.org/web/20100612043730/http://weait.com/content/build-your-own-openstreetmap-server" target="_blank">here</a>)</p>
<p>My main intention is spread this post to all my viewers and save here this knowledge about OSM platform to have at least an online reference for everyone (and of course, for me). This is neither an introduction nor post information about OSM, but just technical info about building up your own OSM server. I also would like to improve my knowledge about this server (I don&#8217;t want just to download, install and run it, it would be nice trying to understand it).</p>
<p>I won&#8217;t just copy and paste the same content of there, because (as an ordinary large installation) I had problems installing this platform and I solved then, so I will write here everything I saw, I solved, and my personal conclusions. I also will go in depth in some issues like explaining some commands and stuff.</p>
<h1><u><a name="index2" class="titletext">2.-Let&#8217;s start</a></u></h1>
<h4>Upgrade your system</h4>
<p>Just for security issues, it is recommended to update and upgrade your system, but not necessary.</p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get update<br />
sudo apt-get upgrade</p>
</div>
<h4>Get some system tools</h4>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install subversion autoconf screen munin-node munin htop</p>
</div>
<p><b>Subversion</b>: we&#8217;ll use it to donwload files from some repositories.<br />
<b>Autoconf</b>: software to generate autoconfig scripts.<br />
<b>Screen</b>: Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.<br />
<b>Munin-node</b>: software to monitoring our server from the client.<br />
<b>Munin</b>: client of munin-node.<br />
<b>Htop</b>: software to check and monitoring the system used resources.</p>
<h4>Organize your filesystem a bit</h4>
<div class="commandsosm">
<p class="commandsosm">cd ~<br />
mkdir src bin planet</p>
</div>
<ul>
<li>src: source of mapnik.</li>
<li>bin: here we&#8217;ll have the scripts to generate the image and load the database.</li>
<li>planet: planet (or piece) database we&#8217;re gonna build up.</li>
</ul>
<h4>Get the latest planet (OSM file)</h4>
<p>Well, in this part we can download the <a href="http://planet.openstreetmap.org/" taget="_blank">entire world wide database</a> (nowadays [20 dec 2012] is 24GBs) or maybe we can download not the world but a <a href="http://download.geofabrik.de/openstreetmap/" target="_blank">piece</a>. Just for testing I will choose download a piece.</p>
<div class="commandsosm">
<p class="commandsosm">cd planet<br />
wget http://planet.openstreetmap.org/planet-latest.osm.bz2</p>
</div>
<h1><u><a name="index3" class="titletext">3.-Preparing the database</a></u></h1>
<p>Here we&#8217;re gonna download postgresql to deploy our own database there and some required libraries to use it.</p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install postgresql-8.4-postgis postgresql-contrib-8.4<br />
sudo apt-get install postgresql-server-dev-8.4<br />
sudo apt-get install build-essential libxml2-dev<br />
sudo apt-get install libgeos-dev libpq-dev libbz2-dev proj</p>
</div>
<p><b>Build-essential</b>: This package contains an informational list of packages which are considered essential for building Debian packages.<br />
<b>Libxml2-dev</b>: Very useful if you wish to develop your own programs using the GNOME XML library.<br />
<b>Libgeos-dev</b>: GEOS provides a spatial object model and fundamental geometric functions. It implements the geometry model defined in the OpenGIS Consortium Simple Features Specification for SQL.<br />
<b>Libpq-dev</b>: Header files and static library for compiling C programs to link with the libpq library in order to communicate with a PostgreSQL database backend.<br />
<b>Libbz2-dev</b>: Static libraries and include files for the bzip2 compressor library.<br />
<b>Proj</b>: Standard Unix filter function which converts geographic longitude and latitude coordinates into cartesian coordinates, by means of a wide variety of cartographic projection functions.</p>
<h4>Install osm2pgsql from the repository</h4>
<p>We firstly download osm2pgsql from the repository and after that, configurate it. osm2pgsql is a utility program that converts OpenStreetMap data to PostgreSQL databases.</p>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin<br />
svn co http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/<br />
cd osm2pgsql<br />
./autogen.sh (<a href="#e1" class="linkerror">Error?</a>)<br />
./configure<br />
make</p>
</div>
<h4>Configure the PostGIS database</h4>
<p>edit /etc/postgresql/8.4/main/postgresql.conf in four places. These changes help with the large quantities of data that we are using.</p>
<div class="commandsosm">
<p class="commandsosm"><i>107:</i> shared_buffers = 128MB # 16384 for 8.1 and earlier<br />
<i>170:</i> checkpoint_segments = 20<br />
<i>(new line):</i> maintenance_work_mem = 256MB # 256000 for 8.1 and earlier<br />
<i>387:</i> autovacuum = off</p>
</div>
<p>edit /etc/sysctl.conf</p>
<div class="commandsosm">
<p class="commandsosm"><i>(new line)</i> kernel.shmmax=268435456</p>
</div>
<p>Remind that the above only takes effect after a reboot. Making this work immediately requires the following.</p>
<div class="commandsosm">
<p class="commandsosm">sudo sysctl kernel.shmmax=268435456</p>
</div>
<p>Restart postgres to enable the changes.</p>
<div class="commandsosm">
<p class="commandsosm">sudo /etc/init.d/postgresql-8.4 restart</p>
</div>
<p>Create a database called &#8220;gis&#8221;. Some of our future tools presume that you will use this database name. Substitute your username for &#8220;username&#8221; in two places below. This should be the username that will render maps with mapnik.<br />
<b>Note from delanover author</b>: I had problems with the username so I decided to use the same username that in the computer server system.</p>
<div class="commandsosm">
<p class="commandsosm">sudo -u postgres -i<br />
createuser username # answer yes for superuser<br />
createdb -E UTF8 -O username gis<br />
createlang plpgsql gis<br />
exit</p>
</div>
<p>Set up PostGIS on the postresql database.</p>
<div class="commandsosm">
<p class="commandsosm">psql -f /usr/share/postgresql/8.4/contrib/postgis.sql -d gis</p>
</div>
<p>This should respond with many lines ending with</p>
<div class="commandresponses">
<p class="commandresponses">&#8230;<br />
CREATE FUNCTION<br />
COMMIT
</p>
</div>
<p>Substitute your username for &#8220;username&#8221; in two places in the next line. This should be the username that will render maps with mapnik.</p>
<div class="commandsosm">
<p class="commandsosm">echo &#8220;ALTER TABLE geometry_columns OWNER TO username; ALTER TABLE spatial_ref_sys OWNER TO username;&#8221; | psql -d gis</p>
</div>
<p>Should reply with</p>
<div class="commandresponses">
<p class="commandresponses">ALTER TABLE<br />
ALTER TABLE</p>
</div>
<p>Enable intarray</p>
<div class="commandsosm">
<p class="commandsosm">psql -f /usr/share/postgresql/8.4/contrib/_int.sql -d gis</p>
</div>
<p>Replies with many lines ending with</p>
<div class="commandresponses">
<p class="commandresponses">&#8230;<br />
CREATE FUNCTION<br />
CREATE OPERATOR CLASS</p>
</div>
<p>Set the Spatial Reference Identifier (SRID) on the new database.</p>
<div class="commandsosm">
<p class="commandsosm">psql -f ~/bin/osm2pgsql/900913.sql -d gis</p>
</div>
<p>Should reply with</p>
<div class="commandresponses">
<p class="commandresponses">INSERT 0 1</p>
</div>
<p>Load planet into the database with osm2pgsql</p>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin/osm2pgsql<br />
./osm2pgsql -S default.style &#8211;slim -d gis -C 2048 ~/planet/YourFileMap.osm.bz2 (<a href="#e2" class="linkerror">Error?</a>)</p>
</div>
<p><b>Note</b>: load 8.4GB take 30 hours, and particularly 1.4GB took me 3-4 hours (it depends of the I/O), so <u>be patient</u>.</p>
<div class="commandresponses">
<p class="commandresponses">
Completed planet_osm_roads<br />
Copying planet_osm_polygon to cluster by geometry finished<br />
Copying planet_osm_line to cluster by geometry finished<br />
Creating indexes on  planet_osm_polygon finished<br />
All indexes on  planet_osm_polygon created  in 4257s<br />
Completed planet_osm_polygon<br />
Creating indexes on  planet_osm_line finished<br />
All indexes on  planet_osm_line created  in 5053s<br />
Completed planet_osm_line<br />
Stopped table: planet_osm_ways in 16095s<br />
Osm2pgsql took 29436s overall</p>
</div>
<h1><u><a name="index4" class="titletext">4.-Install Mapnik library</a></u></h1>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install libltdl3-dev libpng12-dev libtiff4-dev libicu-dev<br />
sudo apt-get install libboost-python1.40-dev python-cairo-dev python-nose<br />
sudo apt-get install libboost1.40-dev libboost-filesystem1.40-dev<br />
sudo apt-get install libboost-iostreams1.40-dev libboost-regex1.40-dev libboost-thread1.40-dev<br />
sudo apt-get install libboost-program-options1.40-dev libboost-python1.40-dev<br />
sudo apt-get install libfreetype6-dev libcairo2-dev libcairomm-1.0-dev<br />
sudo apt-get install libgeotiff-dev libtiff4 libtiff4-dev libtiffxx0c2<br />
sudo apt-get install libsigc++-dev libsigc++0c2 libsigx-2.0-2 libsigx-2.0-dev<br />
sudo apt-get install libgdal1-dev python-gdal<br />
sudo apt-get install imagemagick</p>
</div>
<p><b>Libltdl3-dev</b>: A small library that aims at hiding the various difficulties of dlopening libraries from programmers. It is a system independent dlopen wrapper for GNU libtool.<br />
<b>Libpng12-dev</b>: Library implementing an interface for reading and writing PNG format files.<br />
<b>Libtiff4-dev</b>: Library providing support for the Tag Image File Format (TIFF), a widely used format for storing image data. This package includes the development files, static library, and header files.<br />
<b>Libicu-dev</b>: ICU is a C++ and C library that provides robust and full-featured Unicode and locale support. This package contains the development files for ICU along with programs used to manipulate data files found in the ICU sources.<br />
<b>Libboost libraries</b>: Boost provides free peer-reviewed portable C++ source libraries.<br />
<b>Python libraries</b>: So obvious.<br />
<b>Libfreetype6-dev</b>: This package contains all supplementary files (static library, headers and documentation) you need to develop your own programs using the FreeType 2 library (digital typography library).<br />
<b>Libcairo2-dev</b>: Cairo is a multi-platform library providing anti-aliased vector-based rendering for multiple target backends.<br />
<b>Libgeotiff-dev</b>: The GeoTIFF standard has been developed for reading, and writing geographic meta-information tags on top of TIFF raster.<br />
<b>Tiff libraries</b>: So obvious, to work with tiff format.<br />
<b>Libsigc libraries</b>: implement a typesafe callback system for standard C++. It allows you to define signals and to connect those signals to any callback function, either global or a member function, regardless of whether it is static or virtual.<br />
<b>Libgdal1-dev</b>: GDAL is a translator library for raster geospatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats.<br />
<b>Imagemagick</b>: software suite to create, edit, compose, or convert bitmap images.</p>
<p>Build Mapnik library from source.</p>
<div class="commandsosm">
<p class="commandsosm">cd ~/src<br />
svn co http://svn.mapnik.org/tags/release-0.7.1/ mapnik (<a href="#e3" class="linkerror">Error?</a> <i>offline</i>)<br />
cd mapnik<br />
python scons/scons.py configure INPUT_PLUGINS=all OPTIMIZATION=3 SYSTEM_FONTS=/usr/share/fonts/truetype/ (<a href="#e4" class="linkerror">Error?</a> <i>boost version</i>)<br />
python scons/scons.py #be patient here<br />
sudo python scons/scons.py install<br />
sudo ldconfig</p>
</div>
<p>Confirm that Mapnik library is installed.</p>
<div class="commandsosm">
<p class="commandsosm">python<br />
>>> import mapnik<br />
>>> </p>
</div>
<h4>Install Mapnik tools</h4>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin<br />
svn co http://svn.openstreetmap.org/applications/rendering/mapnik</p>
</div>
<h1><u><a name="index5" class="titletext">5.-Install prepared world boundary data</a></u></h1>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin/mapnik<br />
mkdir world_boundaries<br />
wget http://tile.openstreetmap.org/world_boundaries-spherical.tgz<br />
tar xvzf world_boundaries-spherical.tgz<br />
cd world_boundaries<br />
wget http://tile.openstreetmap.org/processed_p.tar.bz2<br />
bunzip2 processed_p.tar.bz2<br />
tar xvf processed_p.tar<br />
wget http://tile.openstreetmap.org/shoreline_300.tar.bz2<br />
bunzip2 shoreline_300.tar.bz2<br />
tar xvf shoreline_300.tar</p>
</div>
<h1><u><a name="index6" class="titletext">6.-Render your first map</a></u></h1>
<div class="commandsosm">
<p class="commandsosm">cd ~/bin/mapnik<br />
chmod +x generate_xml.py<br />
./generate_xml.py &#8211;dbname gis &#8211;accept-none <b>[IMPORTANT NOTE]</b></p>
</div>
<p><b>IMPORTANT NOTE</b>: I don&#8217;t know why but the double hyphen is not seen. Remember is &#8220;&#8211;&#8221; (two &#8220;-&#8221;) and not only one &#8220;-&#8221;.</p>
<div class="commandresponses">
<p class="commandresponses">
Include files written successfully! Pass the osm.xml file as an argument if you want to serialize a new version or test reading the XML
</p>
</div>
<p>Now we finally generate the image.</p>
<div class="commandsosm">
<p class="commandsosm">
./generate_image.py (<a href="#e5" class="linkerror">Error?</a>)
</p>
</div>
<p>The result of this is having a 10000x5000px PNG image of England en your mapnik folder. Remember, be patient. </p>
<p>Hope you enjoy this tutorial!</p>
<h1><u><a name="index7" class="titletext">7.-Troubleshooting</a></u></h1>
<p><a name="e1" class="nameerror">Error 1: Configuring at installing osm2pgsql</a><br />
Output error at performing ./configure when installing osm2pgsql:</p>
<div class="errordesc">
Can&#8217;t exec &#8220;libtoolize&#8221;: No such file or directory at /usr/bin/autoreconf line 189.<br />
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 189.<br />
autoreconf: Entering directory `.&#8217;<br />
autoreconf: configure.ac: not using Gettext<br />
autoreconf: running: aclocal &#8211;force -I m4<br />
configure.ac:41: warning: macro `AM_PROG_LIBTOOL&#8217; not found in library<br />
autoreconf: configure.ac: tracing<br />
autoreconf: configure.ac: not using Libtool<br />
autoreconf: running: /usr/bin/autoconf &#8211;force<br />
configure.ac:41: error: possibly undefined macro: AM_PROG_LIBTOOL<br />
     If this token and others are legitimate, please use m4_pattern_allow.<br />
     See the Autoconf documentation.<br />
autoreconf: /usr/bin/autoconf failed with exit status: 1
</div>
<p><font color="green">Solution</font><br />
You can&#8217;t exec libtoolize, so you must install libtool before continue, writting down: </p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install libtool</p>
</div>
<p><a name="e2" class="nameerror">Error 2: Loading planet into the database</a><br />
Maybe you get this error while loading the data:</p>
<div class="errordesc">
The target database has the intarray contrib module loaded.<br />
While required for earlier versions of osm2pgsql, intarray<br />
is now unnecessary and will interfere with osm2pgsql&#8217;s array<br />
handling. Please use a database without intarray.</p>
<p>Error occurred, cleaning up
</p></div>
<p>To fix it, we&#8217;ll do some fix located in the <a href="http://wiki.openstreetmap.org/wiki/Talk:Openptmap/Installation"  target="_blank">official documentation.</a></p>
<div class="commandsosm">
<p class="commandsosm"><b>sudo -u postgres -i -H<br />
dropdb ptgis</b>  ### here the old database is dropped<br />
<b>createdb -E UTF8 -O ptuser ptgis<br />
createlang plpgsql ptgis</b><br />
# for Ubuntu <=9.10:<br />
  # psql -d ptgis -f /usr/share/postgresql/8.3/contrib/_int.sql ### (do not execute this line)<br />
  psql -d ptgis -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql<br />
# for Ubuntu >=10.04:<br />
  #psql -d ptgis -f /usr/share/postgresql/8.4/contrib/_int.sql ### (do not execute this line)<br />
  <b>psql -d ptgis -f /usr/share/postgresql/8.4/contrib/postgis.sql<br />
psql ptgis -c &#8220;ALTER TABLE geometry_columns OWNER TO ptuser&#8221;<br />
psql ptgis -c &#8220;ALTER TABLE spatial_ref_sys OWNER TO ptuser&#8221;<br />
exit</b></p>
<p># for Ubuntu <=9.10:<br />
  sudo /etc/init.d/postgresql-8.3 reload<br />
# for Ubuntu >=10.04:<br />
<b>  sudo /etc/init.d/postgresql-8.4 reload</p>
<p>psql ptgis ptuser -f osm2pgsql/900913.sql</b></p>
</div>
<p>Now, we try to load the data again.</p>
<p><a name="e3" class="nameerror">Error 3: Offline mapnik repository</a><br />
I set this up as an error because who knows, maybe someday is online again. But now it is not, so let&#8217;s find another place to download it.<br />
We need to download git software in order to download from a git repository, and after that, we&#8217;ll be able to download mapnik from <a href="http://mapnik.org/download/" target="_blank">here</a></p>
<div class="commandsosm">
<p class="commandsosm">sudo apt-get install git-core<br />
git clone https://github.com/mapnik/mapnik.git</p>
</div>
<p><a name="e4" class="nameerror">Error 4: Boost version >= 1.47 required</a><br />
We can actually check our boost version looking at line 30 in /usr/include/boost/version.hpp file to realize that we don&#8217;t have 1.47 version or greater, so, we have to upgrade it. This is not that simple than apt-get install, but is this simple: download and install it.</p>
<p>We need to download the last version (<a href="http://www.boost.org/" target="_blank">http://www.boost.org/</a>) (nowadays, 1.52, from <a href="http://sourceforge.net/projects/boost/files/boost/1.52.0/" target="_blank">http://sourceforge.net/projects/boost/files/boost/1.52.0/</a>). We select tar.bz2 file, unzip it, configure it and so on.</p>
<div class="commandsosm">
<p class="commandsosm">bunzip2 boost_1_52_0.tar.bz2<br />
tar xvf boost_1_52_0.tar<br />
./bootstrap.sh<br />
./b2<br />
sudo ./b2 install</p>
</div>
<p><a name="e5" class="nameerror">Error 5: Needed files don&#8217;t exist!</a><br />
After trying to generate the image (what a bad luck, failing in the last step&#8230;) this error might be returned to you.</p>
<div class="errordesc">
RuntimeError: Shape Plugin: shapefile &#8216;/home/lipman/bin/mapnik/world_boundaries/110m_admin_0_boundary_lines_land.shp&#8217; does not exist  encountered during parsing of layer &#8216;necountries&#8217; in Layer at line 58 of &#8216;osm.xml&#8217;</div>
<p>The only problem here is we need many files that we don&#8217;t have, so let&#8217;s download and move them to fix it into world_boundaries folder.<br />
I found that files <a href="http://www.mmnt.net/db/0/0/195.16.220.82/pub/osm/mapnik-data-files/world_boundaries" target="_blank">here</a>. We have to donwload this below:</p>
<ul>
<li>110m_admin_0_boundary_lines_land.shp</li>
<li>110m_admin_0_boundary_lines_land.dbf</li>
<li>10m_populated_places.shp (*)</li>
<li>10m_populated_places.dbf (*)</li>
</ul>
<p>(*): We have to rename them to &#8220;<b>ne_</b>10m&#8230;&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://delanover.com/2012/12/21/build-an-openstreetmap-server-on-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>¿Entradas ARP Estáticas contra ataques Man in the Middle?</title>
		<link>http://delanover.com/2012/07/04/entradas-arp-estaticas-contra-ataques-man-in-the-middle/</link>
		<comments>http://delanover.com/2012/07/04/entradas-arp-estaticas-contra-ataques-man-in-the-middle/#comments</comments>
		<pubDate>Wed, 04 Jul 2012 08:19:09 +0000</pubDate>
		<dc:creator>lipman</dc:creator>
				<category><![CDATA[Información]]></category>
		<category><![CDATA[Seguridad]]></category>
		<category><![CDATA[ARP]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://delanover.com/?p=1449</guid>
		<description><![CDATA[Un poco de teoría sobre MitM y ARP El protocolo ARP es el encargado de traducir de direcciones IP a MAC (y el inverso, traduce de MAC a IP lógicamente). Cuando estamos conectados a internet desde un portátil a traves de una red wireless, usamos este protocolo para saber a dónde tenemos que enviar nuestros [...]]]></description>
				<content:encoded><![CDATA[<h2>Un poco de teoría sobre MitM y ARP</h2>
<p>El protocolo ARP es el encargado de traducir de direcciones IP a MAC (y el inverso, traduce de MAC a IP lógicamente). Cuando estamos conectados a internet desde un portátil a traves de una red wireless, usamos este protocolo para saber a dónde tenemos que enviar nuestros paquetes (al router claramente) para que puedan ir a través de Internet y demás.</p>
<p>El envenenamiento de las tablas ARP consiste en decirle al ordenador víctima desde el ordenador atacante &#8220;el router se encuentra en esta otra dirección (la del atacante)&#8221;. De esta manera, la víctima piensa que le está enviando los paquetes al router, y realmente se los envía al atacante. Así, éste puede ver todo el tráfico de la víctima, que luego redirige al router, y realiza el camino inverso.</p>
<p><img src="http://i476.photobucket.com/albums/rr125/lipmandj/Sinttulo-2.png"></p>
<p>En la siguiente imagen, vemos una tabla ARP normal. Subrayado y en primer lugar, tenemos la dirección del router. Luego, dos direcciones de un par de equipos, broadcast, etc. Aquí no hay nada raro, está todo en orden.</p>
<p><a href="http://i476.photobucket.com/albums/rr125/lipmandj/img1-1.png target="_blank"><img src="http://i476.photobucket.com/albums/rr125/lipmandj/img1-1.png" width="400px"></a></p>
<p>Ahora, vamos a envenenar la tabla ARP desde un ordenador atacante.<br />
Como podemos ver, aparece otro ordenador con IP 192.168.2.103 (el atacante), y la MAC del router ha cambiado. Si os dais cuenta, es la misma que la del atacante.</p>
<p><a href="http://i476.photobucket.com/albums/rr125/lipmandj/img2-1.png target="_blank"><img src="http://i476.photobucket.com/albums/rr125/lipmandj/img2-1.png" width="400px"></a></p>
<p><b>Nota</b>: para ver la tabla ARP desde Windows se hace mediante <i>arp -a</i></p>
<h2>Solución: ¿Poner entradas ARP estáticas?</h2>
<p>Teóricamente, si ponemos entradas estáticas estamos seguros, ya que de esta forma ningún atacante puede cambiarlas para hacer pensar al ordenador víctima que el router está en otra dirección distinta. ¿Es lógico no? Si no se puede cambiar esto, se enviará siempre hacia el router.</p>
<p>Pues bien, vamos allá. Poner entradas ARP estáticas en Windows es más complicado que usar simplemente el comando ARP. Nuestra primera intención es hacerle caso a lo que nos dice la ayuda de ARP de la consola, y es usar:</p>
<p><i>arp -s IP MAC</i></p>
<p>Pero no funciona. Como he dicho, es algo más complicado. De hecho, uno de los motivos de crear esta entrada es para guardar cómo se hace, y así no tener que buscarlo si en un futuro es requerido hacerlo.</p>
<p>Primero de todo, necesitamos saber el nombre de la conexión. Para ello lo hacemos mediante:</p>
<p><i>netsh interface ip show config</i><br />
<a href="http://i476.photobucket.com/albums/rr125/lipmandj/img3-1.png target="_blank"><img src="http://i476.photobucket.com/albums/rr125/lipmandj/img3-1.png" width="400px"></a></p>
<p>Como podemos ver, el nombre de mi conexión es &#8220;Conexión de red inalámbrica&#8221;.<br />
Después, ejecutamos el siguiente comando:</p>
<p><i>netsh interface ipv4 add neighbors &#8220;NOMBRE_CONEXIÓN&#8221; IP MAC</i><br />
<a href="http://i476.photobucket.com/albums/rr125/lipmandj/img4-1.png" target="_blank"><img src="http://i476.photobucket.com/albums/rr125/lipmandj/img4-1.png" width="400px"></a></p>
<p>Importante: daros cuenta que la MAC está separada por guiones y no por dos puntos.</p>
<h2>Volvemos a reproducir el ataque</h2>
<p>¿Qué sucede si reproducimos de nuevo el ataque? ¿Seremos completamente invulnerables? La respuesta es <b>no</b>, no estamos seguros. Y ahora viene el porqué: el envenenamiento de la tabla ARP consiste en enviar paquetes hacia la víctima <u>y el router</u> para que le envien los paquetes al atacante. De esta forma ve todo lo que va de la víctima al router (y por tanto hacia Internet) y viceversa. Si le decimos al ordenador víctima que el router está en una dirección (con entradas estáticas), el router todavía seguirá pensando que el ordenador atacante es en realidad el de la víctima.</p>
<p>Paquetes ARP que envía el atacante. Como podemos ver, le dice al router &#8220;la dirección del ordenador (víctima) está en mi MAC&#8221; y le dice a la víctima &#8220;la dirección del router está en mi MAC&#8221;.</p>
<p><a href="http://i476.photobucket.com/albums/rr125/lipmandj/Screenshot.png" target="_blank"><img src="http://i476.photobucket.com/albums/rr125/lipmandj/Screenshot.png" width="400px"></a></p>
<p>Un dibujo de cómo quedaría ahora el envío de paquetes:</p>
<p><img src="http://i476.photobucket.com/albums/rr125/lipmandj/Untitled-2.png"></p>
<h2>Conclusiones</h2>
<p>Principalmente de este asunto saco dos conclusiones importantes.<br />
La primera de todas es, que para que sea realmente seguro, habría que poner estática también la entrada ARP del router que vaya dirigida hacia el ordenador. De esta forma no se alteraría nada de nada, y todo iría por su camino correspondiente.</p>
<p>La segunda conclusión es la siguiente: ¿realmente nos merece la pena poner entradas estáticas en nuestro ordenador en caso de no poder hacerlo en el router? Me explico: si no lo hacemos en el router, el atacante podrá obtener los paquetes que vienen del router (e Internet) hacia la victima y no los otros vale, pero es interesante tener las entradas dinámicas, para que si un atacante nos envenena nuestra tabla, nos demos cuentas (hay programas que detectan cuando una tabla ARP es cambiada y nos avisan, como Marmita).</p>
<p>Conclusión de las conclusiones: si podemos poner estáticas las entradas del ordenador y el router perfecto. Si no, es interesante dejarlas dinámicas y tener un programa que nos avise cuando sean cambiadas.</p>
]]></content:encoded>
			<wfw:commentRss>http://delanover.com/2012/07/04/entradas-arp-estaticas-contra-ataques-man-in-the-middle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
