<?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>Lecciones Prácticas &#187; Informática &#8211; Sistemas y servidores</title>
	<atom:link href="http://www.leccionespracticas.com/informatica-sistemas-y-servidores/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leccionespracticas.com</link>
	<description>informática y bibliotecas 2.0</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:36:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Linux: Sustitución de texto en múltiples ficheros usando SED [resuelto]</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/linux-sustitucion-de-texto-en-multiples-ficheros-usando-sed-resuelto/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/linux-sustitucion-de-texto-en-multiples-ficheros-usando-sed-resuelto/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 08:14:01 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[multiple files]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[replacement]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[sustitución]]></category>

		<guid isPermaLink="false">http://leccionespracticas.com/?p=1928</guid>
		<description><![CDATA[¿Cómo hacer una sustitución de texto en múltiples ficheros de forma simultánea, usando la línea de comandos linux? El comando SED permite hacer sustituciones de forma muy cómoda. Por ejemplo, el siguiente comando sustituye todas las ocurrencias (nótese el /g al final) de oldWord por newWord en todos los ficheros *.ext que se encuentren bajo [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/php/montar-unidad-remota-con-samba-en-redhat5-desde-programa-php/' rel='bookmark' title='Montar unidad remota con SAMBA en linux RedHat5 (desde PHP)'>Montar unidad remota con SAMBA en linux RedHat5 (desde PHP)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>¿Cómo hacer una sustitución de texto en múltiples ficheros de forma simultánea, usando la línea de comandos linux?</p>
<p>El comando <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?sed">SED</a> permite hacer sustituciones de forma muy cómoda. Por ejemplo, el siguiente comando sustituye todas las ocurrencias (nótese el <em>/g</em> al final) de <em>oldWord </em>por <em>newWord </em>en todos los ficheros <em>*.ext</em> que se encuentren bajo ese directorio (<em>.</em>) (incluidos otros subdirectorios).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.ext&quot;</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;s/oldWord/newWord/g&quot;</span> <span style="color: #ff0000;">'{}'</span> \;</pre></div></div>

<p>En mi caso lo he utilizado para añadir un nuevo usuario a un listado enorme de directorios protegidos por un <a href="http://www.leccionespracticas.com/?s=htaccess&#038;search="><em>.htaccess</em></a>, sustituyendo &#8220;<em>Require user</em>&#8221; por &#8220;<em>Require user newuser</em>&#8220;:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;.htaccess&quot;</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;s/Require\ user/Require\ user\ newuser/g&quot;</span> <span style="color: #ff0000;">'{}'</span> \;</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/php/montar-unidad-remota-con-samba-en-redhat5-desde-programa-php/' rel='bookmark' title='Montar unidad remota con SAMBA en linux RedHat5 (desde PHP)'>Montar unidad remota con SAMBA en linux RedHat5 (desde PHP)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/linux-sustitucion-de-texto-en-multiples-ficheros-usando-sed-resuelto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache case sensitive to case insensitive and Alias [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-case-sensitive-to-case-insensitive-and-alias-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-case-sensitive-to-case-insensitive-and-alias-solved/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 07:30:21 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[case-insensitive]]></category>
		<category><![CDATA[case-sensitive]]></category>
		<category><![CDATA[mod_speling]]></category>
		<category><![CDATA[speling]]></category>
		<category><![CDATA[speling_module]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1854</guid>
		<description><![CDATA[Some days ago I was checking my Apache logs and noticed some 404-Not found errors which made me realize my apache had this annoying case-sensitive behaviour. Thing was tricky, though. If I visited http://www.mysite.com/TAZ/restofpath/file.ext it worked. If I visited http://www.mysite.com/taz/restofpath/file.ext it returned a 404 error. If I visited http://www.mysite.com/TAZ/RESTOFPATH/FILE.EXT of http://www.mysite.com/TAZ/restofpath/FILE.EXT or other combinations it [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/solved-apache-error-client-xxx-file-does-not-exist/' rel='bookmark' title='[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;'>[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-server-log-size-and-log-rotate-configuration/' rel='bookmark' title='Apache server log size and log rotate configuration'>Apache server log size and log rotate configuration</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/instalacion-y-configuracion-vufind-en-redhat-el5-apache-2-2-16-php-5-2-14/' rel='bookmark' title='Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14'>Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Some days ago I was checking my <strong>Apache</strong> logs and noticed some 404-Not found errors which made me realize my apache had this annoying <strong>case-sensitive</strong> behaviour.</p>
<p>Thing was tricky, though.</p>
<p>If I visited http://www.mysite.com/TAZ/restofpath/file.ext it worked.<br />
If I visited http://www.mysite.com/taz/restofpath/file.ext it returned a 404 error.<br />
If I visited http://www.mysite.com/TAZ/RESTOFPATH/FILE.EXT of http://www.mysite.com/TAZ/restofpath/FILE.EXT or other combinations it also worked. </p>
<p>Apache was responding 404 to every request in which the &#8216;TAZ&#8217; part of the path was not written in capitals. Why?</p>
<p>Looking at my /etc/httpd/httpd.conf file I noticed a <strong>explicit Alias</strong> defined:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Alias <span style="color: #000000; font-weight: bold;">/</span>TAZ<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #ff0000;">&quot;/discsi1/TAZ/&quot;</span></pre></div></div>

<p>So that&#8217;s why it was behaving like that! <strong>Using <em>AliasMatch </em> Apache directive you can make an alias case insensitive</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">AliasMatch <span style="color: #7a0874; font-weight: bold;">&#40;</span>?i<span style="color: #7a0874; font-weight: bold;">&#41;</span>^<span style="color: #000000; font-weight: bold;">/</span>taz<span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">/</span>discsi1<span style="color: #000000; font-weight: bold;">/</span>TAZ<span style="color: #007800;">$1</span></pre></div></div>

<p>After saving changes to /etc/httpd/httpd.conf, do not forget to restart Apache.</p>
<h3>More about this issue</h3>
<p>Apache has this nice module called <a href="http://httpd.apache.org/docs/current/mod/mod_speling.html">mod_speling</a> which <em>Attempts to correct mistaken URLs that users might have entered by ignoring capitalization and by allowing up to one misspelling</em>.</p>
<p>To check whether you have this module active or not, look for this line in your apache.conf file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LoadModule speling_module modules<span style="color: #000000; font-weight: bold;">/</span>mod_speling.so</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/solved-apache-error-client-xxx-file-does-not-exist/' rel='bookmark' title='[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;'>[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-server-log-size-and-log-rotate-configuration/' rel='bookmark' title='Apache server log size and log rotate configuration'>Apache server log size and log rotate configuration</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/instalacion-y-configuracion-vufind-en-redhat-el5-apache-2-2-16-php-5-2-14/' rel='bookmark' title='Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14'>Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-case-sensitive-to-case-insensitive-and-alias-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Know mod_python running version [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/know-mod_python-running-version-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/know-mod_python-running-version-solved/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 09:25:28 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[3.3.1]]></category>
		<category><![CDATA[mod_python]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1850</guid>
		<description><![CDATA[A friend of mine asked yesterday: how do I get the mod_python version that my site is running? Answer is quite easy! &#62;&#62;&#62; import mod_python &#62;&#62;&#62; print mod_python.version 3.3.1 Related posts: CDS-Invenio: [notice] mod_python: (Re)importing module &#8216;mod_python.publisher&#8217; [Errno 13] Permission denied: &#8216;/root/.python-eggs&#8217; [SOLVED] Python: autocomplete names with tab key [solved]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-notice-mod_python-reimporting-module-mod_python-publisher/' rel='bookmark' title='CDS-Invenio: [notice] mod_python: (Re)importing module &#8216;mod_python.publisher&#8217;'>CDS-Invenio: [notice] mod_python: (Re)importing module &#8216;mod_python.publisher&#8217;</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/errno-13-permission-denied-root-python-eggs-solved/' rel='bookmark' title='[Errno 13] Permission denied: &#8216;/root/.python-eggs&#8217; [SOLVED]'>[Errno 13] Permission denied: &#8216;/root/.python-eggs&#8217; [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/python/python-autocomplete-names-with-tab-key-solved/' rel='bookmark' title='Python: autocomplete names with tab key [solved]'>Python: autocomplete names with tab key [solved]</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A friend of mine asked yesterday: how do I get the mod_python version that my site is running?</p>
<p>Answer is quite easy!</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">import</span> mod_python
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">print</span> mod_python.<span style="color: black;">version</span>
3.3.1</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-notice-mod_python-reimporting-module-mod_python-publisher/' rel='bookmark' title='CDS-Invenio: [notice] mod_python: (Re)importing module &#8216;mod_python.publisher&#8217;'>CDS-Invenio: [notice] mod_python: (Re)importing module &#8216;mod_python.publisher&#8217;</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/errno-13-permission-denied-root-python-eggs-solved/' rel='bookmark' title='[Errno 13] Permission denied: &#8216;/root/.python-eggs&#8217; [SOLVED]'>[Errno 13] Permission denied: &#8216;/root/.python-eggs&#8217; [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/python/python-autocomplete-names-with-tab-key-solved/' rel='bookmark' title='Python: autocomplete names with tab key [solved]'>Python: autocomplete names with tab key [solved]</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/know-mod_python-running-version-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache server log size and log rotate configuration</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-server-log-size-and-log-rotate-configuration/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-server-log-size-and-log-rotate-configuration/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 09:04:00 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[rotate]]></category>
		<category><![CDATA[rotatelog]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1574</guid>
		<description><![CDATA[Log rotation is a crucial issue. Both RHEL and Suse include logrotate and it is preconfigured for basic log-rotation. If you have some logs under /var/log that are suffixed with a dot and a number (/var/log/daemon.log.1) or even compressed (/var/log/mysql.log.5.gz), it means they were rotated by logrotate. Logrotate needs a simple configuration file to help [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-replicate-software-in-another-server-development-server/' rel='bookmark' title='CDS Invenio: replicate software in another server (development server)'>CDS Invenio: replicate software in another server (development server)</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/solved-apache-error-client-xxx-file-does-not-exist/' rel='bookmark' title='[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;'>[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/vmware-esx-server-infraestructure-client/' rel='bookmark' title='VMWare ESX Server &amp; Infraestructure Client'>VMWare ESX Server &amp; Infraestructure Client</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Log rotation is a crucial issue.</p>
<p>Both RHEL and Suse include logrotate and it is preconfigured for basic log-rotation. If you have some logs under /var/log that are suffixed with a dot and a number (/var/log/daemon.log.1) or even compressed (/var/log/mysql.log.5.gz), it means they were rotated by logrotate.</p>
<p>Logrotate needs a simple configuration file to help it manage the logs. The options used in the logrotate.conf file are documented in the manpage for logrotate. Many options are available, including options to to configure rotation to take place only after the logfile reaches a certain size, to have old logfiles e-mailed to you, and to compress saved logfiles to reduce storage requirements.</p>
<p>You can have multiple configuration files, one for every log, or maintain multiple logs through one configuration file.</p>
<p>In my <em>red hat enterprise linux 5 server</em> the <b>log rotation config</b> is in <em>/etc/logrotate.conf</em>.<br />
Lets take a closer look at the configuration file, into which I have added some comments for a better understanding:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>zaguan conf<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cat /etc/logrotate.conf</span>
<span style="color: #666666; font-style: italic;"># see &quot;man logrotate&quot; for details</span>
<span style="color: #666666; font-style: italic;"># rotate log files weekly</span>
weekly
&nbsp;
<span style="color: #666666; font-style: italic;"># keep 4 weeks worth of backlogs</span>
<span style="color: #666666; font-style: italic;"># this is, 4 weeks will pass before the logs are rotated</span>
rotate <span style="color: #000000;">4</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># create new (empty) log files after rotating old ones</span>
create
&nbsp;
<span style="color: #666666; font-style: italic;"># uncomment this if you want your log files compressed</span>
<span style="color: #666666; font-style: italic;">#compress</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># RPM packages drop log rotation information into this directory</span>
<span style="color: #666666; font-style: italic;"># the files in this directory are included and their config overrides</span>
<span style="color: #666666; font-style: italic;"># this (default) config</span>
include <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>logrotate.d
&nbsp;
<span style="color: #666666; font-style: italic;"># no packages own wtmp -- we'll rotate them here</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>wtmp <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    monthly
    minsize 1M
    create 0664 root utmp
    rotate <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># system-specific logs may be also be configured here.</span></pre></div></div>

<p>Lets see what is in <em>/etc/logrotate.d</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span> logrotate.d<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ls -l /etc/logrotate.d</span>
total <span style="color: #000000;">140</span>
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">144</span> Dec <span style="color: #000000;">17</span>  <span style="color: #000000;">2009</span> acpid
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">288</span> Jun <span style="color: #000000;">28</span>  <span style="color: #000000;">2007</span> conman
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root  <span style="color: #000000;">71</span> Oct <span style="color: #000000;">26</span> <span style="color: #000000;">12</span>:<span style="color: #000000;">21</span> cups
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">824</span> Jan <span style="color: #000000;">18</span> 09:<span style="color: #000000;">18</span> httpd
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">167</span> Feb  <span style="color: #000000;">6</span>  <span style="color: #000000;">2009</span> httpd.old
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root  <span style="color: #000000;">61</span> Mar <span style="color: #000000;">28</span>  <span style="color: #000000;">2010</span> kdm
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root  <span style="color: #000000;">61</span> Aug <span style="color: #000000;">14</span>  <span style="color: #000000;">2008</span> kdm.rpmnew
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">571</span> Aug <span style="color: #000000;">21</span>  <span style="color: #000000;">2006</span> mgetty
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">136</span> Aug <span style="color: #000000;">12</span>  <span style="color: #000000;">2008</span> ppp
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">442</span> Jul <span style="color: #000000;">16</span>  <span style="color: #000000;">2008</span> psacct
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root  <span style="color: #000000;">61</span> Aug <span style="color: #000000;">30</span> <span style="color: #000000;">15</span>:<span style="color: #000000;">31</span> rpm
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">121</span> May <span style="color: #000000;">21</span>  <span style="color: #000000;">2009</span> setroubleshoot
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">154</span> Apr <span style="color: #000000;">28</span>  <span style="color: #000000;">2010</span> snmpd
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">543</span> Feb <span style="color: #000000;">16</span>  <span style="color: #000000;">2010</span> squid
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">306</span> Jan  <span style="color: #000000;">5</span>  <span style="color: #000000;">2010</span> syslog
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root  <span style="color: #000000;">48</span> Aug <span style="color: #000000;">23</span>  <span style="color: #000000;">2006</span> tux
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root  <span style="color: #000000;">32</span> Mar <span style="color: #000000;">24</span>  <span style="color: #000000;">2010</span> up2date
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">188</span> Apr  <span style="color: #000000;">8</span>  <span style="color: #000000;">2010</span> vsftpd.log
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">100</span> Dec <span style="color: #000000;">15</span>  <span style="color: #000000;">2009</span> wpa_supplicant
<span style="color: #660033;">-rw-r--r--</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">100</span> Oct <span style="color: #000000;">26</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">22</span> yum</pre></div></div>

<p>There are a lot of programs which have overriden the default <em>logrotate</em> configuration. For instance, lets take a closer look at <em>/etc/logrotate.d/httpd</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>zaguan logrotate.d<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># more httpd</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>soft<span style="color: #000000; font-weight: bold;">/</span>cds-invenio<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>apache.err <span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #666666; font-style: italic;">#rotate 8 times before deleting the log</span>
rotate <span style="color: #000000;">8</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># rotate monthly</span>
monthly
&nbsp;
missingok
notifempty
sharedscripts
postrotate
<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>apachectl graceful <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
endscript
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>soft<span style="color: #000000; font-weight: bold;">/</span>cds-invenio<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>apache.log <span style="color: #7a0874; font-weight: bold;">&#123;</span>
rotate <span style="color: #000000;">16</span>
<span style="color: #666666; font-style: italic;"># rotate when the file size is 10MB or larger</span>
<span style="color: #c20cb9; font-weight: bold;">size</span> 10M
<span style="color: #666666; font-style: italic;"># ----------------------</span>
missingok
notifempty
sharedscripts
postrotate
<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>apachectl graceful <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
endscript
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>On <em>RHEL5</em>, <em>logrotate</em> is run from a daily job directory <em>/etc/cron.daily/logrotate</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># more /etc/cron.daily/logrotate</span>
<span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<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>logrotate <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>logrotate.conf
<span style="color: #007800;">EXITVALUE</span>=<span style="color: #007800;">$?</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$EXITVALUE</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</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>logger <span style="color: #660033;">-t</span> logrotate <span style="color: #ff0000;">&quot;ALERT exited abnormally with [<span style="color: #007800;">$EXITVALUE</span>]&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>You can read all configuration options of <em>logrotate</em>:</p>

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

<p>Or refer to <a href="http://www.softpanorama.org/Logs/Log_rotation/logrotate.shtml">this manual</a> for further details.</p>
<p>Note: spanish readers <a href="http://rm-rf.es/como-configurar-logrotate-sistemas-red-hat/">might find this link useful</a></p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-replicate-software-in-another-server-development-server/' rel='bookmark' title='CDS Invenio: replicate software in another server (development server)'>CDS Invenio: replicate software in another server (development server)</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/solved-apache-error-client-xxx-file-does-not-exist/' rel='bookmark' title='[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;'>[SOLVED] Apache: &#8216;[error] [client ::XXX] File does not exist:&#8217;</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/vmware-esx-server-infraestructure-client/' rel='bookmark' title='VMWare ESX Server &amp; Infraestructure Client'>VMWare ESX Server &amp; Infraestructure Client</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-server-log-size-and-log-rotate-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql: how to rename a database [solved]</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/mysql-how-to-rename-a-database-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/mysql-how-to-rename-a-database-solved/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 08:14:18 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[move]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rename]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1528</guid>
		<description><![CDATA[MySQL rename database command was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23. It was intended to enable upgrading pre-5.1 databases to use the encoding implemented in 5.1 for mapping database names to database directory names (see Section 8.2.3, “Mapping of Identifiers to File Names”). However, use [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/uncategorized/mysql-select-distinct-y-tildes-en-utf8-resuelto/' rel='bookmark' title='Mysql SELECT DISTINCT y tildes en utf8 [RESUELTO]'>Mysql SELECT DISTINCT y tildes en utf8 [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-query-database-to-know-a-tag-value-from-a-record/' rel='bookmark' title='CDS Invenio: query database to know a tag value from a record'>CDS Invenio: query database to know a tag value from a record</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://dev.mysql.com/doc/refman/5.1/en/rename-database.html">MySQL rename database command</a> was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23. It was intended to enable upgrading pre-5.1 databases to use the encoding implemented in 5.1 for mapping database names to database directory names (see Section 8.2.3, “Mapping of Identifiers to File Names”). However, use of this statement could result in loss of database contents, which is why it was removed. Do not use RENAME DATABASE in earlier versions in which it is present. </p>
<p>You can <em>rename</em> a mysql database like this:</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: #000000; font-weight: bold;">&lt;</span>enter password<span style="color: #000000; font-weight: bold;">&gt;</span>
create database new_database;
quit
&nbsp;
&nbsp;
mysqldump old_database <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">|</span> mysql <span style="color: #660033;">-D</span> new_database <span style="color: #660033;">-p</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>enter password<span style="color: #000000; font-weight: bold;">&gt;</span> 
&nbsp;
&nbsp;
mysql <span style="color: #660033;">-p</span>
drop database old_database;</pre></div></div>

<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/uncategorized/mysql-select-distinct-y-tildes-en-utf8-resuelto/' rel='bookmark' title='Mysql SELECT DISTINCT y tildes en utf8 [RESUELTO]'>Mysql SELECT DISTINCT y tildes en utf8 [RESUELTO]</a></li>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-query-database-to-know-a-tag-value-from-a-record/' rel='bookmark' title='CDS Invenio: query database to know a tag value from a record'>CDS Invenio: query database to know a tag value from a record</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/mysql-how-to-rename-a-database-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/instalacion-y-configuracion-vufind-en-redhat-el5-apache-2-2-16-php-5-2-14/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/instalacion-y-configuracion-vufind-en-redhat-el5-apache-2-2-16-php-5-2-14/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 09:23:15 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[bibliotecas]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[metabuscador]]></category>
		<category><![CDATA[oai]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[vufind]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1387</guid>
		<description><![CDATA[Vufind es un portal para bibliotecas, desarrollado por las bibliotecas. El propósito de vufind es posibilitar búsquedas sobre los fondos completos de una biblioteca, que incluyen los registros del catálogo, elementos de repositorios, publicaciones electrónicas etc. Vufind es completamente modular, por lo que se puede instalar el sistema básico o ir ampliándolo con sus distintos [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-con-innovative-millenium-y-cds-invenio-importar-registros-y-configurar-facetas/' rel='bookmark' title='Vufind con Innovative Millenium y CDS-Invenio: importar registros y configurar facetas'>Vufind con Innovative Millenium y CDS-Invenio: importar registros y configurar facetas</a></li>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-delete-imported-records/' rel='bookmark' title='Vufind: delete imported records'>Vufind: delete imported records</a></li>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-mostrar-informacion-de-reservas-en-los-registros/' rel='bookmark' title='vufind: mostrar información de reservas en los registros'>vufind: mostrar información de reservas en los registros</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vufind.org">Vufind</a> es un portal para bibliotecas, desarrollado por las bibliotecas. El propósito de vufind es posibilitar búsquedas sobre los fondos completos de una biblioteca, que incluyen los registros del catálogo, elementos de repositorios, publicaciones electrónicas etc.</p>
<p>Vufind es completamente modular, por lo que se puede instalar el sistema básico o ir ampliándolo con sus distintos compontentes. Además es código abierto, por lo que se pueden modificar los ficheros fuente al antojo del webmaster o programar módulos nuevos.</p>
<h4>Consideraciones de instalación</h4>
<p>Se realizará sobre un RedHat Enterprise Linux 5 64 bits virtualizado sobre VMWare ESXi. El proceso es bastante simple si se hace en este orden:</p>
<h4>Instalar Apache</h4>
<p>En mi caso elijo <a href="http://apache.rediris.es//httpd/httpd-2.2.16.tar.gz">Apache versión 2.2.16</a> y lo instalo (en <em>/usr/local/httpd</em>) desde las fuentes. Anteriormente tenía instalado Apache 2.2.3 en el servidor pero esa versión de apache me daba problemas con el flag B que utilizan las reglas de reescritura de Vufind (mod_rewrite). Con Apache 2.2.3 obtenía errores del tipo &#8220;500 Internal Server Error &#8211; RewriteRule: unknown flag &#8216;B&#8217;&#8221;. No profundizaré demasiado sobre cómo instalar apache, hay muchas guías circulando por internet.</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: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>httpd \
<span style="color: #660033;">--enable-shared</span>=ssl \
<span style="color: #660033;">--enable-shared</span>=max \
<span style="color: #660033;">--enable-module</span>=so \
<span style="color: #660033;">--enable-mods-shared</span>=all
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Además hay que instalar las <em>devel</em> de apache (para más adelante tener apxs):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum install httpd-devel.x86_64</span></pre></div></div>

<p>Si ya tienes un apache instalado y quieres saber qué versión es puedes saberlo con el comando</p>

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


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo harvest<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /usr/local/httpd/bin/httpd -v</span>
Server version: Apache<span style="color: #000000; font-weight: bold;">/</span>2.2.16 <span style="color: #7a0874; font-weight: bold;">&#40;</span>Unix<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Server built:   Sep <span style="color: #000000;">16</span> <span style="color: #000000;">2010</span> <span style="color: #000000;">11</span>:03:07</pre></div></div>

<h4>Instalar algunas librerías necesarias</h4>
<p>Por ejemplo <a href="http://aspell.net/">ASPELL (PSPELL)</a>. Puedes chequear si ya las tienes instaladas con:</p>

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

<p>La instalación se puede hacer perfectamente usando <em>yum</em> (o <em>apt-get</em> en las distribuciones Debian)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> aspell.x86_64
yum <span style="color: #c20cb9; font-weight: bold;">install</span> aspell-devel.x86_64</pre></div></div>

<p>También hay que instalar PEAR (en mi caso PEAR-1.9.1)</p>
<p>Y la librería gráfica GD (en mi caso gd-2.0.35)</p>
<h4>Instalar mysql</h4>
<p> (en caso de que no lo tengas instalado).<br />
La instalación es muy simple y no entraré en detalles.<br />
En mi caso la versión instalada es:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo harvest<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mysql --version</span>
mysql  Ver <span style="color: #000000;">14.12</span> Distrib 5.0.77, <span style="color: #000000; font-weight: bold;">for</span> redhat-linux-gnu <span style="color: #7a0874; font-weight: bold;">&#40;</span>x86_64<span style="color: #7a0874; font-weight: bold;">&#41;</span> using readline <span style="color: #000000;">5.1</span></pre></div></div>

<h4>Instalar php</h4>
<p> (desde las fuentes). La versión elegida ha sido php-5.2.14 (vufind requiere php > 5.2). El procedimiento es bastante simple:</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;">--with-pear</span> <span style="color: #660033;">--with-ldap</span> <span style="color: #660033;">--with-xsl</span> <span style="color: #660033;">--with-pspell</span> \
  <span style="color: #660033;">--with-zlib</span> <span style="color: #660033;">--with-mysql</span> <span style="color: #660033;">--with-libdir</span>=lib64  \
  <span style="color: #660033;">--with-apxs2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apxs  <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--with-gd</span></pre></div></div>

<p>La indicamos que debe utilizar las librerías 64bits (estamos en un sistema x64) y la ruta del apxs (se genera el bin correspondiente tras instalar httpd-devel). Le indicamos, además, que utilice <a href="http://php.net/manual/en/book.pspell.php">pspell</a>, <a href="http://php.net/manual/en/book.pspell.php">xsl</a>, <a href="http://php.net/manual/en/book.ldap.php">ldap</a>,<a href="http://pear.php.net/">pear</a>, <a href="http://php.net/manual/en/book.zlib.php">zlib</a> y <a href="http://php.net/manual/en/book.mysql.php">mysql</a>.</p>
<p>Y como root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><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>
libtool <span style="color: #660033;">--finish</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>html<span style="color: #000000; font-weight: bold;">/</span>vufind<span style="color: #000000; font-weight: bold;">/</span>sources<span style="color: #000000; font-weight: bold;">/</span>php-5.3.3<span style="color: #000000; font-weight: bold;">/</span>libs</pre></div></div>

<p>En caso de haber hecho varias configuraciones/make&#8217;s anteriormente puede ser de utilidad empezar &#8220;desde cero&#8221; con un:</p>

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

<p> y después continuar con el configure y demás&#8230;</p>
<p>Para testear si el PEAR funciona como debe podéis seguir los pasos de <a href="http://pear.php.net/manual/en/installation.checking.php">este manual</a>.</p>
<p>Otros comandos útiles de PEAR (por si hay problemas):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pear config-show
pear config-get verbose
pear config-set verbose <span style="color: #000000;">3</span>
pear list</pre></div></div>

<p>Ahora toca configurar <em>php.ini</em>. ¿Dónde está situado este archivo?<br />
Para saber qué php.ini está cogiendo el php (y mucha más información sobre PHP), ejecutamos:</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>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php <span style="color: #660033;">-i</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">more</span></pre></div></div>

<p>Para que más adelante no se muestren errores en el web de vufind deberemos cambiar el nivel de logging de E_STRICT por el valor<br />
sugerido para servidores estables:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">error_reporting = E_ALL <span style="color: #000000; font-weight: bold;">&amp;</span> ~E_DEPRECATED</pre></div></div>

<p>Después de configurar PHP reinicia apache con:</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>local<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>apachectl restart</pre></div></div>

<h4>Instalación de Vufind</h4>
<p>Si quieres que la instalación sea fácil y sin demasiados problemas, instala vufind en  <em>/usr/local/vufind</em>. Es la ruta por defecto de vufind y simplifica bastante la instalación realizarla en este path.</p>
<p>Para instalar vufind podéis seguir <a href="http://vufind.org/wiki/vufind_on_linux">los pasos de la wifi en vufind.org</a>.</p>
<p>Una vez terminada la instalación hice algunas operaciones adicionales:</p>
<p>- Editar httpd.conf para (1) añadir la línea donde se incluye el directorio donde instalamos vufind, (2) cambiar el user/group con que se ejecuta apache, (3) indicarle el soporte para ficheros php5 y el DirectoryIndex para ficheros php:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># User daemon</span>
<span style="color: #666666; font-style: italic;"># Group daemon</span>
User apache
Group apache
&nbsp;
<span style="color: #666666; font-style: italic;"># Instalacion del vufind</span>
Include <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>vufind<span style="color: #000000; font-weight: bold;">/</span>httpd-vufind.conf
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>IfModule php5_module<span style="color: #000000; font-weight: bold;">&gt;</span>
  <span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #000000; font-weight: bold;">/&gt;</span>
        AddType text<span style="color: #000000; font-weight: bold;">/</span>html .php .phps
        AddHandler application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php .php
        AddHandler application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php-source .phps
  <span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>- Modificar la configuración de vufind (aka editar el fichero <em>vufind/web/conf/config.ini</em>) para incluir la configuración correcta de LDAP, OAI, etc etc.</p>
<p>- Añadir estas líneas al <em>/etc/profile</em> (o al .bashrc de <em>/home/apache</em>)<br />
export VUFIND_HOME=/usr/local/vufind/<br />
export JAVA_HOME=/usr/java/jre1.6.0_17/bin/</p>
<p>- Dar permisos de ejecución al <em>vufind/vufind.sh</em> y arrancar el vufind:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>vufind<span style="color: #000000; font-weight: bold;">/</span>vufind.sh
.<span style="color: #000000; font-weight: bold;">/</span>vufind.sh start</pre></div></div>

<p>- Para que nos de más info si casca algo debemos settear debug = 5 en <em>web/conf/config.ini</em></p>
<p>- Acceso al interfaz de administrador de Vufind (en web):<br />
<em>http://YOURSITE.com/vufind/Admin/Home</em></p>
<p>Listo!</p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-con-innovative-millenium-y-cds-invenio-importar-registros-y-configurar-facetas/' rel='bookmark' title='Vufind con Innovative Millenium y CDS-Invenio: importar registros y configurar facetas'>Vufind con Innovative Millenium y CDS-Invenio: importar registros y configurar facetas</a></li>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-delete-imported-records/' rel='bookmark' title='Vufind: delete imported records'>Vufind: delete imported records</a></li>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-mostrar-informacion-de-reservas-en-los-registros/' rel='bookmark' title='vufind: mostrar información de reservas en los registros'>vufind: mostrar información de reservas en los registros</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/instalacion-y-configuracion-vufind-en-redhat-el5-apache-2-2-16-php-5-2-14/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Creando un repositorio GIT a partir de las fuentes</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/creando-un-repositorio-git-a-partir-de-las-fuentes/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/creando-un-repositorio-git-a-partir-de-las-fuentes/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 10:32:29 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[Informática - web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[developing]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[sources]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1268</guid>
		<description><![CDATA[De cara al desarrollo de aplicaciones es muy interesante tener algún software de control de versiones, tipo Subversion o GIT. Os comento a modo de &#8220;chuleta&#8221; cómo hacer esto desde las fuentes. Para ello, algunas consideraciones preliminares: Servidor y SO: Linux myserver.com 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/utilizando-eclipse-para-programar-python-en-entorno-git/' rel='bookmark' title='Utilizando ECLIPSE para programar python en entorno git'>Utilizando ECLIPSE para programar python en entorno git</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/acceso-apache-con-ldap-y-con-fichero-de-contrasenas/' rel='bookmark' title='Protect your site with password to ldap users and not-ldap (privileged) users'>Protect your site with password to ldap users and not-ldap (privileged) users</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-server-log-size-and-log-rotate-configuration/' rel='bookmark' title='Apache server log size and log rotate configuration'>Apache server log size and log rotate configuration</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>De cara al desarrollo de aplicaciones es muy interesante tener algún software de control de versiones, tipo <a href="http://es.wikipedia.org/wiki/Subversion">Subversion</a> o <a href="http://es.wikipedia.org/wiki/Git">GIT</a>.</p>
<p>Os comento a modo de &#8220;chuleta&#8221; cómo hacer esto desde las fuentes.</p>
<p>Para ello, algunas consideraciones preliminares:</p>
<p><b>Servidor y SO</b>: Linux myserver.com 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux<br />
<b>Archivos de código</b>: /soft/cds-invenio<br />
<b>Versión de GIT</b>:  git-1.6.6.2 (instalado desde las fuentes)</p>
<p>Asumo que la instalación de GIT es simple y podéis hacerla vosotros mismos sin ayuda. Hay muchísimos manuales indicando cómo hacerlo (usad google).</p>
<p>Una vez instalado GIT, procedemos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Creamos el archivo de configuracion del gitweb....</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;">#vi /etc/gitweb.conf</span>
<span style="color: #666666; font-style: italic;"># ----------------------------------------------------------------------------</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># gitweb.conf</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Configuration file for the web interface to GIT.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This file is a Perl script that is executed by the gitweb interface</span>
<span style="color: #666666; font-style: italic;"># after the defaults are set.  To override a setting, just uncomment</span>
<span style="color: #666666; font-style: italic;"># it here and set it to the appropriate value.</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Core git executable to use.</span>
<span style="color: #666666; font-style: italic;"># This can just be &quot;git&quot; if your webserver has a sensible PATH.</span>
<span style="color: #666666; font-style: italic;">#our $GIT = &quot;/path/to/git&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Absolute fs-path which will be prepended to the project path.</span>
<span style="color: #666666; font-style: italic;"># This is where your GIT repositories live in.</span>
<span style="color: #666666; font-style: italic;"># ESTA VARIABLE ES FUNDAMENTAL!!!</span>
our <span style="color: #007800;">$projectroot</span> = <span style="color: #ff0000;">&quot;/soft/git&quot;</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># Target of the home link on top of all pages.</span>
<span style="color: #666666; font-style: italic;">#our $home_link = $my_uri || &quot;/&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># String of the home link on top of all pages.</span>
our <span style="color: #007800;">$home_link_str</span> = <span style="color: #ff0000;">&quot;view projects&quot;</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># Name of your site or organization to appear in page titles.</span>
<span style="color: #666666; font-style: italic;"># Replace this with something more descriptive for clearer bookmarks.</span>
<span style="color: #666666; font-style: italic;">#our $site_name = &quot;&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Filename of HTML text to include at top of each page.</span>
<span style="color: #666666; font-style: italic;"># Must be an absolute filename (i.e., not relative to htdocs).</span>
<span style="color: #666666; font-style: italic;">#our $site_header = &quot;&quot;;</span>
<span style="color: #666666; font-style: italic;"># HTML text to include at home page.</span>
<span style="color: #666666; font-style: italic;"># Must be an absolute filename (i.e., not relative to htdocs).</span>
<span style="color: #666666; font-style: italic;">#our $home_text = &quot;/gitweb/indextext.html&quot;;</span>
<span style="color: #666666; font-style: italic;"># Filename of HTML text to include at bottom of each page.</span>
<span style="color: #666666; font-style: italic;"># Must be an absolute filename (i.e., not relative to htdocs).</span>
<span style="color: #666666; font-style: italic;">#our $site_footer = &quot;&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># URI of the stylesheet to use.</span>
our <span style="color: #007800;">$stylesheet</span> = <span style="color: #ff0000;">&quot;/git/gitweb.css&quot;</span>;
<span style="color: #666666; font-style: italic;"># URI of GIT logo (72x27 size).</span>
our <span style="color: #007800;">$logo</span> = <span style="color: #ff0000;">&quot;/git/git-logo.png&quot;</span>;
<span style="color: #666666; font-style: italic;"># URI of GIT favicon, assumed to be image/png type.</span>
our <span style="color: #007800;">$favicon</span> = <span style="color: #ff0000;">&quot;/git/git-favicon.png&quot;</span>;
&nbsp;
<span style="color: #666666; font-style: italic;"># URI and label (title) of GIT logo link.</span>
<span style="color: #666666; font-style: italic;">#our $logo_url = &quot;http://git.or.cz/&quot;;</span>
<span style="color: #666666; font-style: italic;">#our $logo_label = &quot;git homepage&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Source of projects list.</span>
<span style="color: #666666; font-style: italic;">#our $projects_list = &quot;&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Show repository only if this file exists.</span>
<span style="color: #666666; font-style: italic;"># Only effective if this variable evaluates to true.</span>
<span style="color: #666666; font-style: italic;">#our $export_ok = &quot;&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Only allow viewing of repositories also shown on the overview page.</span>
<span style="color: #666666; font-style: italic;">#our $strict_export = &quot;&quot;;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># List of git base URLs used for URL to where fetch project from,</span>
<span style="color: #666666; font-style: italic;"># i.e. full URL is &quot;$git_base_url/$project&quot;</span>
<span style="color: #666666; font-style: italic;">#our @git_base_url_list = grep { $_ ne '' } (&quot;/some/url&quot;);</span>
<span style="color: #666666; font-style: italic;"># --------------------------------------------------------------------------------</span></pre></div></div>

<p>Entonces añadimos al archivo de configuración de Apache algunas líneas útiles (el directorio <em>/var/www/cgi-git/gitweb</em> y <em>/var/www/html/git</em> deben existir):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># vi /etc/httpd/conf/httpd.conf</span>
<span style="color: #666666; font-style: italic;"># Añadir:</span>
Alias <span style="color: #000000; font-weight: bold;">/</span>gitweb <span style="color: #ff0000;">&quot;/var/www/cgi-bin/gitweb/&quot;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/var/www/cgi-bin/gitweb&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
            Options Indexes FollowSymlinks ExecCGI
            AllowOverride None
            Order allow,deny
            Allow from all
<span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span>
Alias <span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #ff0000;">&quot;/var/www/html/git&quot;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/var/www/html/git&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
            Options None
            AllowOverride None
            Order allow,deny
            Allow from all
<span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Y procedemos a reinicar apache y crear el nuevo repositorio GIT&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;">#/etc/init.d/httpd restart</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /soft/cds-invenio</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git init</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git add .</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git commit -m &quot;inicialización del repositorio&quot;</span></pre></div></div>

<p>Una vez hecho esto, editamos algunos archivos de los que GIT ha creado (añadir información a &#8216;description&#8217; y a &#8216;config&#8217;).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># vi /soft/cds-invenio/description </span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># vi /soft/cds-invenio/config</span>
<span style="color: #660033;">--------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>core<span style="color: #7a0874; font-weight: bold;">&#93;</span>
        repositoryformatversion = <span style="color: #000000;">0</span>
        filemode = <span style="color: #c20cb9; font-weight: bold;">true</span>
        bare = <span style="color: #c20cb9; font-weight: bold;">false</span>
        logallrefupdates = <span style="color: #c20cb9; font-weight: bold;">true</span>
        worktree = <span style="color: #000000; font-weight: bold;">/</span>soft<span style="color: #000000; font-weight: bold;">/</span>cds-invenio
        owner = <span style="color: #ff0000;">&quot;Miguel Martin&quot;</span></pre></div></div>

<p>A continuación clonamos sólo los datos de GIT en un fichero .git:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /soft/cds-invenio/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git clone --bare cdsinvenio cdsinvenio.git</span></pre></div></div>

<p>Podemos probar a cargar en nuestro servidor esta url: http://myserver.com/cgi-bin/gitweb.cgi y ver si aparece algo&#8230; Puede que se produzcan fallos con gitweb.js si está en el directorio /cgi-bin/gitweb&#8230; si es el caso podemos editar gitweb.cgi y modificar la RUTA al gitweb.js.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Editamos el gitweb.cgi porque hay fallos en el JS:</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>aneto cds-invenio<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># vi /var/www/cgi-bin/gitweb/gitweb.cgi</span>
&nbsp;
 <span style="color: #666666; font-style: italic;"># URI of stylesheets</span>
 our <span style="color: #000000; font-weight: bold;">@</span>stylesheets = <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;/var/www/cgi-bin/gitweb/gitweb.css&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
 <span style="color: #666666; font-style: italic;"># URI of a single stylesheet, which can be overridden in GITWEB_CONFIG.</span>
 our <span style="color: #007800;">$stylesheet</span> = undef;
 <span style="color: #666666; font-style: italic;"># URI of GIT logo (72x27 size)</span>
 our <span style="color: #007800;">$logo</span> = <span style="color: #ff0000;">&quot;/var/www/cgi-bin/gitweb/git-logo.png&quot;</span>;
 <span style="color: #666666; font-style: italic;"># URI of GIT favicon, assumed to be image/png type</span>
 our <span style="color: #007800;">$favicon</span> = <span style="color: #ff0000;">&quot;/var/www/cgi-bin/gitweb/git-favicon.png&quot;</span>;
 <span style="color: #666666; font-style: italic;"># URI of gitweb.js (JavaScript code for gitweb)</span>
 our <span style="color: #007800;">$javascript</span> = <span style="color: #ff0000;">&quot;/git/gitweb.js&quot;</span>;
&nbsp;
 <span style="color: #666666; font-style: italic;"># URI and label (title) of GIT logo link</span>
 <span style="color: #666666; font-style: italic;">#our $logo_url = &quot;http://www.kernel.org/pub/software/scm/git/docs/&quot;;</span>
 <span style="color: #666666; font-style: italic;">#our $logo_label = &quot;git documentation&quot;;</span>
 our <span style="color: #007800;">$logo_url</span> = <span style="color: #ff0000;">&quot;http://git-scm.com/&quot;</span>;
 our <span style="color: #007800;">$logo_label</span> = <span style="color: #ff0000;">&quot;git homepage&quot;</span>;</pre></div></div>

<p>Y ahora copiamos el js a su lugar&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#Copiamos el Js a /var/www/html/git</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>gitweb.js <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>html<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p># Hacemos un PUSH de todo&#8230;<br />
[root@aneto teresa]# git push &#8211;all /soft/git/cdsinvenio.git</p>
<p>Y voilá! Nuestro repositorio git con todo accesible desde http://myserver.com/cgi-bin/gitweb.git</p>
<p>Algunos enlaces interesantes&#8230;<br />
<a href="http://webcache.googleusercontent.com/search?q=cache:FT8uj7TSNZIJ:gofedora.com/how-to-install-configure-gitweb/+gitweb.cgi+configuration&#038;cd=3&#038;hl=es&#038;ct=clnk&#038;gl=es&#038;client=firefox-a">link 1 (en)</a><br />
<a href="http://ianloic.com/2007/09/13/how_i_set_up_gitweb/">link 2 (en)</a><br />
<a href="http://geneura.ugr.es/~jmerelo/tutoriales/git/">link 3 (es)</a><br />
<a href="http://blog.inbatu.com/2009/01/24/crear-un-repositorio-git-remoto/">link 4 (es)</a></p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-web/utilizando-eclipse-para-programar-python-en-entorno-git/' rel='bookmark' title='Utilizando ECLIPSE para programar python en entorno git'>Utilizando ECLIPSE para programar python en entorno git</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-web/acceso-apache-con-ldap-y-con-fichero-de-contrasenas/' rel='bookmark' title='Protect your site with password to ldap users and not-ldap (privileged) users'>Protect your site with password to ldap users and not-ldap (privileged) users</a></li>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/apache-server-log-size-and-log-rotate-configuration/' rel='bookmark' title='Apache server log size and log rotate configuration'>Apache server log size and log rotate configuration</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/creando-un-repositorio-git-a-partir-de-las-fuentes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active directory: Delete protected OU (Windows SERVER 2008) [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/active-directory-delete-protected-ou-windows-server-2008/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/active-directory-delete-protected-ou-windows-server-2008/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 11:09:21 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[organizational unit]]></category>
		<category><![CDATA[ou]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1218</guid>
		<description><![CDATA[In Windows 2008 Active Directory Users and Computers Microsoft activated new feature “Protect Container from accidential deletion” During OU (organizational unit) creation you have the ability to mark OU as protected from accidental deletion , and if you try to delete OU you will receive the following error “You do not have sufficient privileges to [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-batch-delete-records-delete-records-from-command-line-solved/' rel='bookmark' title='CDS Invenio: batch delete records (delete records from command line) [SOLVED]'>CDS Invenio: batch delete records (delete records from command line) [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-delete-imported-records/' rel='bookmark' title='Vufind: delete imported records'>Vufind: delete imported records</a></li>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-replicate-software-in-another-server-development-server/' rel='bookmark' title='CDS Invenio: replicate software in another server (development server)'>CDS Invenio: replicate software in another server (development server)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In <strong>Windows  2008</strong>  <strong>Active  Directory</strong>  Users and Computers Microsoft  activated new feature “Protect Container from accidential deletion”<br />
During OU (organizational unit) creation you have the ability to mark OU as protected from accidental deletion , and if you try to delete OU you will receive the following error “<em>You do not have sufficient privileges to delete “OU Name” , or this object is protected from accidential deletion</em>”</p>
<p><img src="http://www.kreslavsky.com/wp-content/uploads/2009/03/dont-have.jpg" /></p>
<p>To unlock OU from accidential deleting protection do the following actions<br />
    * Open Active Directory Users and Computers<br />
    * Go to View<br />
    * Mark with “V”  ” Advanced Features”<br />
    * Right click protected OU<br />
    * Go to  Properties<br />
    * Navigate to “Object” Tab<br />
    * Remove the “V” from “Protect object from accidental deletion “</p>
<p><img src="http://www.kreslavsky.com/wp-content/uploads/2009/03/delete-ou.jpg" /></p>
<p>You could also achieve this by not protecting the OU&#8217;s in the moment of creation.</p>
<p>Via: <a href="http://www.kreslavsky.com/">kreslavsky.com</a></p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-batch-delete-records-delete-records-from-command-line-solved/' rel='bookmark' title='CDS Invenio: batch delete records (delete records from command line) [SOLVED]'>CDS Invenio: batch delete records (delete records from command line) [SOLVED]</a></li>
<li><a href='http://www.leccionespracticas.com/vufind-2/vufind-delete-imported-records/' rel='bookmark' title='Vufind: delete imported records'>Vufind: delete imported records</a></li>
<li><a href='http://www.leccionespracticas.com/cds-invenio/cds-invenio-replicate-software-in-another-server-development-server/' rel='bookmark' title='CDS Invenio: replicate software in another server (development server)'>CDS Invenio: replicate software in another server (development server)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/active-directory-delete-protected-ou-windows-server-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Allow write fstab in maintenance mode [SOLVED]</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/allow-write-fstab-in-maintenance-mode-solved/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/allow-write-fstab-in-maintenance-mode-solved/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 11:22:44 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[fstab]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1211</guid>
		<description><![CDATA[Imagine your server crashes (due to some hardisk I/O error, for instance). Then if you reboot your machine, it&#8217;ll spit out something like: Checking filesystems... e2fsck: Cannot continue, aborting Type root password for maintenance mode or CTRL+D to continue Lets suppose the culprit of this is some HDD (for instance, /dev/mapper/Vt31-p1 which should be mounted [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Imagine your server crashes (due to some hardisk I/O error, for instance). Then if you reboot your machine, it&#8217;ll spit out something like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Checking filesystems...
   e2fsck: Cannot <span style="color: #7a0874; font-weight: bold;">continue</span>, aborting
   Type root password <span style="color: #000000; font-weight: bold;">for</span> maintenance mode or CTRL+D to <span style="color: #7a0874; font-weight: bold;">continue</span></pre></div></div>

<p>Lets suppose the culprit of this is some HDD (for instance, <code>/dev/mapper/Vt31-p1</code>  which should be mounted in </code>/software</code>).</p>
<p>Then if you read the contents of <code>/etc/fstab</code> you will see one line like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>Vt31-p1    <span style="color: #000000; font-weight: bold;">/</span>t31                    ext3    defaults        <span style="color: #000000;">1</span> <span style="color: #000000;">2</span></pre></div></div>

<p>If you try to comment this line, your editor will complain and tell "changes cannot be written" or something like that. Why is this? Well, your /etc files have been mounted on a non writable partition (maintenance mode, you remember?). So you will have to remount this partition in RW mode. Just like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> remount,rw <span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Then edit fstab, save your changes and reboot.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/allow-write-fstab-in-maintenance-mode-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BackupPC &#8211; gestión de backups. Guía de instalación para bobos.</title>
		<link>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/backuppc-gestion-de-backups-guia-de-instalacion-para-bobos/</link>
		<comments>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/backuppc-gestion-de-backups-guia-de-instalacion-para-bobos/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 08:58:45 +0000</pubDate>
		<dc:creator>Miguel</dc:creator>
				<category><![CDATA[Informática - Sistemas y servidores]]></category>
		<category><![CDATA[backuppc]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[guia instalación]]></category>
		<category><![CDATA[installation guide]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://www.leccionespracticas.com/?p=1202</guid>
		<description><![CDATA[¿Qué es BackupPC? El otro día tuve la ocasión de ver en funcionamiento una herramienta estupenda para gestionar copias de seguridad mediante un interfaz web (o por via de comandos). Se llama BackupPC y es libre. Las opciones de personalización son infinitas, no sólo a nivel de compresión de los backups, sino también la posibilidad [...]
Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/instalacion-y-configuracion-vufind-en-redhat-el5-apache-2-2-16-php-5-2-14/' rel='bookmark' title='Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14'>Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14</a></li>
<li><a href='http://www.leccionespracticas.com/javascript/jquery-en-10-minutos-guia-para-impacientes/' rel='bookmark' title='jQuery en 10 minutos | guia para impacientes'>jQuery en 10 minutos | guia para impacientes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h3>¿Qué es BackupPC?</h3>
<p>El otro día tuve la ocasión de ver en funcionamiento una herramienta estupenda para gestionar copias de seguridad mediante un interfaz web (o por via de comandos). Se llama <a href="http://backuppc.sourceforge.net/">BackupPC</a> y es libre. </p>
<p>Las opciones de personalización son infinitas, no sólo a nivel de compresión de los backups, sino también la posibilidad de gestionar de forma cómoda los privilegios de acceso, quién puede hacer cada backup, cómo se hace cada backup (rsync sobre ssh, samba&#8230;). </p>
<p>Vaya, que me encantó. Paso, por tanto, a comentaros cómo instalar y configurar esta herramienta. He de decir que esta guía la he hecho &#8220;para mi&#8221; -por si tengo que replicar esta instalación en otras máquinas- por lo que <b>es incompleta, imperfecta y seguro que tiene errores o cosas que se pueden mejorar</b>.</p>
<p><strong>** Nota tras terminar la instalación: habría sido más conveniente instalar la herramienta como usuario apache directamente&#8230; pero si seguís las instrucciones que doy, también funcionará asi.</strong></p>
<h3>Configurando BackupPC en Red Hat EL 5 &#8211; descargando source, instalando pre-requisitos y creando directorios</h3>
<p>Asumo que tendréis instalado perl, apache, etc.</p>
<p>En mi caso, lo hago sobre perl 5.8.8 para 64bits.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo BackupPC<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># perl --version</span>
&nbsp;
This is <span style="color: #c20cb9; font-weight: bold;">perl</span>, v5.8.8 built <span style="color: #000000; font-weight: bold;">for</span> x86_64-linux-thread-multi
&nbsp;
Copyright <span style="color: #000000;">1987</span>-<span style="color: #000000;">2006</span>, Larry Wall
&nbsp;
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, <span style="color: #c20cb9; font-weight: bold;">which</span> may be found <span style="color: #000000; font-weight: bold;">in</span> the Perl <span style="color: #000000;">5</span> <span style="color: #7a0874; font-weight: bold;">source</span> kit.
&nbsp;
Complete documentation <span style="color: #000000; font-weight: bold;">for</span> Perl, including FAQ lists, should be found on
this system using <span style="color: #ff0000;">&quot;man perl&quot;</span> or <span style="color: #ff0000;">&quot;perldoc perl&quot;</span>.  If you have access to the
Internet, point your browser at http:<span style="color: #000000; font-weight: bold;">//</span>www.perl.org<span style="color: #000000; font-weight: bold;">/</span>, the Perl Home Page.</pre></div></div>

<p>Primero descargamos el tar.gz con el instalador. Lo podemos hacer desde:<br />
<a href="http://sourceforge.net/projects/backuppc/files/backuppc/3.1.0/BackupPC-3.1.0.tar.gz/download">http://sourceforge.net/projects/backuppc/files/backuppc/3.1.0/BackupPC-3.1.0.tar.gz/download</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo BackupPC-3.1.0<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum install perl-suidperl</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo BackupPC-3.1.0<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># /usr/sbin/adduser backuppc</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo www<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mkdir /var/www/cgi-bin/BackupPC</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo cgi-bin<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># mkdir /var/www/icons/BackupPC</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo backuppc-install<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /home/miguel/backuppc-install</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo backuppc-install<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># tar zvxf BackupPC-3.1.0.tar.gz</span></pre></div></div>

<h3>El proceso de instalación (todo el output)</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo BackupPC-3.1.0<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># perl configure.pl</span>
&nbsp;
Is this a new installation or upgrade <span style="color: #000000; font-weight: bold;">for</span> BackupPC?  If this is
an upgrade please tell me the full path of the existing BackupPC
configuration <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg: <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>config.pl<span style="color: #7a0874; font-weight: bold;">&#41;</span>.  Otherwise, just
hit return.
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> Full path to existing main config.pl <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>?
&nbsp;
I found the following locations <span style="color: #000000; font-weight: bold;">for</span> these programs:
&nbsp;
    <span style="color: #c20cb9; font-weight: bold;">bzip2</span>        =<span style="color: #000000; font-weight: bold;">&gt;</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><span style="color: #c20cb9; font-weight: bold;">bzip2</span>
    <span style="color: #c20cb9; font-weight: bold;">cat</span>          =<span style="color: #000000; font-weight: bold;">&gt;</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;">cat</span>
    <span style="color: #c20cb9; font-weight: bold;">df</span>           =<span style="color: #000000; font-weight: bold;">&gt;</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;">df</span>
    gtar<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">tar</span>     =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gtar
    <span style="color: #c20cb9; font-weight: bold;">gzip</span>         =<span style="color: #000000; font-weight: bold;">&gt;</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;">gzip</span>
    <span style="color: #c20cb9; font-weight: bold;">hostname</span>     =<span style="color: #000000; font-weight: bold;">&gt;</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;">hostname</span>
    nmblookup    =<span style="color: #000000; font-weight: bold;">&gt;</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>nmblookup
    par2         =<span style="color: #000000; font-weight: bold;">&gt;</span>
    <span style="color: #c20cb9; font-weight: bold;">perl</span>         =<span style="color: #000000; font-weight: bold;">&gt;</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><span style="color: #c20cb9; font-weight: bold;">perl</span>
    <span style="color: #c20cb9; font-weight: bold;">ping</span>         =<span style="color: #000000; font-weight: bold;">&gt;</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;">ping</span>
    rsync        =<span style="color: #000000; font-weight: bold;">&gt;</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>rsync
    <span style="color: #c20cb9; font-weight: bold;">sendmail</span>     =<span style="color: #000000; font-weight: bold;">&gt;</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: #c20cb9; font-weight: bold;">sendmail</span>
    smbclient    =<span style="color: #000000; font-weight: bold;">&gt;</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>smbclient
    <span style="color: #c20cb9; font-weight: bold;">split</span>        =<span style="color: #000000; font-weight: bold;">&gt;</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><span style="color: #c20cb9; font-weight: bold;">split</span>
    ssh<span style="color: #000000; font-weight: bold;">/</span>ssh2     =<span style="color: #000000; font-weight: bold;">&gt;</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><span style="color: #c20cb9; font-weight: bold;">ssh</span>
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> Are these paths correct? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #7a0874; font-weight: bold;">&#93;</span>?
&nbsp;
Please tell me the <span style="color: #c20cb9; font-weight: bold;">hostname</span> of the machine that BackupPC will run on.
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> BackupPC will run on host <span style="color: #7a0874; font-weight: bold;">&#91;</span>olmo.unizar.es<span style="color: #7a0874; font-weight: bold;">&#93;</span>?
&nbsp;
BackupPC should run <span style="color: #c20cb9; font-weight: bold;">as</span> a dedicated user with limited privileges.  You
need to create a user.  This user will need read<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">write</span> permission on
the main data directory and read<span style="color: #000000; font-weight: bold;">/</span>execute permission on the <span style="color: #c20cb9; font-weight: bold;">install</span>
directory <span style="color: #7a0874; font-weight: bold;">&#40;</span>these directories will be setup shortly<span style="color: #7a0874; font-weight: bold;">&#41;</span>.
&nbsp;
The primary group <span style="color: #000000; font-weight: bold;">for</span> this user should also be chosen carefully.
The data directories and files will have group <span style="color: #c20cb9; font-weight: bold;">read</span> permission,
so group members can access backup files.
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> BackupPC should run <span style="color: #c20cb9; font-weight: bold;">as</span> user <span style="color: #7a0874; font-weight: bold;">&#91;</span>backuppc<span style="color: #7a0874; font-weight: bold;">&#93;</span>?
&nbsp;
Please specify an <span style="color: #c20cb9; font-weight: bold;">install</span> directory <span style="color: #000000; font-weight: bold;">for</span> BackupPC.  This is where the
BackupPC scripts, library and documentation will be installed.
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> Install directory <span style="color: #7a0874; font-weight: bold;">&#40;</span>full path<span style="color: #7a0874; font-weight: bold;">&#41;</span> <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>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #7a0874; font-weight: bold;">&#93;</span>?
&nbsp;
Please specify a data directory <span style="color: #000000; font-weight: bold;">for</span> BackupPC.  This is where all the
PC backup data is stored.  This <span style="color: #c20cb9; font-weight: bold;">file</span> system needs to be big enough to
accommodate all the PCs you expect to backup <span style="color: #7a0874; font-weight: bold;">&#40;</span>eg: at least several GB
per machine<span style="color: #7a0874; font-weight: bold;">&#41;</span>.
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> Data directory <span style="color: #7a0874; font-weight: bold;">&#40;</span>full path<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #7a0874; font-weight: bold;">&#93;</span>? <span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>BackupPC
&nbsp;
BackupPC can compress pool files, providing around a <span style="color: #000000;">40</span><span style="color: #000000; font-weight: bold;">%</span> reduction <span style="color: #000000; font-weight: bold;">in</span> pool
<span style="color: #c20cb9; font-weight: bold;">size</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>your mileage may vary<span style="color: #7a0874; font-weight: bold;">&#41;</span>. Specify the compression level <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0</span> turns
off compression, and <span style="color: #000000;">1</span> to <span style="color: #000000;">9</span> represent good<span style="color: #000000; font-weight: bold;">/</span>fastest to best<span style="color: #000000; font-weight: bold;">/</span>slowest<span style="color: #7a0874; font-weight: bold;">&#41;</span>.
The recommended values are <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>off<span style="color: #7a0874; font-weight: bold;">&#41;</span> or <span style="color: #000000;">3</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>reasonable compression and speed<span style="color: #7a0874; font-weight: bold;">&#41;</span>.
Increasing the compression level to <span style="color: #000000;">5</span> will use around <span style="color: #000000;">20</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">more</span> cpu <span style="color: #000000; font-weight: bold;">time</span>
and give perhaps <span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">more</span> compression.
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> Compression level <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>?
&nbsp;
BackupPC has a powerful CGI <span style="color: #c20cb9; font-weight: bold;">perl</span> interface that runs under Apache.
A single executable needs to be installed <span style="color: #000000; font-weight: bold;">in</span> a cgi-bin directory.
This executable needs to run <span style="color: #c20cb9; font-weight: bold;">as</span> set-uid backuppc, or
it can be run under mod_perl with Apache running <span style="color: #c20cb9; font-weight: bold;">as</span> user backuppc.
&nbsp;
Leave this path empty <span style="color: #000000; font-weight: bold;">if</span> you don<span style="color: #ff0000;">'t want to install the CGI interface.
&nbsp;
--&gt; CGI bin directory (full path) []? /var/www/cgi-bin/BackupPC
&nbsp;
BackupPC'</span>s CGI script needs to display various GIF images that
should be stored where Apache can serve them.  They should be
placed somewhere under Apache<span style="color: #ff0000;">'s DocumentRoot.  BackupPC also
needs to know the URL to access these images.  Example:
&nbsp;
    Apache image directory:  /usr/local/apache/htdocs/BackupPC
    URL for image directory: /BackupPC
&nbsp;
The URL for the image directory should start with a slash.
&nbsp;
--&gt; Apache image directory (full path) []? /var/www/icons/BackupPC
--&gt; URL for image directory (omit http://host; starts with '</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">') []? /icons/BackupPC
&nbsp;
Ok, we'</span>re about to:
&nbsp;
  - <span style="color: #c20cb9; font-weight: bold;">install</span> the binaries, lib and docs <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC,
  - create the data directory <span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>BackupPC,
  - create<span style="color: #000000; font-weight: bold;">/</span>update the config.pl <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>config.pl,
  - optionally <span style="color: #c20cb9; font-weight: bold;">install</span> the cgi-bin interface.
&nbsp;
--<span style="color: #000000; font-weight: bold;">&gt;</span> Do you want to <span style="color: #7a0874; font-weight: bold;">continue</span>? <span style="color: #7a0874; font-weight: bold;">&#91;</span>y<span style="color: #7a0874; font-weight: bold;">&#93;</span>?
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>bin
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>doc
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>CGI
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>Config
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>Lang
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>Storage
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>Xfer
Created <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>Zip
Created <span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>BackupPC
Created <span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>pool
Created <span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>cpool
Created <span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>pc
Created <span style="color: #000000; font-weight: bold;">/</span>img<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>trash
Created <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>BackupPC
Created <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>BackupPC
Installing binaries <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>bin
Installing library <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>lib
Installing images <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>icons<span style="color: #000000; font-weight: bold;">/</span>BackupPC
Making init.d scripts
Installing docs <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>doc
Installing config.pl and hosts <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>BackupPC
PING localhost.localdomain <span style="color: #7a0874; font-weight: bold;">&#40;</span>127.0.0.1<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">56</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">84</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> bytes of data.
<span style="color: #000000;">64</span> bytes from localhost.localdomain <span style="color: #7a0874; font-weight: bold;">&#40;</span>127.0.0.1<span style="color: #7a0874; font-weight: bold;">&#41;</span>: <span style="color: #007800;">icmp_seq</span>=<span style="color: #000000;">1</span> <span style="color: #007800;">ttl</span>=<span style="color: #000000;">64</span> <span style="color: #007800;">time</span>=<span style="color: #000000;">0.140</span> ms
&nbsp;
<span style="color: #660033;">---</span> localhost.localdomain <span style="color: #c20cb9; font-weight: bold;">ping</span> statistics <span style="color: #660033;">---</span>
<span style="color: #000000;">1</span> packets transmitted, <span style="color: #000000;">1</span> received, <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span> packet loss, <span style="color: #000000; font-weight: bold;">time</span> 0ms
rtt min<span style="color: #000000; font-weight: bold;">/</span>avg<span style="color: #000000; font-weight: bold;">/</span>max<span style="color: #000000; font-weight: bold;">/</span>mdev = <span style="color: #000000;">0.140</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0.140</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0.140</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0.000</span> ms
Installing cgi script BackupPC_Admin <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>BackupPC
&nbsp;
Ok, it looks like we are finished.  There are several <span style="color: #c20cb9; font-weight: bold;">more</span> things you
will need to <span style="color: #000000; font-weight: bold;">do</span>:
&nbsp;
  - Browse through the config <span style="color: #c20cb9; font-weight: bold;">file</span>, <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>config.pl,
    and <span style="color: #c20cb9; font-weight: bold;">make</span> sure all the settings are correct.  In particular,
    you will need to <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">$Conf</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>CgiAdminUsers<span style="color: #7a0874; font-weight: bold;">&#125;</span> so you have
    administration privileges <span style="color: #000000; font-weight: bold;">in</span> the CGI interface.
&nbsp;
  - Edit the list of hosts to backup <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>hosts.
&nbsp;
  - Read the documentation <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>BackupPC.html.
    Please pay special attention to the security section.
&nbsp;
  - Verify that the CGI script BackupPC_Admin runs correctly.  You might
    need to change the permissions or group ownership of BackupPC_Admin.
    If this is an upgrade and you are using mod_perl, you will need
    to restart Apache.  Otherwise it will have stale code.
&nbsp;
  - BackupPC should be ready to start.  Don<span style="color: #ff0000;">'t forget to run it
    as user backuppc!  The installation also contains an
    init.d/backuppc script that can be copied to /etc/init.d
    so that BackupPC can auto-start on boot.  This will also enable
    administrative users to start the server from the CGI interface.
    See init.d/README.
&nbsp;
Enjoy!</span></pre></div></div>

<h3>Los pasos post-instalación</h3>
<p>*Comprobar en /etc/httpd/modules/ que tenemos mod_perl.so</p>
<p>* Ahora en la configuracion del apache vemos que esté cargado el mod_perl</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo cgi-bin<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># more /etc/httpd/conf/httpd.conf | grep mod_perl</span>
LoadModule perl_module modules<span style="color: #000000; font-weight: bold;">/</span>mod_perl.so</pre></div></div>

<p>* Añadir la configuración necesaria de apache&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Alias <span style="color: #000000; font-weight: bold;">/</span>bpc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #ff0000;">&quot;/var/www/cgi-bin/BackupPC/&quot;</span>
        <span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/var/www/cgi-bin/BackupPC/&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
            Options All
&nbsp;
            SetHandler perl-script
            PerlResponseHandler ModPerl::Registry
            PerlOptions +ParseHeaders
            Options +ExecCGI
&nbsp;
            AddHandler perl-script .pl
            AddType application<span style="color: #000000; font-weight: bold;">/</span>x-perl-httpd .pl
            PerlHandler ModPerl::Registry
            PerlSendHeader On
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Si seguimos estos pasos lo normal es que al invocar la url del backuppc nos salgan errores:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Error: Unable to <span style="color: #c20cb9; font-weight: bold;">read</span> config.pl or language <span style="color: #c20cb9; font-weight: bold;">strings</span><span style="color: #000000; font-weight: bold;">!!</span>
&nbsp;
Note: <span style="color: #007800;">$ENV</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>REMOTE_USER<span style="color: #7a0874; font-weight: bold;">&#125;</span> is not <span style="color: #000000; font-weight: bold;">set</span>, <span style="color: #c20cb9; font-weight: bold;">which</span> could mean there is an installation problem. BackupPC_Admin expects Apache to authenticate the user and pass their user name into this script <span style="color: #c20cb9; font-weight: bold;">as</span> the REMOTE_USER environment variable. See the documentation.</pre></div></div>

<p>Esto pasa por los permisos del <code>/etc/BackupPC/...</code> porque el usuario apache no es capaz ni de leer ni de ejecutar el <code>/etc/BackupPC/config.pl</code></p>
<p>Por tanto vamos a cambiar estos permisos&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo cgi-bin<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chmod o+rx /etc/BackupPC/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo cgi-bin<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chmod o+rx /etc/BackupPC/config.pl</span></pre></div></div>

<p>Ahora la web ya carga, aunque pone:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #ff0000;">&quot;Error: Wrong user: my userid is 48, instead of 502(backuppc) 
This script needs to run as the user specified in <span style="color: #007800;">$Conf</span>{BackupPCUser}, which is set to backuppc.
&nbsp;
This is an installation problem. If you are using mod_perl then it appears that Apache is not running as user backuppc. If you are not using mod_perl, then most like setuid is not working properly on BackupPC_Admin. Check the permissions on /var/www/cgi-bin/BackupPC/BackupPC_Admin and look at the documentation. &quot;</span></pre></div></div>

<p>Vamos al config.pl y cambiamos la <em>$Conf{BackupPCUser}</em> al usuario apache.</p>
<p>F5 en la web y da este error&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo cgi-bin<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># 2010-03-23 12:33:32 Can't create a test hardlink between a file in /img/BackupPC/pc and /img/BackupPC/cpool.  Either these are different file systems, or this file system doesn't support hardlinks, or these directories don't exist, or there is a permissions problem, or the file system is out of inodes or full.  Use df, df -i, and ls -ld to check each of these possibilities. Quitting...</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>+  Exit <span style="color: #000000;">1</span>                  <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-u</span> apache <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><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>BackupPC<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>BackupPC <span style="color: #660033;">-d</span></pre></div></div>

<p>Esto pasaba porque estaban a cargo de <code>backuppc</code> y los cambiamos a <code>apache</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo cgi-bin<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># ll /img</span>
total <span style="color: #000000;">44</span>
drwxr-x---  <span style="color: #000000;">6</span> backuppc backuppc  <span style="color: #000000;">4096</span> Mar <span style="color: #000000;">23</span> <span style="color: #000000;">12</span>:05 BackupPC
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>olmo cgi-bin<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chown -R apache:apache /img/BackupPC/</span></pre></div></div>

<p>Ahora ya nos quita la segunda parte del error, pero no tenemos configurado el fichero host&#8230; Lo configuramos con nuestros hostnames, si estos tienen IP estática o dinámica (0 ó 1) y los user &#8220;encargados&#8221; de cada host. ¡Ojo al editar este fichero si lo hacemos como root, que se macharán los permisos!</p>

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

<p>Para que arranque con cada boot de la máquina sigue las instrucciones:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">RedHat Linux:
============
&nbsp;
When configure.pl is run, the script linux-backuppc is created. It
should be copied to <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>backuppc:
&nbsp;
    <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>miguel<span style="color: #000000; font-weight: bold;">/</span>backuppc-install<span style="color: #000000; font-weight: bold;">/</span>BackupPC-3.1.0<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>linux-backuppc <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>backuppc
&nbsp;
After copying it, you can <span style="color: #7a0874; font-weight: bold;">test</span> it by running these commands <span style="color: #c20cb9; font-weight: bold;">as</span> root:
&nbsp;
    <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>backuppc 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>backuppc status
    <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>backuppc stop
&nbsp;
You should <span style="color: #000000; font-weight: bold;">then</span> run the following commands <span style="color: #c20cb9; font-weight: bold;">as</span> root:
&nbsp;
    chkconfig <span style="color: #660033;">--add</span> backuppc
    chkconfig <span style="color: #660033;">--level</span> <span style="color: #000000;">345</span> backuppc on
    chkconfig <span style="color: #660033;">--list</span> backuppc
&nbsp;
This will auto-start backuppc at run levels <span style="color: #000000;">3</span>, <span style="color: #000000;">4</span> and <span style="color: #000000;">5</span>.</pre></div></div>

<p>¡<strong>Notar que en el fichero <code>/etc/init.d/backuppc</code> hay que cambiar el usuario <code>backuppc</code> por <code>apache</code> para que funcione todo</strong>!</p>
<p>Luego hemos cambiado en el <code>config.pl</code> dónde loggea (lo hemos pasado al /usr/local/BackupPC/log) y lo hemos creado con <code>apache:apache</code>.</p>
<p>Ahora arrancamos el asunto:</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>backuppc start</pre></div></div>

<p>Sale más o menos, pero vemos en el log que hay problemas&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Backup failed on olmo.unizar.es <span style="color: #7a0874; font-weight: bold;">&#40;</span>File::RsyncP module doesn<span style="color: #ff0000;">'t exist)</span></pre></div></div>

<p>Vamos a instalar ese módulo de perl con CPAN:<br />
Como root ejecutar:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cpan
cpan<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">install</span> File::RsyncP</pre></div></div>

<p>Luego restart apache y backuppc:</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>httpd 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>backuppc restart</pre></div></div>

<h3>Pasos opcionales post-instalación</h3>
<p>Un plus: se puede colocar el LDAP para validar el acceso por web. Además se permite configurar en el config.pl qué usuarios acceden a administrar cada servidor.</p>
<p>Editamos estas variables en el fichero config.pl (si ponemos * lo dejamos a todos los usuarios, sino solo a user1, user2, p ejemplo):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$Conf</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>CgiAdminUserGroup<span style="color: #7a0874; font-weight: bold;">&#125;</span> = <span style="color: #ff0000;">''</span>;
<span style="color: #007800;">$Conf</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>CgiAdminUsers<span style="color: #7a0874; font-weight: bold;">&#125;</span>     = <span style="color: #ff0000;">'user1, user2'</span>;</pre></div></div>

<p>Además en la config del apache habrá que meter las siguientes líneas dentro del directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">              <span style="color: #666666; font-style: italic;"># autenticar contra el LDAP</span>
               AuthType Basic
               AuthBasicProvider ldap
               AuthName <span style="color: #ff0000;">&quot;Autenticacion OpenLDAP &quot;</span>
               AuthzLDAPAuthoritative off
               AuthLDAPURL <span style="color: #ff0000;">&quot;ldap://ldapmail.unizar.es/ou=Accounts,dc=unizar,dc=es?uid?sub?(objectClass=person)&quot;</span>
               Require valid-user</pre></div></div>

<p>Y restartar todo, como siempre</p>
<h3>Ajustar SSH para rsync root</h3>
<p>Se puede consultar <a href="http://backuppc.sourceforge.net/faq/ssh.html">http://backuppc.sourceforge.net/faq/ssh.html</a></p>
<h3>Más documentación (oficial) por si esto te supera</h3>
<p>http://backuppc.sourceforge.net/faq/debugCGI.html#i_get_the_error_error__unable_to_read_config_pl_or_language_strings____how_do_i_fix_this</p>
<p>http://backuppc.sourceforge.net/faq/BackupPC.html</p>
<p>http://backuppc.sourceforge.net/faq/ssh.html</p>
<p>Related posts:<ol>
<li><a href='http://www.leccionespracticas.com/informatica-sistemas-y-servidores/instalacion-y-configuracion-vufind-en-redhat-el5-apache-2-2-16-php-5-2-14/' rel='bookmark' title='Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14'>Instalación y configuración vufind en RedHat EL5 + Apache 2.2.16 + PHP 5.2.14</a></li>
<li><a href='http://www.leccionespracticas.com/javascript/jquery-en-10-minutos-guia-para-impacientes/' rel='bookmark' title='jQuery en 10 minutos | guia para impacientes'>jQuery en 10 minutos | guia para impacientes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leccionespracticas.com/informatica-sistemas-y-servidores/backuppc-gestion-de-backups-guia-de-instalacion-para-bobos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

