<?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>Focus the Web Tech Blog &#187; linux</title>
	<atom:link href="http://tech.focustheweb.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.focustheweb.com</link>
	<description>Programmazione, web, internet, howtos, etc.</description>
	<lastBuildDate>Sat, 24 Apr 2010 09:16:53 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Phusion Passenger Rails deployment (mod_rails server HTTP Apache 2)</title>
		<link>http://tech.focustheweb.com/programmazione/ruby-programmazione/phusion-passenger-rails-deployment/</link>
		<comments>http://tech.focustheweb.com/programmazione/ruby-programmazione/phusion-passenger-rails-deployment/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 17:15:48 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://tech.focustheweb.com/?p=294</guid>
		<description><![CDATA[







Phusion Passenger (o mod_rails) è un modulo per server Apache2 o nginx usato per il deployment di applicazioni Ruby, incluse quelle basate sul framework Rails.
L&#8217;installazione è semplice:

installiamo la gemma corrispondente

gem install passenger


eseguiamo il comando

passenger-install-apache2-module

per installare il modulo per server Apache 2 oppure

passenger-install-nginx-module

per installare il modulo per server nginx

Ok, Passenger installato!
Possiamo aggiungere la riga PassengerDefaultUser myuser [...]]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-7194529311513014";
/* 468x60, creato 21/11/09 */
google_ad_slot = "8123373738";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
<br />
<img class="size-full wp-image-298 alignleft" title="passenger" src="http://tech.focustheweb.com/wp-content/uploads/2009/12/passenger.png" alt="passenger" width="199" height="64" /><strong>Phusion Passenger</strong> (o <code>mod_rails</code>) è un modulo per server Apache2 o nginx usato per il <em>deployment</em> di applicazioni <strong>Ruby</strong>, incluse quelle basate sul framework <strong>Rails</strong>.</p>
<p>L&#8217;installazione è semplice:</p>
<ol>
<li>installiamo la gemma corrispondente

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

</li>
<li>eseguiamo il comando

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">passenger-install-apache2-module</pre></div></div>

<p>per installare il modulo per <strong>server Apache 2</strong> oppure</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">passenger-install-nginx-module</pre></div></div>

<p>per installare il modulo per <strong>server nginx</strong></li>
</ol>
<p><span id="more-294"></span>Ok, Passenger installato!<br />
Possiamo aggiungere la riga <code>PassengerDefaultUser myuser</code> al file di configurazione del modulo che si trova nella directory <code>/etc/apache/mods-available/passenger.load</code> per impostare come utente di default di Passenger lo stesso che usiamo per &#8220;fare i <em>deployments</em>&#8221; (nel nostro caso <code>myuser</code>).</p>
<p>Per creare una nuova applicazione Rails lanciamo il comando</p>

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

<p>Questo comando crea una cartella <code>myapp</code>, all&#8217;interno della cartella corrente, contenente i files dell&#8217;applicazione.</p>
<p>Aggiungiamo il file di configurazione del virtual host per la nostra applicazione rails all&#8217;interno della cartella <code>/etc/apache2/sites-available</code></p>

<div class="wp_syntax"><div class="code"><pre class="apacheconf" style="font-family:monospace;">#
# myapp.com
#
&lt;VirtualHost *:80&gt;
  ServerName myapp.com
  DocumentRoot /var/vhosts/myapp.com/public
&nbsp;
  RailsEnv development
&nbsp;
  &lt;Directory /var/vhosts/myapp.com/public&gt;
    Order allow,deny
    Allow from all
  &lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre></div></div>

<p>Nella configurazione commentate la direttiva <code>RailsEnv development</code> per usare come impostazione di default l&#8217;ambiente di produzione.</p>
<p>Attiviamo il virtual host appena creato</p>

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

<p>Riavviamo il server HTTP</p>

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

<p>Aggiungiamo il nome myapp.com al file <code>/etc/hosts</code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;127.0.0.1 myapp.com&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</pre></div></div>

<p>Ora possiamo visitare la pagina index di default di un&#8217;applicazione rails all&#8217;indirizzo http://myapp.com.</p>
<p>Per maggiori informazioni su Phusion Passenger ecco l&#8217;<a title="Phusion Passenger" href="http://www.modrails.com/index.html">home page del progetto</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/ruby-programmazione/phusion-passenger-rails-deployment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logwatch, servizio per l&#8217;analisi dei log di sistema, installazione e configurazione</title>
		<link>http://tech.focustheweb.com/programmazione/logwatch-servizio-per-lanalisi-dei-log-di-sistema-installazione-e-configurazione/</link>
		<comments>http://tech.focustheweb.com/programmazione/logwatch-servizio-per-lanalisi-dei-log-di-sistema-installazione-e-configurazione/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 22:44:02 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[logwatch]]></category>

		<guid isPermaLink="false">http://tech.focustheweb.com/?p=258</guid>
		<description><![CDATA[
Logwatch è un sistema personalizzabile di analisi dei log. Questo strumento analizza i log di sistema per un determinato periodo di tempo e crea dei report, questi report possono essere inviati via email per tenere sotto controllo servers remoti.
Per installare Logwatch su una distribuzione Debian GNU/Linux eseguite il comando

sudo aptitude install logwatch

Questo comando installa Logwatch [...]]]></description>
			<content:encoded><![CDATA[<p><br />
<strong>Logwatch</strong> è un sistema personalizzabile di analisi dei log. Questo strumento analizza i log di sistema per un determinato periodo di tempo e crea dei <em>report</em>, questi report possono essere inviati via email per tenere sotto controllo servers remoti.</p>
<p>Per installare Logwatch su una distribuzione Debian GNU/Linux eseguite il comando</p>

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

<p>Questo comando installa Logwatch e crea un file eseguibile (<code>00logwatch</code>) nella cartella <code>/etc/cron.daily</code>, in questo modo Logwatch verrà eseguito ogni giorno, in modo automatico, dal servizio per le operazioni pianificate (<code>cron</code>).<br />
<span id="more-258"></span><br />
Copiamo il file di configurazione di default nella cartella delle configurazioni di sistema</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>logwatch<span style="color: #000000; font-weight: bold;">/</span>default.conf<span style="color: #000000; font-weight: bold;">/</span>logwatch.conf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>logwatch<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Ora possiamo modificare il file appena creato per mettere a punto una configurazione ad hoc per il nostro sistema. Per convenzione, se Logwatch trova il file di configurazione <code>/etc/logwatch/conf/logwatch.conf</code>, tutti i parametri impostati in questo file oscureranno i parametri di default.</p>
<p>Ecco una lista dei parametri di configurazione di maggior interesse:</p>
<p><strong><code>LogDir = /var/log</code></strong><br />
Directory di default dove risiedono i log</p>
<p><strong><code>MailTo = root</code></strong><br />
A chi vengono inviate le mail di Logwatch, può essere un utente locale o un normale indirizzo email<br />
<strong>Nota:</strong> se le mail non vengono recapitate controllare lo script nella cartella <code>/etc/cron.daily/00logwatch</code> e togliere il parametro <code>--mailto root</code></p>
<p><strong><code>Print = No</code></strong><br />
Se impostato a <code>Yes</code>, l&#8217;output di Logwatch viene visualizzato a schermo invece di essere inviato via mail</p>
<p><strong><code>Range = yesterday</code></strong><br />
Indica su quale periodo fare l&#8217;analisi dei log.</p>
<ul>
<li><code>All</code> analizza tutti i log</li>
<li><code>Yesterday</code> si riferisce ai log del giorno prima (utile in caso di esecuzione pianificata notturna)</li>
<li><code>Today</code> si riferisce alle righe di log relative al giorno corrente</li>
</ul>
<p><strong><code>Detail = Low</code></strong><br />
Livello di dettaglio dei report. Valori ammessi: <code>Low</code>, <code>Med</code>, <code>High</code></p>
<p><strong><code>Service = All</code></strong><br />
Definisce per quali servizi verificare i log.<br />
Valori ammessi: <code>All</code> o uno o più servizi, da scrivere su più righe, come <code>pam_pwdb</code> e <code>ftpd-messages</code></p>
<p>Per maggiori informazioni:</p>
<ul>
<li><a title="Logwatch" href="http://www.logwatch.org/">Logwatch homepage</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/logwatch-servizio-per-lanalisi-dei-log-di-sistema-installazione-e-configurazione/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creare un file di test di dimensioni arbitrarie con Linux</title>
		<link>http://tech.focustheweb.com/programmazione/creare-un-file-di-test-di-dimensioni-arbitrarie-con-linux/</link>
		<comments>http://tech.focustheweb.com/programmazione/creare-un-file-di-test-di-dimensioni-arbitrarie-con-linux/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 08:43:43 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[/dev/zero]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.arzanadv.it/blog/2009/10/09/creare-un-file-di-test-di-dimensioni-arbitrarie-con-linux/</guid>
		<description><![CDATA[
Da una riga di comando unix possiamo creare file di dimensioni arbitrarie con il comando dd (dataset definition). Ad esempio potremmo voler testare la velocità di upload del nostro server FTP caricando un file test di 50 Mb; per fare questo creiamo il file di test con il comando

dd if=/dev/zero of=test bs=50000000 count=1

dove

if
è il file [...]]]></description>
			<content:encoded><![CDATA[<p><br />
Da una <em>riga di comando</em> unix possiamo creare file di dimensioni arbitrarie con il comando <strong><samp>dd</samp></strong> (<em>dataset definition</em>). Ad esempio potremmo voler testare la <em>velocità di upload</em> del nostro server FTP caricando un <strong>file test di 50 Mb</strong>; per fare questo creiamo il file di test con il comando</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;"><span style="color: #000000; font-weight: bold;">if</span></span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of</span>=<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #007800;">bs</span>=<span style="color: #000000;">50000000</span> <span style="color: #007800;">count</span>=<span style="color: #000000;">1</span></pre></div></div>

<p><span id="more-200"></span>dove</p>
<dl>
<dt>if</dt>
<dd>è il file di input (nel nostro caso usiamo il file speciale <a title="Wikipedia - /dev/zero" href="http://en.wikipedia.org/wiki//dev/zero"><strong>device zero</strong></a> che restituisce solo caratteri <samp>null</samp>)</dd>
<dt>of</dt>
<dd>è il file di output</dd>
<dt>bs</dt>
<dd>è la dimensione del file di output in bytes</dd>
<dt>count</dt>
<dd>è il numero di blocchi in input da copiare</dd>
</dl>
<p>Per maggiori informazioni su questo argomento</p>
<ul>
<li><a title="Wikipedia - dd" href="http://en.wikipedia.org/wiki/Dd_(Unix)">Wikipedia &#8211; dd</a></li>
<li><a title="Wikipedia - /dev/zero" href="http://en.wikipedia.org/wiki//dev/zero">Wikipedia &#8211; /dev/zero</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/creare-un-file-di-test-di-dimensioni-arbitrarie-con-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creare ed attivare un nuovo VirtualHost per Apache 2 web server su Debian Linux</title>
		<link>http://tech.focustheweb.com/programmazione/creare-ed-attivare-un-nuovo-virtualhost-per-apache-2-web-server-su-debian-linux/</link>
		<comments>http://tech.focustheweb.com/programmazione/creare-ed-attivare-un-nuovo-virtualhost-per-apache-2-web-server-su-debian-linux/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 07:36:07 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache 2]]></category>
		<category><![CDATA[configurazione]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.arzanadv.it/blog/2009/08/04/attivare-un-nuovo-virtualhost-per-apache-2-su-sistema-linux/</guid>
		<description><![CDATA[
In questo articolo presentiamo delle istruzioni passo per passo utili alla creazione e all&#8217;attivazione di un nuovo VirtualHost per Apache 2 http server.
Come esempio prendiamo il dominio http://www.example.com.

Creare un nuovo file di configurazione per il VirtualHost a partire da questo semplice template (sostituire ogni occorrenza di example.com con il vero nome del dominio)

#
# www.example.com
#
&#60;VirtualHost *:80&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p><br />
In questo articolo presentiamo delle istruzioni passo per passo utili alla creazione e all&#8217;attivazione di un nuovo <strong>VirtualHost</strong> per <a href="http://www.arzanadv.it/blog/tag/apache-2/" title="Apache 2 http server"><strong>Apache 2</strong> http server</a>.</p>
<p>Come esempio prendiamo il dominio http://www.example.com.<span id="more-181"></span></p>
<ol>
<li>Creare un nuovo file di configurazione per il VirtualHost a partire da questo semplice template (sostituire ogni occorrenza di <em>example.com</em> con il vero nome del dominio)

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">#
# www.example.com
#
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span>
    ServerAdmin webmaster@example.com
    DocumentRoot /var/vhosts/example.com/www
    ServerName www.example.com
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Directory</span> /var/vhosts/example.com/www<span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        Options FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    ErrorLog /var/log/apache2/www.example.com-error.log
&nbsp;
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
&nbsp;
    CustomLog /var/log/apache2/www.example.com-access.log combined
    ServerSignature Off
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<dl>
<dt>&lt;VirtualHost *:80&gt;</dt>
<dd>indica l&#8217;utilizzo di <em>virtual hosts basati sui nomi</em> (per maggiori informazioni sull&#8217;argomento consiglio di consultare la documentazione ufficiale di Apache sui <a href="http://httpd.apache.org/docs/2.0/vhosts/name-based.html" title="Apache 2 Documentation - Name Based Virtual Hosts" target="_blank">Name Based Virtual Hosts</a>) e racchiude direttive applicabili solo ad un uno specifico <em>hostname</em> o indirizzo IP</dd>
<dt>ServerAdmin</dt>
<dd>imposta l&#8217;indirizzo e-mail che il server inserisce nei messaggi d&#8217;errore mandati ai clients</dd>
<dt>DocumentRoot</dt>
<dd>indica la cartella che diventerà la radice dell&#8217;albero visibile dal web (esempio: lo &#8220;<strong>/</strong>&#8221; di http://www.arzanaweb.com<strong>/</strong>)</dd>
<dt>ServerName</dt>
<dd><em>hostname</em> usato dal server per identificarsi</dd>
<dt>&lt;Directory /var/vhosts/example.com/www/&gt;</dt>
<dd>racchiude direttive applicabili solo alla cartella /var/vhosts/example.com/www/ e alle sue sottocartelle</dd>
<dt>Options</dt>
<dd>configura le caratteristiche di una cartella
<dl>
<dt>FollowSymLinks</dt>
<dd>il server seguirà i link presenti nella cartella</dd>
<dt>MultiViews</dt>
<dd>abilita la ricerca MultiViews (consultare documentazione modulo <a href="http://httpd.apache.org/docs/2.0/mod/mod_negotiation.html#multiviews" title="documentazione modulo mod_negotiation" target="_blank">mod_negotiation</a>) per questa cartella</dd>
</dl>
</dd>
<dt>AllowOverride All</dt>
<dd>permette l&#8217;<em>overriding </em>delle tutte le opzioni fatta eccezione per la MultiViews per mezzo di files .htaccess (per maggiori informazioni sull&#8217;argomento consultare il tutorial sugli <a href="http://httpd.apache.org/docs/2.0/howto/htaccess.html" title="documentazione .htaccess files" target="_blank">.htaccess files</a>)</dd>
<dt>Order Allow, Deny</dt>
<dd>indica l&#8217;ordine di valutazione delle direttive Allow e Deny</dd>
<dt>Allow from all</dt>
<dd>Allow accorda a qualsiasi host (from all) l&#8217;accesso alla cartella (per maggiori informazioni consultare documentazione <a href="http://httpd.apache.org/docs/2.0/mod/mod_access.html" target="_blank" title="documentazione modulo mod_access">modulo mod_access</a>)</dd>
<dt>ErrorLog</dt>
<dd>specifica il percorso del file di <em>log</em> degli errori</dd>
<dt>LogLevel</dt>
<dd>specifica il livello di <em>verbosità</em> del sistema di logging, il valore appartiene all&#8217;insieme (ordinato in modo crescente rispetto alla mole di dati <em>loggati</em>) {emerg, alert, crit, error, warn, notice, info, debug}</dd>
<dt>CustoLog</dt>
<dd>imposta nome e formato del file di log (documentazione <a href="http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#customlog" target="_blank" title="documentazione modulo mod_log_config">modulo mod_log_config</a>)</dd>
<dt>ServerSignature</dt>
<dd>configura il footer dei documenti generati dal server (esempio: documenti d&#8217;errore come le pagine di <em>&#8220;risorsa non trovata&#8221;</em> o <em>404</em>)</dd>
</dl>
</li>
<li>Creare la cartella radice del VirtualHost

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>vhost<span style="color: #000000; font-weight: bold;">/</span>example.com
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>vhost<span style="color: #000000; font-weight: bold;">/</span>example.com<span style="color: #000000; font-weight: bold;">/</span>www</pre></div></div>

</li>
<li>Abilitare il VirtualHost appena creato

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

<p>in questo modo viene creato un link simbolico dal file di configurazione chiamato <samp>example.com</samp> nella cartella di configurazione di Apache 2 <samp>/etc/apache2/sites-available</samp> alla cartella dei virtual hosts attivi <samp>/etc/apache2/sites-enabled</samp></li>
<li>Ricaricare le configurazioni del server web

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

</li>
</ol>
<p>Da ora il nuovo VirtualHost è raggiungibile all&#8217;indirizzo http://www.example.com.</p>
<p>Se i DNS non sono ancora stati configurati possiamo aggiungere una riga al file hosts locale (<samp>/etc/hosts</samp>), far puntare il nome a dominio <samp>www.example.com</samp> all&#8217;indirizzo <samp>127.0.0.1</samp> (<samp>localhost</samp>) ed accedere al sito scrivendo sulla barra dell&#8217;indirizzo di un browser http://www.example.com.</p>
<p>Per maggiori informazioni consiglio di consultare la documentazione di <a href="http://httpd.apache.org/docs/2.0/" target="_blank" title="Apache 2 http server documentation">Apache 2 http server</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/creare-ed-attivare-un-nuovo-virtualhost-per-apache-2-web-server-su-debian-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Come calcolare la dimensione di una directory o lo spazio rimanente su disco dalla shell di Linux</title>
		<link>http://tech.focustheweb.com/programmazione/come-calcolare-la-dimensione-di-una-directory-o-lo-spazio-rimanente-su-disco-dalla-shell-di-linux/</link>
		<comments>http://tech.focustheweb.com/programmazione/come-calcolare-la-dimensione-di-una-directory-o-lo-spazio-rimanente-su-disco-dalla-shell-di-linux/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 16:07:15 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[df]]></category>
		<category><![CDATA[du]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.arzanadv.it/blog/2009/08/03/come-capire-la-dimensione-di-una-directory-o-lo-spazio-rimanente-su-disco-dalla-shell-di-linux/</guid>
		<description><![CDATA[
Molto spesso capita di voler calcolare la dimensione totale di una directory o lo spazio rimanente su disco. In molti casi l&#8217;interfaccia grafica del sistema operativo in uso accorre in nostro aiuto (ad esempio: Explorer per Windows, Finder per Mac OS e Nautilus per Gnome), ma se abbiamo a che fare con una riga di [...]]]></description>
			<content:encoded><![CDATA[<p><br />
Molto spesso capita di voler calcolare la <strong>dimensione totale di una directory</strong> o lo <strong>spazio rimanente su disco</strong>. In molti casi l&#8217;interfaccia grafica del sistema operativo in uso accorre in nostro aiuto (ad esempio: Explorer per Windows, Finder per Mac OS e Nautilus per Gnome), ma se abbiamo a che fare con una <strong>riga di comando</strong>, in genere una shell bash, potrebbe non venire automatica una azione tanto banale.</p>
<p>In questo caso, se ad esempio lavoriamo via ssh su un server remoto, possiamo usa i comandi <strong><samp>du</samp></strong> e <strong><samp>df</samp></strong>.<span id="more-180"></span></p>
<p>Il comando <samp>du</samp> restituisce in output la lista di tutte le directories presenti nella directory corrente scendendo lungo il filesystem in modo ricorsivo e scrivendo a fianco di ogni file la sua dimensione in kilobytes.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">giovanni<span style="color: #000000; font-weight: bold;">@</span>giovanni-desktop:~$ <span style="color: #c20cb9; font-weight: bold;">du</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">112</span>     .<span style="color: #000000; font-weight: bold;">/</span>docs
<span style="color: #000000;">132</span>     .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>photos
<span style="color: #000000;">728</span>     .<span style="color: #000000; font-weight: bold;">/</span>images
<span style="color: #000000;">1060</span>    .</pre></div></div>

<p>Per aumentare la leggibilità dell&#8217;output possiamo applicare l&#8217;opzione <samp>-h</samp> (human-readable) al comando per ricevere in output le dimensioni in bytes, kilobytes, megabytes, ecc.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">giovanni<span style="color: #000000; font-weight: bold;">@</span>giovanni-desktop:~$ <span style="color: #c20cb9; font-weight: bold;">du</span> <span style="color: #660033;">-h</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">112K    .<span style="color: #000000; font-weight: bold;">/</span>docs
132K    .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>photos
728K    .<span style="color: #000000; font-weight: bold;">/</span>images
1.1M    .</pre></div></div>

<p>Per controllare la dimensione di ogni singolo file all&#8217;interno della nostra cartella possiamo appendere l&#8217;opzione <samp>-a</samp> (all) al comando precedente.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">giovanni<span style="color: #000000; font-weight: bold;">@</span>giovanni-desktop:~$ <span style="color: #c20cb9; font-weight: bold;">du</span> <span style="color: #660033;">-ah</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">108K    .<span style="color: #000000; font-weight: bold;">/</span>docs<span style="color: #000000; font-weight: bold;">/</span>attachment_test.doc
112K    .<span style="color: #000000; font-weight: bold;">/</span>docs
108K    .<span style="color: #000000; font-weight: bold;">/</span>attachment_test.pdf
108K    .<span style="color: #000000; font-weight: bold;">/</span>attachment_test.pdf.zip
56K     .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>photos<span style="color: #000000; font-weight: bold;">/</span>ph2.jpg
72K     .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>photos<span style="color: #000000; font-weight: bold;">/</span>ph1.jpg
132K    .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>photos
256K    .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>im4.jpg
80K     .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>im2.jpg
144K    .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>im1.jpg
112K    .<span style="color: #000000; font-weight: bold;">/</span>images<span style="color: #000000; font-weight: bold;">/</span>im3.jpg
728K    .<span style="color: #000000; font-weight: bold;">/</span>images
1.1M    .</pre></div></div>

<p>Se vogliamo conoscere la dimensione delle sole cartelle al primo livello gerarchico possiamo usare l&#8217;opzione <samp>&#8211;max-depth=1</samp>, in questo modo le cartelle ad un livello maggiore del parametro che impostiamo saranno ignorate dal comando <samp>du</samp> (in questo caso tutte le cartelle ad un livello maggiore di 1).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">giovanni<span style="color: #000000; font-weight: bold;">@</span>giovanni-desktop:~$ <span style="color: #c20cb9; font-weight: bold;">du</span> <span style="color: #660033;">--max-depth</span>=<span style="color: #000000;">1</span> <span style="color: #660033;">-h</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">112K    .<span style="color: #000000; font-weight: bold;">/</span>docs
728K    .<span style="color: #000000; font-weight: bold;">/</span>images
1.1M    .</pre></div></div>

<p>Per conoscere lo spazio disponibile sul disco invece usiamo il comando <samp>df</samp>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">giovanni<span style="color: #000000; font-weight: bold;">@</span>giovanni-desktop:~$ <span style="color: #c20cb9; font-weight: bold;">df</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Filesystem           1K-blocks      Used Available Use<span style="color: #000000; font-weight: bold;">%</span> Mounted on
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1            <span style="color: #000000;">300238472</span>  <span style="color: #000000;">74859640</span> <span style="color: #000000;">210127528</span>  <span style="color: #000000;">27</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>
tmpfs                  <span style="color: #000000;">1287364</span>         <span style="color: #000000;">0</span>   <span style="color: #000000;">1287364</span>   <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>init<span style="color: #000000; font-weight: bold;">/</span>rw
varrun                 <span style="color: #000000;">1287364</span>       <span style="color: #000000;">108</span>   <span style="color: #000000;">1287256</span>   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run
varlock                <span style="color: #000000;">1287364</span>         <span style="color: #000000;">0</span>   <span style="color: #000000;">1287364</span>   <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock
udev                   <span style="color: #000000;">1287364</span>       <span style="color: #000000;">148</span>   <span style="color: #000000;">1287216</span>   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>dev
tmpfs                  <span style="color: #000000;">1287364</span>        <span style="color: #000000;">84</span>   <span style="color: #000000;">1287280</span>   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm
lrm                    <span style="color: #000000;">1287364</span>      <span style="color: #000000;">2192</span>   <span style="color: #000000;">1285172</span>   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.28-<span style="color: #000000;">14</span>-generic<span style="color: #000000; font-weight: bold;">/</span>volatile</pre></div></div>

<p>Se vogliamo leggere l&#8217;output del comando in maniera più intuitiva utilizziamo l&#8217;opzione <samp>-h</samp> (human-readable).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">giovanni<span style="color: #000000; font-weight: bold;">@</span>giovanni-desktop:~$ <span style="color: #c20cb9; font-weight: bold;">df</span> <span style="color: #660033;">-h</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Filesystem            Size  Used Avail Use<span style="color: #000000; font-weight: bold;">%</span> Mounted on
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1             287G   72G  201G  <span style="color: #000000;">27</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>
tmpfs                 1.3G     <span style="color: #000000;">0</span>  1.3G   <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>init<span style="color: #000000; font-weight: bold;">/</span>rw
varrun                1.3G  108K  1.3G   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run
varlock               1.3G     <span style="color: #000000;">0</span>  1.3G   <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock
udev                  1.3G  148K  1.3G   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>dev
tmpfs                 1.3G   84K  1.3G   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm
lrm                   1.3G  2.2M  1.3G   <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>2.6.28-<span style="color: #000000;">14</span>-generic<span style="color: #000000; font-weight: bold;">/</span>volatile</pre></div></div>

<p>Per maggiori informazioni consiglio la lettura della pagine del manuale con i comandi</p>

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


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

]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/come-calcolare-la-dimensione-di-una-directory-o-lo-spazio-rimanente-su-disco-dalla-shell-di-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installare Ruby on Rails 2.3 su Debian &#8216;lenny&#8217;</title>
		<link>http://tech.focustheweb.com/information-technology/ruby-on-rails-23-su-debian-lenny/</link>
		<comments>http://tech.focustheweb.com/information-technology/ruby-on-rails-23-su-debian-lenny/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 10:22:06 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.arzanadv.it/blog/2009/04/20/ruby-on-rails-23-su-debian-lenny/</guid>
		<description><![CDATA[
Ruby on Rails è un open-source web framework per il linguaggio di programmazione ruby basato sul pattern architetturale Model-View-Controller.
Nel corso degli anni Rails ha aumentato in modo esponenziale il suo pubblico grazie a caratteristiche (scaffolding, implemetazione ORM pattern con ActiveRecord, rake, ecc&#8230;) che rendono veloce ed elegante lo sviluppo di applicazioni web con questo strumento.
Installazione:

installare [...]]]></description>
			<content:encoded><![CDATA[<p><br />
<img src="http://www.arzanadv.it/blog/wp-content/uploads/2009/rails.png" alt="Ruby on Rails logo" style="float: left; margin-right: 15px; margin-bottom: 5px" /><a href="http://rubyonrails.org/" title="Ruby on Rails - sito ufficiale" target="_blank">Ruby on Rails</a> è un open-source web framework per il linguaggio di programmazione <a href="http://www.ruby-lang.org/" title="ruby - linguaggio di programmazione" target="_blank">ruby</a> basato sul pattern architetturale <a href="http://en.wikipedia.org/wiki/Model-View-Controller" title="MVC - Wikipedia" target="_blank">Model-View-Controller</a>.</p>
<p>Nel corso degli anni Rails ha aumentato in modo esponenziale il suo pubblico grazie a caratteristiche (scaffolding, implemetazione ORM pattern con ActiveRecord, rake, ecc&#8230;) che rendono veloce ed elegante lo sviluppo di applicazioni web con questo strumento.<span id="more-13"></span></p>
<p>Installazione:</p>
<ol>
<li>installare ruby (è preferita la versione 1.8.7)

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

</li>
<li>installare <a href="http://rubygems.org/" title="RubyGems - sito ufficiale" target="_blank">RubyGems</a> (gestore di pacchetti ruby)
<ol>
<li>scaricare l&#8217;ultima versione stabile di RubyGems (attualmente la 1.3.2)

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>rubyforge.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">55066</span><span style="color: #000000; font-weight: bold;">/</span>rubygems-1.3.2.tgz</pre></div></div>

</li>
<li>scompattare l&#8217;archivio rar

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf rubygems-1.3.2.tgz</pre></div></div>

</li>
<li>avviare lo script di installazione

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> ruby rubygems-1.3.2<span style="color: #000000; font-weight: bold;">/</span>setup.rb</pre></div></div>

</li>
<li>lo script di installazione crea il file eseguibile <tt>gem1.8</tt>, ma in tutta la documentazione questo file viene citato come <tt>gem</tt> quindi aggiungiamo un collegamento per mantenere intatte le convenzioni

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem1.8 <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>gem</pre></div></div>

</li>
</ol>
</li>
<li>installare Rails come pacchetto gem

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

</li>
</ol>
<p>A questo punto il nostro sistema è pronto per ospitare la nostra prima web application basata su Rails.</p>
<p>Con il comando <tt>rails test_app</tt> creiamo la nostra web application.</p>
<p>Per far partire il server eseguire il comando <tt>ruby test_app/script/server</tt>.</p>
<p>Una versione funzionante della nostra prima applicazione in Rails dovrebbe essere accessibile all&#8217;indirizzo <a href="http://localhost:3000" target="_blank">http://localhost:3000</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/information-technology/ruby-on-rails-23-su-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spostare un repository Subversion</title>
		<link>http://tech.focustheweb.com/programmazione/spostare-un-repository-subversion/</link>
		<comments>http://tech.focustheweb.com/programmazione/spostare-un-repository-subversion/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 12:09:12 +0000</pubDate>
		<dc:creator>Giovanni Cappellotto</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.arzanadv.it/blog/?p=12</guid>
		<description><![CDATA[
Per spostare un repository Subversion da un sistema ad un altro basta eseguire alcuni semplici comandi.

Inizia creando un dump file del repository del sistema sorgente con il comando:

svnadmin dump /path/to/repository &#62; repository-name.dmp


Se il dump file è molto grande lo puoi comprimere con il comando:

tar czvf repository-name.dmp.tar.gz repository-name.dmp


Sposta il file appena creato dal sistema sorgente al [...]]]></description>
			<content:encoded><![CDATA[<p><br />
Per spostare un repository Subversion da un sistema ad un altro basta eseguire alcuni semplici comandi.</p>
<ol>
<li>Inizia creando un dump file del repository del sistema sorgente con il comando:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svnadmin</span> dump <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>repository <span style="color: #000000; font-weight: bold;">&gt;</span> repository-name.dmp</pre></div></div>

</li>
<li>Se il dump file è molto grande lo puoi comprimere con il comando:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> czvf repository-name.dmp.tar.gz repository-name.dmp</pre></div></div>

</li>
<li>Sposta il file appena creato dal sistema sorgente al sistema di destinazione via FTP, SFTP o con il sistema preferito.</li>
<li>Una volta spostato il file nel sistema di destinazione decomprimerlo con il comando:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf repository-name.dmp.tar.gz</pre></div></div>

</li>
<li>Ora posizionati nella cartella dove vuoi creare il nuovo repository

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>new-repository</pre></div></div>

</li>
<li>crea il nuovo repository

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

</li>
<li>carica i dati contenuti del dump file

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svnadmin</span> load repository-name <span style="color: #000000; font-weight: bold;">&lt;</span> repository-name.dmp</pre></div></div>

</li>
</ol>
<p>Il nuovo repository adesso è in produzione!<span id="more-12"></span></p>
<p>Un paio di piccole cose da notare:</p>
<ul>
<li>più vecchio è il repository più grande sarà il dump file visto che rappresenta ogni cambiamento fatto sui files contenuti.</li>
<li>questo metodo funziona ovviamente anche tra diverse piattaforme, quindi è possibile ad esempio spostare il repository da una macchina Windows ad una *NIX e viceversa.</li>
</ul>
<p>Fonti: <a href="http://www.digitalmediaminute.com/article/2251/how-to-move-a-subversion-repository">http://www.digitalmediaminute.com/article/2251/how-to-move-a-subversion-repository</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.focustheweb.com/programmazione/spostare-un-repository-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
