<?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>Itimag.com &#187; servidor</title>
	<atom:link href="http://www.itimag.com/tag/servidor/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itimag.com</link>
	<description>Blog de un Ingeniero Informático</description>
	<lastBuildDate>Mon, 09 Jan 2012 11:54:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Streaming con Shoutcast en Debian</title>
		<link>http://www.itimag.com/unix/streaming/streaming-con-shoutcast-en-debian/</link>
		<comments>http://www.itimag.com/unix/streaming/streaming-con-shoutcast-en-debian/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 21:18:28 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Streaming]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=691</guid>
		<description><![CDATA[SHOUTcast es un software libre multiplataforma para el streaming que utiliza MP3 o ACC para la codificación del audio y HTTP como protocolo de transporte de este mismo, conocido como una radio de Internet.  El formato de salida que produce es soportado por múltiples aplicaciones cliente:  XMMS, Amarok, Apple iTunes y otros. Hay que tener [...]]]></description>
			<content:encoded><![CDATA[<p>SHOUTcast es un software libre multiplataforma para el streaming que utiliza MP3 o ACC para la codificación del audio y HTTP como protocolo de transporte de este mismo, conocido como una radio de Internet.  El formato de salida que produce es soportado por múltiples aplicaciones cliente:  XMMS, Amarok, Apple iTunes y otros.</p>
<p>Hay que tener en cuenta que una estación de  SHOUTcast necesita abrir ciertos puertos en el firewall o cortafuegos del servidor. En este caso necesitamos tener abiertos los puertos 8000/tcp y 8001/tcp en el cortafuegos (IPTables).</p>
<p><span style="text-decoration: underline;"><strong>Instalación</strong></span></p>
<p>- Lo primero de todo, debemos crear un nuevo usuario en el servidor con la finalidad de que sea éste el que ejecute el SHOUTcast (para mayor seguridad). Por ello, ejecutamos el siguiente comando en nuestra shell del servidor:</p>
<p><span id="more-691"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">useradd shoutcast</pre></div></div>

<p>- Ahora hacemos login con el usuario que acabamos de crear:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> - shoutcast</pre></div></div>

<p>- Descargamos la última versión de &#8220;SHOUTcast Linux server (glibc)&#8221; desde <a href="http://linux.softpedia.com/get/Multimedia/Audio/Shoutcast-7812.shtml" target="_blank">aquí</a>. Luego procedemos a descargar el &#8220;SHOUTcast DSP Plug-In for Mac OSX, Linux and FreeBSD&#8221;  desde <a href="http://www.shoutcast.com/download/broadcast.phtml" target="_blank">aquí</a>.  Guardaremos ambos ficheros en el directorio del usuario <strong>/home/shoutcast</strong>. Para descargarlos desde shell, podemos utilizar el comando wget:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>shoutcast<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>yp.shoutcast.com<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>sc1-<span style="color: #000000;">9</span>-<span style="color: #000000;">8</span><span style="color: #000000; font-weight: bold;">/</span>sc_serv_1.9.8_Linux.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>yp.shoutcast.com<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>sc_trans_posix_040.tgz</pre></div></div>

<p>- Ahora procedemos a descomprimir los ficheros descargados:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>shoutcast<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xfz sc_serv_x.x.x_Linux.tar.gz <span style="color: #660033;">-C</span> shoutcast<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xfz sc_trans_posix_xxx.tgz
<span style="color: #c20cb9; font-weight: bold;">mv</span> sc_trans_040<span style="color: #000000; font-weight: bold;">/</span> sc_trans</pre></div></div>

<p>- Ahora tendremos el servidor shoutcast en /home/shoutcast/shoutcast y el DSP Plug-In en /home/shoutcast/sc_trans.</p>
<p><span style="text-decoration: underline;"><strong>Configuración</strong></span></p>
<p>- Nos situamos sobre el directorio /home/shoutcast/shoutcast/ y  abrimos el fichero <strong>sc_serv.conf</strong> usando tu editor de texto favorito (mi preferido es el nano). Debes de modificar los siguientes valores:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">MaxUser</span>=<span style="color: #000000;">30</span> <span style="color: #666666; font-style: italic;">#Nº máximo de usuarios simultáneos. Yo he puesto 30</span>
<span style="color: #007800;">Password</span>=streaming <span style="color: #666666; font-style: italic;">#pon aquí una contraseña propia para el programa y recúerdala</span>
<span style="color: #007800;">PortBase</span>=<span style="color: #000000;">8000</span> <span style="color: #666666; font-style: italic;"># El puerto sobre el que se va a emitir en streaming</span>
<span style="color: #007800;">AdminPassword</span>=MyPassword <span style="color: #666666; font-style: italic;"># Contraseña del panel de administración</span></pre></div></div>

<p>- Ahora vamos a /home/shoutcast/sc_trans/ y editamos el fichero sc_trans.conf de la misma forma que el anterior :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PlaylistFile</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>shoutcast<span style="color: #000000; font-weight: bold;">/</span>sc_trans<span style="color: #000000; font-weight: bold;">/</span>playlist.lst
<span style="color: #007800;">ServerIp</span>=<span style="color: #000000;">213.251</span>.xxx.xxx <span style="color: #666666; font-style: italic;"># tu ip</span>
<span style="color: #007800;">ServerPort</span>=<span style="color: #000000;">8000</span> <span style="color: #666666; font-style: italic;"># El mismo puerto que el fichero anterior</span>
<span style="color: #007800;">Password</span>=streaming <span style="color: #666666; font-style: italic;"># Pon aquí la contraseña propia del programa de antes</span>
<span style="color: #007800;">StreamTitle</span>=Servidor_estreaming <span style="color: #666666; font-style: italic;"># El nombre del servidor de streaming</span>
<span style="color: #007800;">StreamURL</span>=<span style="color: #000000;">213.251</span>.xxx.xxx <span style="color: #666666; font-style: italic;"># La ip o un nombre de dominio que apunte a esta misma</span>
<span style="color: #007800;">Shuffle</span>=<span style="color: #000000;">1</span> <span style="color: #666666; font-style: italic;"># Poner a 0 para que las canciones se reproduzcan una tras otras</span>
<span style="color: #007800;">Bitrate</span>=<span style="color: #000000;">128000</span> <span style="color: #666666; font-style: italic;"># transmitimos a 128kbps/usuario</span>
<span style="color: #007800;">Channels</span>=<span style="color: #000000;">2</span> <span style="color: #666666; font-style: italic;"># Para ponerlo en stereo.</span></pre></div></div>

<p>- Creamos el directorio en el que introduciremos todas las canciones (Mp3). Al directorio le pondremos de nombre &#8220;content&#8221; . Una vez esto hecho, añadimos una serie de ficheros mp3 al directorio y procedemos a crear el  playlist o lista de reproducción:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>shoutcast<span style="color: #000000; font-weight: bold;">/</span>sc_trans
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> content
<span style="color: #7a0874; font-weight: bold;">&#91;</span>.. añade algunos mp3 al directorio content<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>shoutcast<span style="color: #000000; font-weight: bold;">/</span>sc_trans<span style="color: #000000; font-weight: bold;">/</span>content <span style="color: #660033;">-type</span> f <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.mp3&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; playlist.lst</pre></div></div>

<p><span style="text-decoration: underline;"><strong>Arrancando el servidor</strong></span></p>
<p>Para poner en marcha el servidor, introducimos los siguientes comandos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>shoutcast<span style="color: #000000; font-weight: bold;">/</span>shoutcast <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; .<span style="color: #000000; font-weight: bold;">/</span>sc_serv sc_serv.conf <span style="color: #000000; font-weight: bold;">&amp;</span>amp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>shoutcast<span style="color: #000000; font-weight: bold;">/</span>sc_trans <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; .<span style="color: #000000; font-weight: bold;">/</span>sc_trans_linux sc_trans.conf <span style="color: #000000; font-weight: bold;">&amp;</span>amp;</pre></div></div>

<p>Ahora verás una serie de lineas en el terminal. Si todo ha funcionado correctamente, debes de ser capaz de ver el estado abriendo el navegador y dirigiendote a http://tu_ip:8000/ . Ahora puedes ir al botón de &#8220;admin&#8221; y usar la contraseña de acceso al panel (usuario admin).</p>
<p>Ahora ya tienes tu servidor de esteaming en marcha. Puedes empezar a reproducir tu música desde el winamp u otro reproductor de escritorio o bien usar el <a href="http://creaweb.blogspot.com/2008/05/reproductor-flash-para-shoutcast-de.html" target="_self">siguiente reproductor flash</a> (o otro) para reproducirlo desde el navegador web.</p>
<p>Esto es todo. Saludos.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/streaming/streaming-con-shoutcast-en-debian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VPS con VMWare Server 2 [Parte 3]</title>
		<link>http://www.itimag.com/unix/virtualization/configuracion-de-red-vps-con-vmware-server-2/</link>
		<comments>http://www.itimag.com/unix/virtualization/configuracion-de-red-vps-con-vmware-server-2/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 16:13:36 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[ovh]]></category>
		<category><![CDATA[servidor]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=606</guid>
		<description><![CDATA[En las 2 entregas anteriores hemos visto como compilar el kernel y instalar vmware server 2. Ahora ya estamos listos para empezar a crear VPS. ¿Cómo creamos un VPS? la creación de un VPS es muy senzilla utilizando la interfaz web de la siguiente url: https://tu_ip:8333 .  Únicamente hay que tener en cuenta que en [...]]]></description>
			<content:encoded><![CDATA[<p>En las 2 entregas anteriores hemos visto como compilar el kernel y instalar vmware server 2. Ahora ya estamos listos para empezar a crear VPS.</p>
<p>¿Cómo creamos un VPS? la creación de un VPS es muy senzilla utilizando la interfaz web de la siguiente url: https://tu_ip:8333 .  Únicamente hay que tener en cuenta que en el momento de elegir el interfaz de red, hay que elegir el  modo &#8220;Host-only&#8221;.</p>
<p>Personalmente he creado un VPS con una distribución debian y a continuación voy a explicar la parte más importante: cómo debemos configurar la red para que nuestro VPS tenga acceso a internet. Esta configuración implica configurar el sistema operativo principal (sobre el que corre vmware server) y luego configurar el sistema operativo del VPS.</p>
<p><span id="more-606"></span></p>
<p><strong>Configuración de la red:</strong></p>
<p>Accedemos por ssh <strong>al sistema operativo principal (sobre el que corre vmware server) </strong>y observamos que existe la interfaz &#8220;vmnet1&#8243;. Para ello, ejecutamos el siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ifconfig</span></pre></div></div>

<p>Debemos ver algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">vmnet1    Lien encap:Ethernet  HWaddr 00:<span style="color: #000000;">50</span>:<span style="color: #000000;">56</span>:C0:00:01
          inet adr:10.154.98.1  Bcast:10.154.98.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:<span style="color: #000000;">1500</span>  Metric:<span style="color: #000000;">1</span>
          RX packets:<span style="color: #000000;">3675317</span> errors:<span style="color: #000000;">0</span> dropped:<span style="color: #000000;">0</span> overruns:<span style="color: #000000;">0</span> frame:<span style="color: #000000;">0</span>
          TX packets:<span style="color: #000000;">3013354</span> errors:<span style="color: #000000;">0</span> dropped:<span style="color: #000000;">0</span> overruns:<span style="color: #000000;">0</span> carrier:<span style="color: #000000;">0</span>
          collisions:<span style="color: #000000;">0</span> lg <span style="color: #c20cb9; font-weight: bold;">file</span> transmission:<span style="color: #000000;">1000</span>
          RX bytes:<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.0</span> b<span style="color: #7a0874; font-weight: bold;">&#41;</span>  TX bytes:<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.0</span> b<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Ahora comprovamos que el IP_Forwarding está activado. Para ello ejecutamos el siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>ip_forward</pre></div></div>

<p>La ejecución del comando debe de visualizar lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">1</span></pre></div></div>

<p>En caso de que no visualize un 1, no te preocupes, luego lo configuramos.</p>
<p>Ahora comprobamos que el proxy ARP está activado en la interfaz &#8220;vmnet1&#8243; mediante el siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>vmnet1<span style="color: #000000; font-weight: bold;">/</span>proxy_arp</pre></div></div>

<p>La ejecución del comando debe de visualizar lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">1</span></pre></div></div>

<p>En caso de que los valores anteriores sean 0, debemos activarlos. Ejecutamos los siguientes comandos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>ip_forward
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>vmnet1<span style="color: #000000; font-weight: bold;">/</span>proxy_arp</pre></div></div>

<p>La ip FailOver que vamos a configurar en nuestro VPS  y que utilizaremos en el ejemplo es: 91.121.58.158.</p>
<p>Añadimos una ruta en el sistema operativo principal para la IP que utilizaremos en el servidor VPS. Para ello, ejecutamos el siguient comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>route add 91.121.58.158 dev vmnet1</pre></div></div>

<p>Observamos que la ruta se ha añadido correctamente. Ejecutamos el siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">route <span style="color: #660033;">-n</span></pre></div></div>

<p>Observaremos algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface
91.121.58.158  0.0.0.0         255.255.255.255 UH    <span style="color: #000000;">0</span>      <span style="color: #000000;">0</span>        <span style="color: #000000;">0</span> vmnet1</pre></div></div>

<p>Ahora le toca el turno a la <strong>configuración de red del sistema operativo del VPS</strong>. Recuerdo que en este ejemplo se trata de un sistema operativo basado en debian y que los comandos de un sistema operativo a otro pueden cambiar. En nuesto caso debemos configurar la red de la siguiente forma:</p>
<p>Editamos el fichero de interfaces de red /etc/network/interfaces  con nuestro editor de texto preferido para configurar la IP en el servidor . En mi caso uno el editor &#8220;nano&#8221;. Por lo tanto, ejecutamos el siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>interfaces</pre></div></div>

<p>Debemos dejar algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># This file describes the network interfaces available on your system</span>
<span style="color: #666666; font-style: italic;"># and how to activate them. For more information, see interfaces(5).</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># The loopback network interface</span>
auto lo
iface lo inet loopback
&nbsp;
<span style="color: #666666; font-style: italic;"># The primary network interface</span>
allow-hotplug eth0
iface eth0 inet static
address 91.121.58.158 <span style="color: #666666; font-style: italic;">#La IP que hemos asignado a nuestro VPS</span>
netmask 255.255.255.255 <span style="color: #666666; font-style: italic;">#La máscara de subred de la ip</span>
dns-nameservers 213.186.33.99 <span style="color: #666666; font-style: italic;">#La IP del sistema operativo principal (el que corre vmware)</span>
&nbsp;
post-up <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>route add default dev eth0</pre></div></div>

<p>Ahora configuramos el resolv.conf (configuración de servidores DNS). Para ello, ejecutamos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>resolv.conf</pre></div></div>

<p>Debe quedar algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">search localdomain
nameserver 213.186.33.99 <span style="color: #666666; font-style: italic;">#La IP del sistema operativo principal(el que corre vmware). En éste tengo #corriendo el servidor de nombres de dominio bind.</span></pre></div></div>

<p>Ahora reiniciamos el VPS. Tras arrancar, debería tener acceso a internet.</p>
<p>Tras crear el VPS y configurar la conexión de red nos podemos encontrar con que únicamente podemos hacer ping hacia la ip del sistema operativo principal pero que no podemos acceder a internet. Esto puede ser debido a distintas causas. A mí me ha sucedido y he decidido detener el firewall csf + lfd. Tras ello seguía sin tener acceso a internet. ¿Qué puede ser?, me pregunté. Entonces pensé en el servidor de nombres de dominio (bind). Pensé en que lo tengo configurado de tal forma que ningún usuario externo pueda utilizar la ip del servidor para utilizarlo para resolver dominios web y que esta podría ser la causa. Entonces, accedía al fichero de configuración (nano /etc/bind/named.conf.options) y añadí la ip-failover asignada al VPS a la excepción o regla acl (acl recurseallow { 127.0.0.1;213.186.33.99; 91.121.58.158; } ).</p>
<p>El fichero resoltante /etc/bind/named.conf.options es:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">acl recurseallow <span style="color: #7a0874; font-weight: bold;">&#123;</span> 127.0.0.1; 213.186.33.99; 91.121.58.158; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
options <span style="color: #7a0874; font-weight: bold;">&#123;</span>
directory <span style="color: #ff0000;">&quot;/var/cache/bind&quot;</span>;
<span style="color: #000000; font-weight: bold;">//</span> If there is a firewall between you and nameservers you want
<span style="color: #000000; font-weight: bold;">//</span> to talk to, you might need to uncomment the query-source
<span style="color: #000000; font-weight: bold;">//</span> directive below.  Previous versions of BIND always asked
<span style="color: #000000; font-weight: bold;">//</span> questions using port <span style="color: #000000;">53</span>, but BIND <span style="color: #000000;">8.1</span> and later use an unprivileged
<span style="color: #000000; font-weight: bold;">//</span> port by default.
<span style="color: #000000; font-weight: bold;">//</span> query-source address <span style="color: #000000; font-weight: bold;">*</span> port <span style="color: #000000;">53</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">//</span> If your ISP provided one or <span style="color: #c20cb9; font-weight: bold;">more</span> IP addresses <span style="color: #000000; font-weight: bold;">for</span> stable
<span style="color: #000000; font-weight: bold;">//</span> nameservers, you probably want to use them <span style="color: #c20cb9; font-weight: bold;">as</span> forwarders.
&nbsp;
<span style="color: #000000; font-weight: bold;">//</span> Uncomment the following block, and insert the addresses replacing
<span style="color: #000000; font-weight: bold;">//</span> the all-<span style="color: #000000;">0</span> s placeholder.
<span style="color: #000000; font-weight: bold;">//</span> forwarders <span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #000000; font-weight: bold;">//</span>      0.0.0.0;
<span style="color: #000000; font-weight: bold;">//</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
auth-nxdomain no;    <span style="color: #666666; font-style: italic;"># conform to RFC1035</span>
listen-on-v6 <span style="color: #7a0874; font-weight: bold;">&#123;</span> any; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
allow-recursion <span style="color: #7a0874; font-weight: bold;">&#123;</span> recurseallow; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></div></div>

<p>Reiniciamos bind:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>bind9 restart</pre></div></div>

<p>Desde aquel momento puder hacer ping desde mi casa y tenía acceso a internet del VPS. Un éxito. Finalmente, volví a activar el firewall y me llevé una nueva sorpresa al ver que volvía a dejar de funcionar. Por lo tanto, tenemos que configurar también el firewall correctamente.</p>
<p>Esto es todo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/virtualization/configuracion-de-red-vps-con-vmware-server-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VPS con VMware Server 2 [Parte 2: Instalación]</title>
		<link>http://www.itimag.com/unix/virtualization/instalacion-de-vmware-2-en-debian/</link>
		<comments>http://www.itimag.com/unix/virtualization/instalacion-de-vmware-2-en-debian/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 20:52:46 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ovh]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servidor]]></category>
		<category><![CDATA[virtualización]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=594</guid>
		<description><![CDATA[Seguimos con el manual para crear VPS en el servidor. Lo primero que hay que hacer es descargar VMware Server 2. Es necesario (y gratuito) registrarse en la página para obtener el número de validación. Se tardan 2 minutos contados. Yo realizé la descarga directamente desde la shell del servidor ya que no dispongo de [...]]]></description>
			<content:encoded><![CDATA[<p>Seguimos con el manual para crear VPS en el servidor.</p>
<p>Lo primero que hay que hacer es descargar VMware Server 2. Es necesario (y gratuito) registrarse en la página para obtener el número de validación. Se tardan 2 minutos contados.</p>
<p>Yo realizé la descarga directamente desde la shell del servidor ya que no dispongo de interfaz gràfica para hacerlo. Para ello utilizé el navegador lynx y tras la descarga procedemos a descomprimirlo:</p>
<p><span id="more-594"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt
<span style="color: #c20cb9; font-weight: bold;">lynx</span> <span style="color: #000000; font-weight: bold;">&lt;</span>a <span style="color: #007800;">title</span>=<span style="color: #ff0000;">&quot;http://www.vmware.com/go/getserver&quot;</span> <span style="color: #007800;">href</span>=<span style="color: #ff0000;">&quot;http://www.vmware.com/go/getserver&quot;</span> <span style="color: #007800;">rel</span>=<span style="color: #ff0000;">&quot;nofollow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>http:<span style="color: #000000; font-weight: bold;">//</span>www.vmware.com<span style="color: #000000; font-weight: bold;">/</span>go<span style="color: #000000; font-weight: bold;">/</span>getserver<span style="color: #000000; font-weight: bold;">&lt;/</span>a<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf VMware-server-2.0.1-<span style="color: #000000;">156745</span>.i386.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> vmware-server-distrib<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Antes de proceder a la instalación de vmware vamos a añadir una interfaz de red a la tarjeta de red del servidor ya que habrá que indicarlo en una de las preguntas que hace el programa de instalación.<br />
A esta interfaz le vamos a dar el nombre de dummy0 y la introducimos editando el fichero /etc/network/interfaces. Para ello:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>interfaces</pre></div></div>

<p>Debemos introducir algo como lo siguiente al final del fichero:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">auto dummy0
iface dummy0 inet static
address 10.0.0.1  netmask 255.0.0.0</pre></div></div>

<p>Nota: Atento a elegir una IP de clase privada.</p>
<p>Ahora debemos iniciar la interfaz de red:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ifup</span> dummy0</pre></div></div>

<p>Comprobamos que la iterfaz esté activa mediante la ejecución del siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ifconfig</span></pre></div></div>

<p>Deberíamos ver algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dummy0    Link encap:Ethernet  HWaddr <span style="color: #000000;">22</span>:<span style="color: #000000;">79</span>:C0:<span style="color: #000000;">84</span>:9B:3D
inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0
UP BROADCAST RUNNING NOARP  MTU:<span style="color: #000000;">1500</span>  Metric:<span style="color: #000000;">1</span>
RX packets:<span style="color: #000000;">0</span> errors:<span style="color: #000000;">0</span> dropped:<span style="color: #000000;">0</span> overruns:<span style="color: #000000;">0</span> frame:<span style="color: #000000;">0</span>
TX packets:<span style="color: #000000;">0</span> errors:<span style="color: #000000;">0</span> dropped:<span style="color: #000000;">0</span> overruns:<span style="color: #000000;">0</span> carrier:<span style="color: #000000;">0</span>
collisions:<span style="color: #000000;">0</span> txqueuelen:<span style="color: #000000;">0</span>
RX bytes:<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.0</span> b<span style="color: #7a0874; font-weight: bold;">&#41;</span>  TX bytes:<span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.0</span> b<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Iniciamos la instalación de vmware 2 ejecutando el siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>vmware-install.pl</pre></div></div>

<p>Ahora se nos realizará una serie de preguntas que podemos dejar por defecto hasta que nos aparezca el siguiente mensaje:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">The installation of VMware Server 2.0.1 build-<span style="color: #000000;">156745</span> <span style="color: #000000; font-weight: bold;">for</span> Linux completed
successfully. You can decide to remove this software from your system at any
<span style="color: #000000; font-weight: bold;">time</span> by invoking the following <span style="color: #7a0874; font-weight: bold;">command</span>: “<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>vmware-uninstall.pl”.
&nbsp;
Before running VMware Server <span style="color: #000000; font-weight: bold;">for</span> the first <span style="color: #000000; font-weight: bold;">time</span>, you need to configure it by
invoking the following <span style="color: #7a0874; font-weight: bold;">command</span>: “<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>vmware-config.pl”. Do you want this
program to invoke the <span style="color: #7a0874; font-weight: bold;">command</span> <span style="color: #000000; font-weight: bold;">for</span> you now? <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Pulsamos intro y ahora nos aparecerá un mensaje en el que nos pide que leamos la licencia. Pulsamos espacio para avanzar el texto hasta que se visualice el mensaje que nos pregunte si estamos o no de acuerdo.  Indicamos que estamos de acuerdo.</p>
<p>Ahora aparece lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">None of the pre-built vmmon modules <span style="color: #000000; font-weight: bold;">for</span> VMware Server is suitable <span style="color: #000000; font-weight: bold;">for</span> your
running kernel.  Do you want this program to try to build the vmmon module <span style="color: #000000; font-weight: bold;">for</span>
your system <span style="color: #7a0874; font-weight: bold;">&#40;</span>you need to have a C compiler installed on your system<span style="color: #7a0874; font-weight: bold;">&#41;</span>? <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Pulsamos intro. Ahora nos pregunta por el path de los header, en nuestro caso se encuentran en:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.28<span style="color: #000000; font-weight: bold;">/</span>include</pre></div></div>

<p>Ahora debes seguir los mismos pasos que seguí:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Do you want networking <span style="color: #000000; font-weight: bold;">for</span> your virtual machines? <span style="color: #7a0874; font-weight: bold;">&#40;</span>yes<span style="color: #000000; font-weight: bold;">/</span>no<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">help</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Configuring a bridged network <span style="color: #000000; font-weight: bold;">for</span> vmnet0.
&nbsp;
Please specify a name <span style="color: #000000; font-weight: bold;">for</span> this network.
<span style="color: #7a0874; font-weight: bold;">&#91;</span>Bridged<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Your computer has multiple ethernet network interfaces available: dummy0, eth0,
eth0:<span style="color: #000000;">0</span>. Which one <span style="color: #000000; font-weight: bold;">do</span> you want to bridge to vmnet0? <span style="color: #7a0874; font-weight: bold;">&#91;</span>eth0<span style="color: #7a0874; font-weight: bold;">&#93;</span> dummy0
&nbsp;
The following bridged networks have been defined:
&nbsp;
. vmnet0 is bridged to dummy0
&nbsp;
Do you wish to configure another bridged network? <span style="color: #7a0874; font-weight: bold;">&#40;</span>yes<span style="color: #000000; font-weight: bold;">/</span>no<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>no<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Do you want to be able to use NAT networking <span style="color: #000000; font-weight: bold;">in</span> your virtual machines? <span style="color: #7a0874; font-weight: bold;">&#40;</span>yes<span style="color: #000000; font-weight: bold;">/</span>no<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> no
&nbsp;
Do you want to be able to use host-only networking <span style="color: #000000; font-weight: bold;">in</span> your virtual machines?
<span style="color: #7a0874; font-weight: bold;">&#91;</span>no<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
Configuring a host-only network <span style="color: #000000; font-weight: bold;">for</span> vmnet1.
&nbsp;
Please specify a name <span style="color: #000000; font-weight: bold;">for</span> this network.
<span style="color: #7a0874; font-weight: bold;">&#91;</span>HostOnly<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Do you want this program to probe <span style="color: #000000; font-weight: bold;">for</span> an unused private subnet? <span style="color: #7a0874; font-weight: bold;">&#40;</span>yes<span style="color: #000000; font-weight: bold;">/</span>no<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">help</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> no
&nbsp;
What will be the IP address of your host on the private
network? 192.168.1.1
&nbsp;
What will be the netmask of your private network? 255.255.255.0
&nbsp;
The following host-only networks have been defined:
&nbsp;
. vmnet1 is a host-only network on private subnet 192.168.1.0.
&nbsp;
Do you wish to configure another host-only network? <span style="color: #7a0874; font-weight: bold;">&#40;</span>yes<span style="color: #000000; font-weight: bold;">/</span>no<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>no<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
None of the pre-built vmnet modules <span style="color: #000000; font-weight: bold;">for</span> VMware Server is suitable <span style="color: #000000; font-weight: bold;">for</span> your
running kernel.  Do you want this program to try to build the vmnet module <span style="color: #000000; font-weight: bold;">for</span>
your system <span style="color: #7a0874; font-weight: bold;">&#40;</span>you need to have a C compiler installed on your system<span style="color: #7a0874; font-weight: bold;">&#41;</span>? <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Extracting the sources of the vmnet module.
&nbsp;
Building the vmnet module.
&nbsp;
Using <span style="color: #000000;">2.6</span>.x kernel build system.
<span style="color: #c20cb9; font-weight: bold;">make</span>: se ingresa al directorio <span style="color: #000000; font-weight: bold;">`/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #ff0000;">'
make -C /usr/src/linux-2.6.28/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: se ingresa al directorio `/usr/src/linux-2.6.28'</span>
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>driver.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>hub.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>userif.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>netif.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>bridge.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>filter.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>procfs.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>smac_compat.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>smac.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>vnetEvent.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>vnetUserListener.o
LD <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>vmnet.o
Building modules, stage <span style="color: #000000;">2</span>.
MODPOST <span style="color: #000000;">1</span> modules
CC      <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>vmnet.mod.o
LD <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span>  <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>vmware-config0<span style="color: #000000; font-weight: bold;">/</span>vmnet-only<span style="color: #000000; font-weight: bold;">/</span>vmnet.ko
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: se sale del directorio <span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.28<span style="color: #ff0000;">'
cp -f vmnet.ko ./../vmnet.o
make: se sale del directorio `/tmp/vmware-config0/vmnet-only'</span>
The vmnet module loads perfectly into the running kernel.
&nbsp;
Please specify a port <span style="color: #000000; font-weight: bold;">for</span> remote connections to use <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">902</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Please specify a port <span style="color: #000000; font-weight: bold;">for</span> standard http connections to use <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">8222</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Please specify a port <span style="color: #000000; font-weight: bold;">for</span> secure http <span style="color: #7a0874; font-weight: bold;">&#40;</span>https<span style="color: #7a0874; font-weight: bold;">&#41;</span> connections to use <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">8333</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
The current administrative user <span style="color: #000000; font-weight: bold;">for</span> VMware Server  is <span style="color: #ff0000;">''</span>.  Would you like to
specify a different administrator? <span style="color: #7a0874; font-weight: bold;">&#91;</span>no<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Using root <span style="color: #c20cb9; font-weight: bold;">as</span> the VMware Server administrator.
&nbsp;
You have a pre-existing vmInventory.xml.  The new version will be created <span style="color: #c20cb9; font-weight: bold;">as</span>
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>hostd<span style="color: #000000; font-weight: bold;">/</span>NEW_vmInventory.xml.  Please check the new <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">for</span> any new
values that you may need to migrate to your current vmInventory.xml.
&nbsp;
In <span style="color: #c20cb9; font-weight: bold;">which</span> directory <span style="color: #000000; font-weight: bold;">do</span> you want to keep your virtual machine files?
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>Virtual Machines<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
The path <span style="color: #ff0000;">&quot;/var/lib/vmware/Virtual Machines&quot;</span> does not exist currently. This
program is going to create it, including needed parent directories. Is this
what you want? <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
You have a pre-existing datastores.xml.  The new version will be created <span style="color: #c20cb9; font-weight: bold;">as</span>
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vmware<span style="color: #000000; font-weight: bold;">/</span>hostd<span style="color: #000000; font-weight: bold;">/</span>NEW_datastores.xml.  Please check the new <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">for</span> any new
values that you may need to migrate to your current datastores.xml.
&nbsp;
Do you want to enter a serial number now? <span style="color: #7a0874; font-weight: bold;">&#40;</span>yes<span style="color: #000000; font-weight: bold;">/</span>no<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">help</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>no<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Creating a new VMware VIX API installer database using the tar4 format.
&nbsp;
Installing VMware VIX API.
&nbsp;
In <span style="color: #c20cb9; font-weight: bold;">which</span> directory <span style="color: #000000; font-weight: bold;">do</span> you want to <span style="color: #c20cb9; font-weight: bold;">install</span> the VMware VIX API binary files?
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
In <span style="color: #c20cb9; font-weight: bold;">which</span> directory <span style="color: #000000; font-weight: bold;">do</span> you want to <span style="color: #c20cb9; font-weight: bold;">install</span> the VMware VIX API library files?
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware-vix<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
The path <span style="color: #ff0000;">&quot;/usr/lib/vmware-vix/lib&quot;</span> does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
In <span style="color: #c20cb9; font-weight: bold;">which</span> directory <span style="color: #000000; font-weight: bold;">do</span> you want to <span style="color: #c20cb9; font-weight: bold;">install</span> the VMware VIX API document pages?
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>vmware-vix<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
The path <span style="color: #ff0000;">&quot;/usr/share/doc/vmware-vix&quot;</span> does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
The installation of VMware VIX API 1.6.2 build-<span style="color: #000000;">156745</span> <span style="color: #000000; font-weight: bold;">for</span> Linux completed
successfully. You can decide to remove this software from your system at any
<span style="color: #000000; font-weight: bold;">time</span> by invoking the following <span style="color: #7a0874; font-weight: bold;">command</span>: <span style="color: #ff0000;">&quot;/usr/bin/vmware-uninstall-vix.pl&quot;</span>.
&nbsp;
Enjoy,
&nbsp;
<span style="color: #660033;">--the</span> VMware team
&nbsp;
Starting VMware services:
Virtual machine monitor                                             <span style="color: #000000; font-weight: bold;">done</span>
Virtual machine communication interface                             <span style="color: #000000; font-weight: bold;">done</span>
VM communication interface socket family:                           <span style="color: #000000; font-weight: bold;">done</span>
Virtual ethernet                                                    <span style="color: #000000; font-weight: bold;">done</span>
Bridged networking on <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vmnet0                                   <span style="color: #000000; font-weight: bold;">done</span>
Host-only networking on <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vmnet1 <span style="color: #7a0874; font-weight: bold;">&#40;</span>background<span style="color: #7a0874; font-weight: bold;">&#41;</span>                    <span style="color: #000000; font-weight: bold;">done</span>
DHCP server on <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vmnet1                                          <span style="color: #000000; font-weight: bold;">done</span>
VMware Server Authentication Daemon <span style="color: #7a0874; font-weight: bold;">&#40;</span>background<span style="color: #7a0874; font-weight: bold;">&#41;</span>                    <span style="color: #000000; font-weight: bold;">done</span>
Shared Memory Available                                             <span style="color: #000000; font-weight: bold;">done</span>
Starting VMware management services:
VMware Server Host Agent <span style="color: #7a0874; font-weight: bold;">&#40;</span>background<span style="color: #7a0874; font-weight: bold;">&#41;</span>                               <span style="color: #000000; font-weight: bold;">done</span>
VMware Virtual Infrastructure Web Access
Starting VMware autostart virtual machines:
Virtual machines                                                    <span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
The configuration of VMware Server 2.0.1 build-<span style="color: #000000;">156745</span> <span style="color: #000000; font-weight: bold;">for</span> Linux <span style="color: #000000; font-weight: bold;">for</span> this
running kernel completed successfully.</pre></div></div>

<p>Ya hemos finalizado la instalación.  Ahora podemos acceder a la fantástica interfaz web de vmware mediante la siguiente url: https://tu_ip:8333. Si no especificamos lo contrario durante la instalación, el usuario de acceso es root y la contraseña es la que dispone éste mismo en el servidor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/virtualization/instalacion-de-vmware-2-en-debian/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>VPS con VMware Sever 2 [Parte 1: Recompilación del kernel]</title>
		<link>http://www.itimag.com/unix/virtualization/recompilar-el-kernel-del-servidor-debian/</link>
		<comments>http://www.itimag.com/unix/virtualization/recompilar-el-kernel-del-servidor-debian/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 22:44:50 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ovh]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servidor]]></category>
		<category><![CDATA[virtualización]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=556</guid>
		<description><![CDATA[Hace un tiempo que me he empezado a interesar por la virtualización en equipos mediante el uso de vmware, xen, etc. Dado este interés decidí empezar a experimentar y crear algún que otro VPS (virtual private server) sobre la versión actual del sistema operativo del servidor: debian 4 etch. Así que me decidí y me [...]]]></description>
			<content:encoded><![CDATA[<p>Hace un tiempo que me he empezado a interesar por la virtualización en equipos mediante el uso de vmware, xen, etc. Dado este interés decidí empezar a experimentar y crear algún que otro VPS (virtual private server) sobre la versión actual del sistema operativo del servidor: debian 4 etch. Así que me decidí y me puse manos a la obra para instalar Vmware server 2 sobre debian 4 en vez de reinstalar el servidor con una distribución preparada por OVH (empresa en la que tengo el servidor) con vmware server 1.1.</p>
<p>¿La razón para instalar vmware server 2 en vez de la distribución ya preparada por OVH? Ninguna en especial, <img src='http://www.itimag.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> . Simplemente que no quería formatear y tenerme que poner a instalar apache+mysql+php+postfix o qmail+&#8230;+firewall de nuevo, a parte de la configuración de las DNS, los virtualhost, etc. Además, creo que puede llegar a ser divertido y los conocimientos obtenidos serán mallores.</p>
<p>La instalación de vmware 2 no es muy complicada pero me encontré con un pequeño inconveniente: para instalar vmware server debería recompilar el núcleo de linux(Kernel) y eso era algo que nunca había hecho (lo sé, aún no soy un experto en linux <img src='http://www.itimag.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) ¿Hay algún riesgo en hacerlo? La verdad es que no lo pensé demasiado ya que me daba igual lo que pudiera pasar y me puse manos a la obra para recompilar el kernel.</p>
<p>Estos son los pasos realizados (gracias a la información del usuario blh en los foros de <a href="http://www.esdebian.org/foro/29103/vmware-server-20-debian-etch-40">esdebian.org</a>):</p>
<p><span id="more-556"></span>1. Miramos que kernel tenemos instalado mediante el uso del comando  &#8216;uname -a&#8217;. Veremos algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Linux ksxxxxxx.kimsufi.com 2.6.24.5-grsec-xxxx-grs-ipv4-<span style="color: #000000;">32</span>  <span style="color: #666666; font-style: italic;">#3 SMP Wed May 28 09:09:25 CEST 2008 i686 GNU/Linux</span></pre></div></div>

<p>2. Cargamos el último kernel con la configuración disponible en el servidor OVH. Para ello nos descargaremos las fuentes, las descomprimiremos y configuraremos mediante el seguimiento de  los siguientes comandos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #000000; font-weight: bold;">&lt;</span>a <span style="color: #007800;">title</span>=<span style="color: #ff0000;">&quot;http://www.eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2&quot;</span> <span style="color: #007800;">href</span>=<span style="color: #ff0000;">&quot;http://www.eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.bz2&quot;</span> <span style="color: #007800;">rel</span>=<span style="color: #ff0000;">&quot;nofollow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>http:<span style="color: #000000; font-weight: bold;">//</span>www.eu.kernel.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>kernel<span style="color: #000000; font-weight: bold;">/</span>v2.6<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.28.tar.bz2<span style="color: #000000; font-weight: bold;">&lt;/</span>a<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xf linux-2.6.28.tar.bz2
<span style="color: #7a0874; font-weight: bold;">cd</span> linux-2.6.28
<span style="color: #c20cb9; font-weight: bold;">make</span> mrproper
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #000000; font-weight: bold;">&lt;</span>a <span style="color: #007800;">title</span>=<span style="color: #ff0000;">&quot;ftp://ftp.ovh.net/made-in-ovh/bzImage/2.6-config-xxxx-std-ipv4-32&quot;</span> <span style="color: #007800;">href</span>=<span style="color: #ff0000;">&quot;ftp://ftp.ovh.net/made-in-ovh/bzImage/2.6-config-xxxx-std-ipv4-32&quot;</span> <span style="color: #007800;">rel</span>=<span style="color: #ff0000;">&quot;nofollow&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.ovh.net<span style="color: #000000; font-weight: bold;">/</span>made-in-ovh<span style="color: #000000; font-weight: bold;">/</span>bzImage<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.6</span>-config-xxxx-std-ipv4-<span style="color: #000000;">32</span><span style="color: #000000; font-weight: bold;">&lt;/</span>a<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000;">2.6</span>-config-xxxx-std-ipv4-<span style="color: #000000;">32</span> .config
<span style="color: #c20cb9; font-weight: bold;">make</span> menuconfig</pre></div></div>

<p>Una vez tenemos el menú en pantalla, lo primero que hacemos es dirigirnos a &#8220;General Setup&#8221; y en &#8220;local version&#8221; donde aparece &#8220;-xxxx-std-ipv4-32&#8243; editamos (porque este kernel cargará módulos) y le añadimos al final &#8220;-mod&#8221; quedando pues &#8220;-xxxx-std-ipv4-32-mod&#8221;:</p>
<p><a href="http://www.itimag.com/wp-content/uploads/2009/04/1.jpg"><img class="alignnone size-full wp-image-579" title="1" src="http://www.itimag.com/wp-content/uploads/2009/04/1.jpg" alt="1" width="479" height="333" /></a></p>
<p><a href="http://www.itimag.com/wp-content/uploads/2009/04/3.jpg"><img class="alignnone size-full wp-image-585" title="3" src="http://www.itimag.com/wp-content/uploads/2009/04/3.jpg" alt="3" width="478" height="335" /></a></p>
<p>Entonces volvemos a la pantalla anterior a través de &#8220;Exit&#8221; y presionamos &#8220;Y&#8221; sobre &#8220;Enable loadable module support&#8221;, presionamos Enter y seguidamente activamos &#8220;Module unloading&#8221;. Aparecerá una nueva opción que también activaremos &#8230;</p>
<p><a href="http://www.itimag.com/wp-content/uploads/2009/04/4.jpg"><img class="alignnone size-full wp-image-589" title="4" src="http://www.itimag.com/wp-content/uploads/2009/04/4.jpg" alt="4" width="480" height="334" /></a></p>
<p><a href="http://www.itimag.com/wp-content/uploads/2009/04/6.jpg"><img class="alignnone size-full wp-image-590" title="6" src="http://www.itimag.com/wp-content/uploads/2009/04/6.jpg" alt="6" width="481" height="335" /></a></p>
<p><a href="http://www.itimag.com/wp-content/uploads/2009/04/7.jpg"><img class="alignnone size-full wp-image-591" title="7" src="http://www.itimag.com/wp-content/uploads/2009/04/7.jpg" alt="7" width="479" height="333" /></a></p>
<p>Ahora pulsamos &#8220;Exit&#8221; y en la pantalla principal guardamos la configuración con el nombre por defecto &#8220;.config&#8221; y esto sobreescribirá nuestro archivo.</p>
<p><a href="http://www.itimag.com/wp-content/uploads/2009/04/8.jpg"><img class="alignnone size-full wp-image-592" title="8" src="http://www.itimag.com/wp-content/uploads/2009/04/8.jpg" alt="8" width="480" height="334" /></a></p>
<p>Estamos listos. Vuelta a la consola y lo único que falta por teclear:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p>Cuando acabe pasamos a ocuparnos de LILO (instalado por defecto en el sistema del servidor).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> arch<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>bzImage <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>bzImage-2.6.24.5-xxxx-grs-ipv4-<span style="color: #000000;">32</span>-mod</pre></div></div>

<p>Editamos la configuración de LILO.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>lilo.conf</pre></div></div>

<p>Y sustituimos la imagen de arranque quedando así:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">image</span>=<span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>bzImage-2.6.27.10-xxxx-grs-ipv4-<span style="color: #000000;">32</span>-mod</pre></div></div>

<p>Guardamos y salimos.</p>
<p>En mi caso es ésa la versión pero para futuras actualizaciones no será aplicable así que es MUY importante que aparezca exactamente el nombre del fichero que hemos copiado al directorio /boot ; si reiniciamos y no podemos retomar el servidor por ssh, nos dirigimos al Manager y arrancamos Debian con uno de los kernels disponibles por OVH para rectificar la configuración de LILO (en caso de ser ése nuestro fallo).</p>
<p>Hacemos lo siguiente (vamos a reiniciar el equipo):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>lilo
shutdown <span style="color: #660033;">-r</span> now</pre></div></div>

<p>Eso sí, al reiniciar en el Manager debe aparecer que cargaremos el sistema a través de &#8220;hd&#8221;.</p>
<p>Seguimos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>linux-2.6.28<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> headers_install
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`</span></pre></div></div>

<p>Esto es todo lo que hay que hacer para recompilar el kernel. Ahora ya estamos preparados para descargar y instalar VMware Server en nuestro servidor. Veremos los pasos a seguir en el próximo post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/virtualization/recompilar-el-kernel-del-servidor-debian/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Instalando zabbix 1.6.2 en Debian etch</title>
		<link>http://www.itimag.com/unix/monitoring/instalando-zabbix-1-6-2-en-debian-etch/</link>
		<comments>http://www.itimag.com/unix/monitoring/instalando-zabbix-1-6-2-en-debian-etch/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 00:01:41 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[monitorización]]></category>
		<category><![CDATA[servicios]]></category>
		<category><![CDATA[servidor]]></category>
		<category><![CDATA[zabbix]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=500</guid>
		<description><![CDATA[Llevo unos días informándome de algún sistema que permita la monitorización de servidores con la misma finalidad que siempre: aprender . Buscando por la red encontré distintas aplicaciones de código libre entre las cuales se encuentra zabbix. Mi principal objetivo es el de disponer de un sistema de monitorización que me avise por mail cuando [...]]]></description>
			<content:encoded><![CDATA[<p>Llevo unos días informándome de algún sistema que permita la monitorización de servidores con la misma finalidad que siempre: aprender <img src='http://www.itimag.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  .</p>
<p>Buscando por la red encontré distintas aplicaciones de código libre entre las cuales se encuentra <a title="zabbrix webpage" href="http://www.zabbix.com/index.php" target="_self">zabbix</a>. Mi principal objetivo es el de disponer de un sistema de monitorización que me avise por mail cuando se produce la caída de cualquier servicio del servidor (ssh, ftp, apache, bind, etc). Zabbix permite eso y mucho más.</p>
<p>A continuación os explico como instalar la última versión en linux debian:</p>
<p>Instalamos todos los requerimientos de zabbix:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential libmysqlclient-dev libssl-dev libsnmp-dev apache2 libapache2-mod-php5 php5-gd php5-mysql mysql-server</pre></div></div>

<p>Añadimos el grupo y usuario zabbix ya que es necesario para la aplicación:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">groupadd zabbix
useradd <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'Zabbix'</span> <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix <span style="color: #660033;">-g</span> zabbix <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> zabbix
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">chown</span> zabbix:zabbix <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix</pre></div></div>

<p>Creamos la base de datos para zabbix:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-p</span> <span style="color: #660033;">-u</span> root
create database zabbix;
grant all on zabbix.<span style="color: #000000; font-weight: bold;">*</span> to <span style="color: #ff0000;">'zabbix'</span><span style="color: #000000; font-weight: bold;">@</span><span style="color: #ff0000;">'localhost'</span> identified by <span style="color: #ff0000;">'PASSWORD'</span>;
quit;</pre></div></div>

<p>Nota: debes substituir PASSWORD por la contraseña que le quieras asignar.</p>
<p>Descargamos y descomprimimos las fuentes</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ovh.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf zabbix-1.6.2.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> zabbix-1.6.2</pre></div></div>

<p>Compilamos el código fuente y instalamos zabbix_server y zabbix_agentd.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mysql</span> <span style="color: #660033;">--with-net-snmp</span> <span style="color: #660033;">--enable-server</span> <span style="color: #660033;">--enable-agent</span> <span style="color: #660033;">--with-libcurl</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Añadimos los puertos a /etc/services y creamos algunos ficheros de configuración:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; zabbix_agent 10050/tcp # Zabbix ports
zabbix_trap 10051/tcp&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>services
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> zabbix:zabbix <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix
<span style="color: #c20cb9; font-weight: bold;">cp</span> misc<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>zabbix_<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix</pre></div></div>

<p>Modificamos los datos de acceso a la base de datos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix_server.conf</pre></div></div>

<p>Modificamos lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DBHost</span>=localhost o tu db host
<span style="color: #007800;">DBName</span>=zabbix
<span style="color: #007800;">DBUser</span>=zabbix
<span style="color: #007800;">DBPassword</span>=ZABBIX_PASSWORD</pre></div></div>

<p>Nota: ZABBIX_PASSWORD corresponde con la contraseña que configuamos cuando dimos permisos con GRANT.</p>
<p>Copiamos los iniciadores de los servicios y hacemos una pequeña modificación:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>misc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>debian<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-agent</pre></div></div>

<p>Buscamos la linea</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>y la substituimos por</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>Ahora con el otro fichero:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-server</pre></div></div>

<p>Buscamos la linea</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>y la substituimos por</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${NAME}</span></pre></div></div>

<p>Subimos las tablas a la base de datos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> zabbix <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>create<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>mysql.sql
mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> zabbix <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>create<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>data.sql
mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span> zabbix <span style="color: #000000; font-weight: bold;">&amp;</span>lt; <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>zabbix<span style="color: #000000; font-weight: bold;">/</span>zabbix-1.6.2<span style="color: #000000; font-weight: bold;">/</span>create<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>images_mysql.sql</pre></div></div>

<p>Modificamos la configuración de nuestro php:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></div></div>

<p>Modificamos lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">max_execution_time = <span style="color: #000000;">300</span>
date.timezone = Europe<span style="color: #000000; font-weight: bold;">/</span>Madrid</pre></div></div>

<p>Reiniciamos apache e iniciamos los servicios de zabbix:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-server start
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>zabbix-agent start</pre></div></div>

<p>Ya podemos acceder a zabbix desde http://tu_ip/zabbix/ y seguimos las instrucciones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/monitoring/instalando-zabbix-1-6-2-en-debian-etch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Configurar el servidor DNS junto a un dominio</title>
		<link>http://www.itimag.com/unix/domain-name-server-dns/como-configurar-el-servidor-dns-junto-a-un-dominio/</link>
		<comments>http://www.itimag.com/unix/domain-name-server-dns/como-configurar-el-servidor-dns-junto-a-un-dominio/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 01:12:40 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[dominio]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=394</guid>
		<description><![CDATA[Hace unos días vimos como instalar un servidor de DNS en nuestro equipo o servidor y ahora toca ver como se configura para que éste sea capaz de resolver nuestros dominios. Supongamos que tenemos el dominio itimag.net y queremos configurarlo en nuestro servidor de tal forma que este mismo resuelva el dominios y que además [...]]]></description>
			<content:encoded><![CDATA[<p>Hace unos días vimos como instalar un servidor de DNS en nuestro equipo o servidor y ahora toca ver como se configura para que éste sea capaz de resolver nuestros dominios.</p>
<p>Supongamos que tenemos el dominio itimag.net y queremos configurarlo en nuestro servidor de tal forma que este mismo resuelva el dominios y que además tenga las entradas DNS primaria y secundária que nosotros mismos personalizaremos (en mi caso ns1.itimag.net para la primaria y ns2.itimag.net para la secundária).</p>
<p>Cuando hablo de dns primarias y secundarias, me refiero a aquellas que podemos modificar desde el panel de administración de dominios que nos ofrece nuestro agente registrador. Por ejemplo, en OVH es este: <a href="http://www.itimag.com/wp-content/uploads/2008/11/dns.png"><img class="aligncenter size-medium wp-image-472" title="dns" src="http://www.itimag.com/wp-content/uploads/2008/11/dns-300x218.png" alt="dns" width="300" height="218" /></a></p>
<p>Como observamos en la imagen, los DNS asociados a itimag.net son ns1.itimag.net y ns2.itimag.net. Pues bien, vamos a ver como configurar esto en nuestro servidor con la finalidad de que en el whois del dominio, aparezca ns1.itimag.net y ns2.itimag.net en vez de la IP xxx.xxx.xxx.xxx.</p>
<p>Como se observa en la imagen, los dos DNS (ns1.itimag.net y ns2.itimag.net) apuntan a distintas IP. Ambas IP están configuradas en el mismo equipo. No es precisamente así como debería estar ya que en caso de que el servidor falle, fallarían los 2 nombres de dominio y, por consiguiente, nadie podrá acceder al dominio o dominios configurados con estos servidores DNS.</p>
<p>En caso de que tu servidor disponga de una única ip, también puedes seguir el proceso que aquí se explica.</p>
<p>Pasemos a la acción:</p>
<ol>
<ol>
<li>Accedemos al servidor por ssh y dirigirnos al directorio /etc/bind/</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> user<span style="color: #000000; font-weight: bold;">@</span>xxx.xxx.xxx.xxx <span style="color: #660033;">-p</span> puerto
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">bind</span></pre></div></div>

<ol>
<ol>
<li>Para ver todos los ficheros de este directorio utilizamos el comando ls:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span></pre></div></div>

<ol>
<ol>
<li>Editamos el fichero /etc/bind/named.conf.local</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bind<span style="color: #000000; font-weight: bold;">/</span>named.conf.local</pre></div></div>

<ol>
<ol>
<li>Añadimos las siguientes zonas al fichero:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">zone &quot;ns1.itimag.net&quot; {
type master;
file &quot;/etc/bind/ns1.itimag.net&quot;;
allow-transfer {87.98.xxx.xxx; }; // Tu segunda IP
};
&nbsp;
zone &quot;ns2.itimag.net&quot; {
type master;
file &quot;/etc/bind/ns2.itimag.net&quot;;
};
&nbsp;
// La zona inversa
zone &quot;xxx.xxx.xxx.in-addr.arpa&quot; {
type master;
file &quot;/etc/bind/pri.xxx.xxx.xxx.in-addr.arpa&quot;;
};</pre></div></div>

<p>Nota: Debes substituir el nombre de dominio (itimag.net) por el tuyo y en el allow transfer insertar la segunda ip de tu equipo (o la ip del DNS secundario externo en caso de no tener segunda ip).</p>
<p>El nombre de la zona inversa viene determinado por nuestra ip de tal forma que la zona inversa para la ip 10.11.12.13 sería “12.11.10.in-addr.arpa”</p>
<p>Guardamos el fichero y salimos, pulsando &#8220;ctrl + o&#8221; y &#8220;ctrol+x&#8221;.</p>
<ol>
<ol>
<li>Ahora vamos crear los ficheros /etc/bind/ns1.itimag.net y /etc/bind/ns2.itimag.net :</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bind<span style="color: #000000; font-weight: bold;">/</span>ns1.itimag.net</pre></div></div>

<p>El fichero resultante debe ser algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">$ttl 86400
&nbsp;
@ IN SOA ns1.itimag.net. root.localhost. (
&nbsp;
2008092401; serial-no
&nbsp;
28800; refresh, seconds
&nbsp;
7200; retry, seconds
&nbsp;
604800; expiry, seconds
&nbsp;
86400 ); minimum-TTL, seconds
&nbsp;
;
&nbsp;
ns1.itimag.net.         IN NS ns1.itimag.net
&nbsp;
ns1.itimag.net.         IN A 213.251.xxx.xxx</pre></div></div>

<p>Nota: Debes substituir cada ns1.itimag.net por tu ns1.dominio.com. Debes substituir la línea que contiene el serial-no siguiendo la siguiente norma:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">Año  	   Mes     Día      ID
&nbsp;
2008       09      24       01; serial-no</pre></div></div>

<p>Los cuatro primeros dígitos corresponden al año. Los dos siguientes al mes. Los dos siguientes al día y los 2 restantes hacen referencia a un identificador que indica la versión del fichero (cada vez que modificamos el fichero, debemos incrementar en una unidad el ID). También debes substituir la IP 213.251.xxx.xxx con la ip de tu servidor.</p>
<p>Creamos el segundo fichero:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bind<span style="color: #000000; font-weight: bold;">/</span>ns2.itimag.net</pre></div></div>

<p>Contendrá lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">$ttl 86400
&nbsp;
@ IN SOA ns2.itimag.net. root.localhost. (
2008092401; serial-no
28800; refresh, seconds
7200; retry, seconds
604800; expiry, seconds
86400 ); minimum-TTL, seconds
;
&nbsp;
ns2.itimag.net.         IN NS ns2.itimag.net
ns2.itimag.net.         IN A 87.98.xxx.xxx</pre></div></div>

<p>Nota: Debemos de realizar los mismos cambios que en el fichero anterior. Modificamos el fichero /etc/resolv.conf para añadir nuestro dominio y las ip&#8217;s de nuestro servidor o servidores dns.</p>
<ol>
<ol>
<li>Creamos el fichero /etc/bind/pri.xxx.xxx.xxx.in-addr.arpa para la zona inversa:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bind<span style="color: #000000; font-weight: bold;">/</span>pri.xxx.xxx.xxx.in-addr.arpa</pre></div></div>

<p>Debe quedar algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">$ttl 86400
&nbsp;
@ IN SOA mi_dominio.com. root.localhost. (
2008071901; serial-no
28800; refresh, seconds
7200; retry, seconds
604800; expiry, seconds
86400 ); minimum-TTL, seconds
;
&nbsp;
NS ns1.mi_dominio.com.;
NS ns.kimsufi.com.;
&nbsp;
xxx PTR mi_dominio.com.</pre></div></div>

<p>Nota: El xxx corresponde con los últimos tres dígitos (o menos) de tu ip. El serial-no corresponde con la fecha actual: en este caso año 2008, mes 07, día 19, identificador 01. Cada vez que modifiquemos el fichero debemos aumentar en una unidad el identificador.</p>
<h3>Configuración del dominio:</h3>
<ol>
<ol>
<li>Añadimos el dominio a configurar insertando la siguiente linea:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">search mi_dominio.com</pre></div></div>

<ol>
<ol>
<li>Obsevemos que la ip de nuestro servidor se encuentra ya insertada en una linea como esta:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">nameserver tu_ip</pre></div></div>

<p>Ejemplo de configuración:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">search mi_dominio.com
nameserver 127.0.0.1
nameserver 213.251.xxx.xx</pre></div></div>

<ol>
<ol>
<li>Modificamos el fichero /etc/bind/named.conf.local y le añadimos la zona para nuestro dominio:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">zone &quot;mi_dominio.com&quot; {
type master;
file &quot;/etc/bind/pri.mi_dominio.com&quot;;
allow-transfer {213.186.33.199; };
};</pre></div></div>

<ol>
<ol>
<li>Creamos el ficgero /etc/bind/pri.mi_dominio.com</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bind<span style="color: #000000; font-weight: bold;">/</span>pri.mi_dominio.com</pre></div></div>

<p>Debe quedar algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">$ttl 86400
&nbsp;
@ IN SOA ns1.mi_dominio.com. root.localhost. (
2008092201; serial-no
28800; refresh, seconds
7200; retry, seconds
604800; expiry, seconds
86400 ); minimum-TTL, seconds
;
&nbsp;
NS xxx.xxx.xxx.xxx ;
NS ns.ns.kimsufi.com. ;
MX 10 mail.mi_dominio.com.;
&nbsp;
mi_dominio.com. A xxx.xxx.xxx.xxx
www A xxx.xxx.xxx.xxx
ns1 A xxx.xxx.xxx.xxx
mail A xxx.xxx.xxx.xxx
&nbsp;
mi_dominio.com. TXT &quot;v=spf1 a mx ~all&quot;
mi_dominio.com. TXT &quot;v=spf1 a -all&quot;</pre></div></div>

<p>Nota: Debemos substituir las xxx.xxx.xxx.xxx por la ip donde va a apuntar al dominio</p>
<ol>
<ol>
<li>Forzamos bind a actualizar las zonas:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>bind9 force-reload</pre></div></div>

<ol>
<ol>
<li>Ahora podemos observar si se han producido errores observando los logs del demonio ejecutando el siguiente comando:</li>
</ol>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">less</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>daemon.log</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/domain-name-server-dns/como-configurar-el-servidor-dns-junto-a-un-dominio/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>¿Dos IP en un mismo equipo o servidor?</title>
		<link>http://www.itimag.com/unix/dos-2-ip-en-un-mismo-equipo-o-servidor/</link>
		<comments>http://www.itimag.com/unix/dos-2-ip-en-un-mismo-equipo-o-servidor/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 00:20:51 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[añadir]]></category>
		<category><![CDATA[como]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dedicado]]></category>
		<category><![CDATA[fail-over]]></category>
		<category><![CDATA[geolocalizada]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=428</guid>
		<description><![CDATA[Seguimos con el curso de administración de servidores. Este es un ejemplo práctico de como añadir una segunda ip a un servidor en una misma interfaz o tarjeta de red utilizando una ip privada (para que fuera de utilidad, debería ser pública). Esto es útil para poder asignar a nuestro servidor distintas direcciones ip, permitiéndonos [...]]]></description>
			<content:encoded><![CDATA[<p>Seguimos con el curso de administración de servidores.</p>
<p>Este es un ejemplo práctico de como añadir una segunda ip a un servidor en una misma interfaz o tarjeta de red utilizando una ip privada (para que fuera de utilidad, debería ser pública). Esto es útil para poder asignar a nuestro servidor distintas direcciones ip, permitiéndonos de esta forma crear nuestros servidores de dns (ns1.ejemplo.com y ns2.ejemplo.com) en un mismo equipo sin que los analizadores de dns den error.</p>
<p>Esta acción tiene una desventaja muy grande: si falla nuestro equipo, no se resolverá el dominio/s ya que los dos servidores de nombres de dominio (o DNS) estarán caídos.</p>
<p>Si el servidor DNS y el servidor web que transmite nuestras páginas se encuentran en el mismo equipo, no hará falta que nos preocupemos de lo anterior ya que si se cae el servidor web, no hace falta que intente resolver el dominio ya que no resolverá por mucho que los servidores de dominio si que funcionen.</p>
<p>Tras esta explicación, pasemos a la acción</p>
<p>Veamos nuestra configuración actual. Para ello, escribimos lo siguiente en un el terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span></pre></div></div>

<p>Se visualiza algo como esto:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">itimag@server1:~$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:7D:DF:EA:07
          inet addr:192.168.2.222  Bcast:192.168.2.255  Mask:255
          inet6 addr: fe80::2e0:7dff:fedf:ea07/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:739 errors:0 dropped:0 overruns:0 frame:0
          TX packets:295 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:61160 (59.7 KiB)  TX bytes:41734 (40.7 KiB)
          Interrupt:11 Base address:0xc000
&nbsp;
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)</pre></div></div>

<p>Supongamos que queremos añadir la IP AAA.BBB.CCC.DDD a nuestra interfaz de red eth0 (nuestra interfaz de internet por cable).</p>
<p>Para ello, editamos el fichero /etc/network/interfaces de la manera siguiente :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>interfaces</pre></div></div>

<p>Observamos lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;"># This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
&nbsp;
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
             address xxx.xxx.xxx.xxx
             netmask 255.255.255.0
             gateway xxx.xxx.xxx.xxx</pre></div></div>

<p>Al final del fichero, debemos añadir lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">auto eth0:0
&nbsp;
iface eth0:0 inet static
               address AAA.BBB.CCC.DDD
               netmask 255.255.255.0
               gateway xxx.xxx.xxx.xxx # La puerta de enlace</pre></div></div>

<p>A continuación activamos la nueva interfaz que hemos definido:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ifup</span> eth0:<span style="color: #000000;">0</span></pre></div></div>

<p>Verificamos la configuración :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ifconfig</span></pre></div></div>

<p>Nos aparecerá algo parecido a lo siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">server1:/home/itimag# /sbin/ifconfig
&nbsp;
eth0      Link encap:Ethernet  HWaddr 00:E0:7D:DF:EA:07
          inet addr:192.168.2.222  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:7dff:fedf:ea07/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2033 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1055 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:178474 (174.2 KiB)  TX bytes:173779 (169.7 KiB)
          Interrupt:11 Base address:0xc000
&nbsp;
eth0:0    Link encap:Ethernet  HWaddr 00:E0:7D:DF:EA:07
          inet addr:192.168.2.111  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 Base address:0xc000
&nbsp;
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)</pre></div></div>

<p>Ahora añadimos esta misma ip al fichero /etc/resolv.conf añadiendo la siguiente linea al final del fichero:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">nameserver AAA.BBB.CCC.DDD</pre></div></div>

<p>Próximamente más <img src='http://www.itimag.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/dos-2-ip-en-un-mismo-equipo-o-servidor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Instalar MySQL en el servidor Linux</title>
		<link>http://www.itimag.com/unix/myslq/instalar-mysql-en-el-servidor-linux/</link>
		<comments>http://www.itimag.com/unix/myslq/instalar-mysql-en-el-servidor-linux/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 21:57:01 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[BBDD]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=417</guid>
		<description><![CDATA[Para instalar MySQL, debemos abrir una nueva consola, hacer login como root y ejecutar el siguiente comando: su apt-get install mysql-server mysql-client libmysqlclient15-dev Como nosotros queremos que MySQL escuche a todas las peticiones de internet y no únicamente las de localhost, tenemos que editar el fichero /etc/mysql/my.cnf y comentar la linea “bind-address = 127.0.0.1”: nano [...]]]></description>
			<content:encoded><![CDATA[<p>Para instalar MySQL, debemos abrir una nueva consola, hacer login como root y ejecutar el siguiente comando:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-server mysql-client libmysqlclient15-dev</pre></div></div>

<p>Como nosotros queremos que MySQL escuche a todas las peticiones de internet y no únicamente las de localhost, tenemos que editar el fichero /etc/mysql/my.cnf y comentar la linea “bind-address = 127.0.0.1”:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>my.cnf</pre></div></div>

<p>El fichero resultante debe quedar así:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">[...]
#bind-address           = 127.0.0.1
[...]</pre></div></div>

<p>Ahora reiniciamos MySQL para que los cambios surjan efecto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql restart</pre></div></div>

<p>Ahora chequeamos que el servicio se encuentre en escucha. Para ello ejecutamos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-tap</span></pre></div></div>

<p>Y debemos ver una linea como esta:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">tcp       0      0 *:mysql                 *:*                     LISTEN      3281/mysqld</pre></div></div>

<p>Con la finalidad de proteger mysql y que nadie pueda acceder sin ser autentificado , <strong>debemos asignar una contraseña</strong> al usuario root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqladmin <span style="color: #660033;">-u</span> root password tu_contraseña
mysqladmin <span style="color: #660033;">-h</span> server1.mi_dominio.com <span style="color: #660033;">-u</span> root password tu_contraseña</pre></div></div>

<p><strong>Nota</strong>: tu_contraseña debe ser substituido por tu contraseña y server1.mi_dominio.com por el tuyo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/myslq/instalar-mysql-en-el-servidor-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instalando un servidor web con Apache + PHP5</title>
		<link>http://www.itimag.com/unix/apache-unix/como-instalar-un-servidor-web-con-apache-php5-en-linux/</link>
		<comments>http://www.itimag.com/unix/apache-unix/como-instalar-un-servidor-web-con-apache-php5-en-linux/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 18:35:09 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[como]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[guia]]></category>
		<category><![CDATA[instalar]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[publica]]></category>
		<category><![CDATA[servidor]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=403</guid>
		<description><![CDATA[Continuando con el curso de administración de servidores, os voy a explicar como instalar un servidor web con apache + PHP5. Instalamos apache: apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert Instalamos PHP5: apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite [...]]]></description>
			<content:encoded><![CDATA[<p>Continuando con el curso de administración de servidores, os voy a explicar como instalar un servidor web con apache + PHP5.</p>
<p>Instalamos apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert</pre></div></div>

<p>Instalamos PHP5:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl</pre></div></div>

<p>Durante la instalación nos aparecerá una pantalla en la que se nos pedirá:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">¿Quiere continuar instalando libc-client sin soporte para Maildir?</pre></div></div>

<p>Marcamos que si.</p>
<p>Una vez realizada la instalación editamos el fichero /etc/apache2/mods-available/dir.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>dir.conf</pre></div></div>

<p>y cambiamos la linea “DirectoryIndex”:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">          DirectoryIndex index.html index.htm index.shtml index.cgi
          index.php index.php3 index.pl index.xhtml</pre></div></div>

<p>Editamos el fichero /etc/apache2/ports.conf y añadimos la linea “Listen 443”:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ports.conf</pre></div></div>

<p>El fichero resultante es:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">Listen 80
Listen 443</pre></div></div>

<p>Ahora habilitamos algunos módulos de apache (SSL, rewrite, suexec, i include) mediante los siguientes comandos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include</pre></div></div>

<p>Finalmente, para que los cambios surjan efecto, recargamos la configuración de Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 force-reload</pre></div></div>

<p>Ya tenemos nuestro servidor web en marcha. Ahora simplemente debemos abrir el puerto 80 en nuestro router y nuestro servidor web será accesible en internet escribiendo en el navegador nuestra ip pública.</p>
<p>Un saludo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/apache-unix/como-instalar-un-servidor-web-con-apache-php5-en-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Como instalar un server de DNS con BIND en linux</title>
		<link>http://www.itimag.com/unix/domain-name-server-dns/como-instalar-un-server-de-dns-con-bind-en-linux/</link>
		<comments>http://www.itimag.com/unix/domain-name-server-dns/como-instalar-un-server-de-dns-con-bind-en-linux/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 12:45:44 +0000</pubDate>
		<dc:creator>Itimag</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[como]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[dominio]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[instalar]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servidor]]></category>

		<guid isPermaLink="false">http://www.itimag.net/?p=349</guid>
		<description><![CDATA[Continuando con el Curso de Administración de Servidores, hoy toca ver como instalar un servidor bind en  una distribución basada en Debian (Debian etch, Ubuntu, Kubuntu, etc.) En pocas palabras, ¿Qué hace un servidor de DNS? Es el encargado de convertir distintos nombres de dominio (Ej: www.itimag.net) en su ip. Por lo tanto, cada vez [...]]]></description>
			<content:encoded><![CDATA[<p>Continuando con el Curso de Administración de Servidores, hoy toca ver como instalar un servidor bind en  una distribución basada en Debian (Debian etch, Ubuntu, Kubuntu, etc.)</p>
<p>En pocas palabras, ¿Qué hace un servidor de DNS?</p>
<p>Es el encargado de convertir distintos nombres de dominio (Ej: www.itimag.net) en su ip. Por lo tanto, cada vez que accedemos a un servidor mediante un dominio de internet, pasamos por un servidor de dns que se encarga de decirnos cúal es la ip del equipo en la que se encuentra la web a la que estamos accediendo.</p>
<p>Pasemos a la acción. Para instalar bind, ejecutamos el siguiente comando en una consola o shell:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> bind9</pre></div></div>

<p>Por razones de seguridad, vamos a ejecutar el BIND de tal forma que pueda correr en un directorio <a href="http://es.wikipedia.org/wiki/Chroot" target="_self">chroot</a>. Lo hacemos de la siguiente forma:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>bind9 stop</pre></div></div>

<p>Editamos el fichero /etc/default/bind9 . Queremos que el demonio del bind se ejecute con el usuario bind sin privilegios, “chrooted” al directorio /var/lib/named. Para ello, buscamos donde pone &lt;&lt;OPTIONS=&#8221;-u bind&#8221;&gt;&gt; y lo substituimos por &lt;&lt;OPTIONS=&#8221;-u bind -t /var/lib/named&#8221;&gt;&gt;:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>bind9</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">OPTIONS=&quot;-u bind -t /var/lib/named&quot;
# Set RESOLVCONF=no to not run resolvconf
RESOLVCONF=yes</pre></div></div>

<p>Ahora creamos los directorios necesarios en /var/lib:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>etc
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>dev
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">bind</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>bind<span style="color: #000000; font-weight: bold;">/</span>run</pre></div></div>

<p>Y a continuación movemos el directorio de configuración desde /etc hasta /var/lib/named/etc:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>etc</pre></div></div>

<p>Creamos un link simbólico al nuevo directorio de configuración partiendo del antiguo directorio (para evitar problemas cuando bind se actualice):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">bind</span></pre></div></div>

<p>Hacemos “null” y “random”, y cambiamos los permisos de los directorios:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mknod</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null c <span style="color: #000000;">1</span> <span style="color: #000000;">3</span>
<span style="color: #c20cb9; font-weight: bold;">mknod</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>random c <span style="color: #000000;">1</span> <span style="color: #000000;">8</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">666</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>random
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> <span style="color: #7a0874; font-weight: bold;">bind</span>:<span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/*</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> <span style="color: #7a0874; font-weight: bold;">bind</span>:<span style="color: #7a0874; font-weight: bold;">bind</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>named<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">bind</span></pre></div></div>

<p>Ahora necesitamos modificar el fichero /etc/default/syslogd con la finalidad de registrar los mensajes que muestre bind el algún fichero de log. Debemos buscar la linea que pone &lt;&lt;SYSLOGD=&#8221;"&gt;&gt; y lo substituimos por &lt;&lt;SYSLOGD=&#8221;-a /var/lib/named/dev/log&#8221;&gt;&gt;:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>syslogd</pre></div></div>

<p>El fichero resultante es el siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">#
# Top configuration file for syslogd
#
&nbsp;
#
# Full documentation of possible arguments are found in the manpage
# syslogd(8).
#
&nbsp;
#
# For remote UDP logging use SYSLOGD=&quot;-r&quot;
#
SYSLOGD=&quot;-a /var/lib/named/dev/log&quot;</pre></div></div>

<p>Reiniciamos el demonio del generador de logs:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>sysklogd restart</pre></div></div>

<p>Iniciamos o arrancamos BIND, y chequeamos /var/log/syslog para observar si se han producido errores:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>bind9 start</pre></div></div>

<p>Para ver si hay errores, hacemos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">less</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>syslog</pre></div></div>

<p>Ahora pulsamos la z para recorrer el texto hasta el final y observamos si se ha producido algún error tras reiniciar:</p>
<p>Ejemplo:</p>

<div class="wp_syntax"><div class="code"><pre class="null" style="font-family:monospace;">Sep 22 13:13:01 ksxxxxx syslogd 1.4.1#18: restart.
&nbsp;
Sep 22 13:13:01 ksxxxxx /USR/SBIN/CRON[11162]: (root) CMD (/usr/local/rtm/bin/rtm 12 &amp;gt; /dev/null 2&amp;gt; /dev/null)
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: starting BIND 9.3.4-P1.1 -u bind -t /var/lib/named
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: found 1 CPU, using 1 worker thread
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: loading configuration from '/etc/bind/named.conf'
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: no IPv6 interfaces found
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: listening on IPv4 interface lo, 127.0.0.1#53
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: listening on IPv4 interface eth0, 213.251.xxx.xxx#53
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: command channel listening on 127.0.0.1#953
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: zone 0.in-addr.arpa/IN: loaded serial 1
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: zone 127.in-addr.arpa/IN: loaded serial 1
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: zone 255.in-addr.arpa/IN: loaded serial 1
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: zone localhost/IN: loaded serial 1
&nbsp;
Sep 22 13:13:15 ksxxxxx named[11217]: running</pre></div></div>

<p>En este ejemplo, no se observa ningún mensaje de error y, por lo tanto, la instalación ha sido un éxito.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itimag.com/unix/domain-name-server-dns/como-instalar-un-server-de-dns-con-bind-en-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

