tag:blogger.com,1999:blog-157802432024-03-05T07:24:35.455+01:00Linux OpenSource e varie amenitàGabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-15780243.post-6788394373940056242011-04-25T16:24:00.001+02:002011-04-25T16:25:21.040+02:00Linux - Creare una chiavetta USB bootable con FedoraEsiste un tool grafico per creare chiavette USB bootabili con varie distribuzioni Linux, ma mi sembra molto più veloce utilizzare la linea di comando:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">livecd-iso-to-disk --format --reset-mbr Fedora-13-i686-Live.iso /dev/sdb1</span>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com1tag:blogger.com,1999:blog-15780243.post-80974524703321455942011-04-25T15:58:00.001+02:002011-04-25T15:58:43.209+02:00Linux - Multipath - Supporto multipath.conf per Storage SUN/ORACLEQuesta è la configurazione del multipath.conf per i seguenti storage:<br />
<br />
<ul><li>StorageTek - SUN - Oracle FlexLine 240/280</li>
<li>StorageTek - SUN - Oracle 6580/6780</li>
</ul><div>Il device multipath è la tecnologia di multipath verso lo Storage di Red Hat Enterprise Linux 5.x e altre distribuzioni Linux.</div><br />
<br />
<b>ATTENZIONE nella RHEL 6 alcuni comandi sono cambiati!!!</b><br />
<br />
multipath.conf :<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">defaults {</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> udev_dir /dev</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> polling_interval 5</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> selector "round-robin 0"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> path_grouping_policy failover</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> getuid_callout "/sbin/scsi_id -g -u -s /block/%n"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> path_checker rdac</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> rr_min_io 1000</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> rr_weight uniform</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> user_friendly_names no</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> bindings_file "/var/lib/multipath/bindings"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">}</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">blacklist {</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> devnode "^hd[a-z][[0-9]*]"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">}</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">devices {</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">device {</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> vendor "SUN"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> product "STK6580_6780"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> product_blacklist "Universal Xport"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> getuid_callout "/sbin/scsi_id -g -u -s /block/%n"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> prio_callout "/sbin/mpath_prio_rdac /dev/%n"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> features "0"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> hardware_handler "1 rdac"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> path_grouping_policy group_by_prio</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> failback immediate</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> rr_weight uniform</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> no_path_retry queue</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> rr_min_io 1000</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> path_checker rdac</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> }</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">device {</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> vendor "STK"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> product "OPENstorage D280"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> product_blacklist "Universal Xport"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> getuid_callout "/sbin/scsi_id -g -u -s /block/%n"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> prio_callout "/sbin/mpath_prio_rdac /dev/%n"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> features "0"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> hardware_handler "1 rdac"</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> path_grouping_policy group_by_prio</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> failback immediate</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> rr_weight uniform</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> no_path_retry queue</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> rr_min_io 1000</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> path_checker rdac</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> }</span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> }</span>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-54644113349442319462010-11-02T11:46:00.000+01:002010-11-02T11:46:58.529+01:00Linux - VirtualBox - Hit and Tricks<b>Come condividere un disco fra due macchine virtuali:</b><br />
<div style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Consideriamo due macchine virtuali denominati <i>rac1</i> e <i>rac2</i> e vogliamo che entrambe le macchine possono accedere al disco denominato <i>shared.</i></div><div style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><i><br />
</i></div><div style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Innanzitutto creiamo il disco da condividere con il comando VBoxManage:</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">VBoxManage createhd --filename shared.vdi --size 10240 --format VDI --variant Fixed --type shareable --remember</span></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Agganciamo le due macchine virtuali:</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">VBoxManage storageattach rac1 --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium shared.vdi</span></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span></div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">VBoxManage storageattach rac2 --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium shared.vdi</span></span></div><br />
<div style="font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><br />
<b>Come abilitare USB su Fedora 12 host:</b><br />
<br />
La versione OSE di VirtualBox NON supporta l'USB, quindi è necessario scaricare la versione Oracle abilitando il seguente repository in /etc/yum.repos.d/virtualbox.repo:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">[virtualbox]</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">name=Fedora $releasever - $basearch - VirtualBox</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">enabled=1</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">gpgcheck=1</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc</span></span><br />
<br />
<br />
con i soliti comandi yum installate la versione Oracle di VirtualBox, dopo, naturalmente aver de-installato la versione OSE.<br />
<br />
<br />
Vi ricordo che per la versione Oracle di VirtualBox, occorre aggiungere l'utente che utilizza VirtualBox al gruppo vboxusers nel file /etc/group:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">vboxusers:x:501:paciucci</span></span><br />
<br />
<br />
Per abilitare l'USB, occorre innanzitutto che il gruppo vboxusers possa accedere al filesystem usbfs, per far questo creiamo un mountpoint in /tmp:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">mkdir /tmp/usbfs</span></span><br />
<br />
<br />
e aggiungiamo a /etc/fstab la seguente riga:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">none </span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">/tmp/usbfs </span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">usbfs </span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">devgid=501,devmode=664 0 0</span></span><br />
<br />
<br />
dove il devgid è il gid del gruppo vboxusers.<br />
<br />
<br />
A questo punto effetuiamo un reboot della macchina host: è necessario!!! Nella console di gestione potrete abilitare il supporto per USB.<br />
<br />
<br />
Per vedere come vede le unità USB VirtualBox potete anche utilizzare il comando:<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">VBoxManage list usbhost</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><br />
</span><br />
<br />
<br />
<div><div><b>Come clonare un disco di VirtualBox:</b></div><div><br />
</div><div>Dal Virtual Media Manager effettuare il RELEASE del disco e poi utilizzare il comando:</div><div><br />
</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">#VBoxManage clonevdi input.vdi output.vdi</span></span></div><div><br />
</div><br />
<br />
<div><b>Come abilitare uno Shared Folder fra macchine Linux:</b></div><div><br />
</div><div>Considerando un host linux e un sistema guest linux per abilitare fra l'host e il guest uno Shared Folder occorre:</div><div><ol><li>Installare i Guest Additions</li>
<li>Spegnere la macchina e configurare dalla console grafica il path che dovrà essere condiviso (nel nostro caso la directory /home/paciucci verrà mappata come SharedFolder)</li>
<li>Avviare la macchina virtuale e montare il disco condiviso il comando:</li>
</ol></div><div> <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">#mount -t vboxsf -o uid=1000,gid=1000 SharedFolder /media</span></span></div></div><div><br />
</div>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-45977005477645390852010-10-04T11:24:00.000+02:002010-10-04T11:24:29.694+02:00Linux - JBoss - Configurazione JBoss con una Certification AuthorityNella precedente puntata abbiamo visto come generare in maniera semplice un certificato server per il nostro JBoss EAP.<br />
Adesso complichiamoci un pò la vita cercando di capire come possiamo gestire una Certification Authority, crearci un certificato per il nostro server, creare certificati per i client in modo tale da poter verificare l'autenticità del browser che si collega al nostro portale e una Revocation List nel caso che qualche certificato non sia più autorizzato.<br />
<br />
Iniziamo creandoci la nostra Certification Authority personale. Nel mio caso come utente "jboss" eseguo i seguenti comandi:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">export SSLDIR=/home/jboss/personalCA</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">mkdir $SSLDIR</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">mkdir $SSLDIR/certs</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">mkdir $SSLDIR/crl</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">mkdir $SSLDIR/newcerts</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">mkdir $SSLDIR/private</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">touch $SSLDIR/index.txt</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">echo "0001" > $SSLDIR/serial</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">echo "0001" > $SSLDIR/crlnumber</span></span><br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">cp /etc/pki/tls/openssl.cnf /home/jboss/personalCA</span></span><br />
<br />
edito il file /home/jboss/personalCA/openssl.cnf andando a dichiarare che la directory contenente la mia Certification Authority è presente in /home/jboss/personalCA .<br />
<br />
Con il seguente comando creo la chiave privata (sarebbe bene questa non lasciarla sul filesystem, ma metterla su una chiavetta):<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl genrsa -des3 -out ./personalCA/private/cakey.pem 2048</span></span><br />
<br />
Con il seguente comando mi auto-segno il certificato della CA:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl req -new -x509 -key ./personalCA/private/cakey.pem -out ./personalCA/cacert.pem</span></span><br />
<br />
Con il seguente comando mi genero una chiave. Occorre creare una chiave per ogni certificato emesso dalla CA:<br />
<br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">openssl genrsa -des3 -out certificate-key.pem 1024</span></span><br />
<br />
Con il seguente comando genero un chiave di richiesta (che potrei far firmare a qualche CA autorizzata):<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl req -new -key certificate-key.pem -out certificate-req.pem</span></span><br />
<br />
Con il seguente comando mi auto-segno il certificato:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl ca -config /home/jboss/personalCA/openssl.cnf -in certificate-req.pem -out certificate.pem -notext</span></span><br />
<br />
Il certificato appena segnato viene trasformato in formato PKCS12 che sarà poi installabile in un browser come Internet Explorer o Firefox:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl pkcs12 -export -in certificate.pem -inkey certificate-key.pem -certfile ./personalCA/cacert.pem -out client.p12 -name "Certificato Client"</span></span><br />
<br />
Creaiamo una Revocation List vuota che ha da 365 giorni:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl ca -config /home/jboss/personalCA/openssl.cnf -gencrl -crldays 365 -out ./personalCA/crlFile.pem</span></span><br />
<br />
Verifichiamo che sia vuota:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl crl -in ./personalCA/crlFile.pem -text -noout</span></span><br />
<br />
A questo punto abbiamo configurato la nostra Certification Authority, iniziamo a configurare il nostro JBoss. Avremo bisogno di 3 tipologie di certificati:<br />
- Certificato per il server che chiameremo server.keystore<br />
- Chiave della Certification Authority che abilita i certificati dei client che chiameremo server.truststore<br />
- Revocation List per disabilitare i certificati dei client che chiameremo server.crlFile<br />
<br />
Con il seguente tool generiamo il certificato per il server:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">keytool -genkey -alias tomcat -keyalg RSA -keystore server.keystore -storepass "jboss123"</span></span><br />
<br />
e lo copiamo nella opportuna directory:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">cp server.keystore /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/conf/</span></span><br />
<br />
Con il seguente comando importiamo la CA:<br />
<br />
<br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">keytool -import -v -keystore server.truststore -storepass 123456 -file ./personalCA/cacert.pem</span></span><br />
<br />
e la copiamo nell'opprtuna directory:<br />
<br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cp server.truststore /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/conf/</span></span><br />
<br />
<br />
A questo punto ci copiamo la Revocation List creata precedentemente nella directory di JBOSS:<br />
<br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">cp ./personalCA/crlFile.pem /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/conf/server.crlFile</span></span><br />
<br />
Riconfiguriamo oppurtamento il file server.xml in /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/deploy/jbossweb.sar<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><Connector port="8443" address="${jboss.bind.address}" protocol="HTTP/1.1" SSLEnabled="true" scheme="https" secure="true" clientAuth="true" sslProtocol = "TLS" keystoreFile="${jboss.server.home.dir}/conf/server.keystore" keystorePass="jboss123" keyAlias="tomcat" truststoreFile="${jboss.server.home.dir}/conf/server.truststore" truststorePass="123456" crlFile="${jboss.server.home.dir}/conf/server.crlFile" /></span></span><br />
<br />
<br />
A questo punto avremo:<br />
- <b>keystoreFile</b> che è il file che contiene il certificato per il server<br />
- <b>truststoreFile</b> che contiene il certificato della CA che permette a tutti i certificati client di connettersi con il server<br />
- <b>crlFile</b> che contiene i certificati client revocati<br />
<div><br />
</div><div>Attivando JBoss con la configurazione precedente non sarà più possibile connettersi alle applicazioni finchè non verrà installato sul browser il certificato <b>client.p12</b>.</div><div><br />
</div><div>Con il seguente comando potremo revocare il certificato:</div><div><br />
</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">openssl ca -config /home/jboss/personalCA/openssl.cnf -revoke certificate.pem</span></span></div><div><br />
</div><div>e dopo aver aggiornato la revocation list con il comando:</div><div><br />
</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">cp ./personalCA/crlFile.pem /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/conf/server.crlFile</span></span></div><div><br />
</div><div>non sarà più possibile entrare nelle applicazioni JBoss.</div>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com1tag:blogger.com,1999:blog-15780243.post-19774437525442107312010-09-10T14:57:00.001+02:002010-09-10T15:25:38.459+02:00Linux - JBoss - Configurazione SSL e gestione Certification AuthorityQuesta guida vuole far chiarezza su come si devono creare dei certificati SSL da utilizzare con la <b>JBoss Enterprise Application Platform (EAP) di Red Hat</b>.<br />
<br />
La versione di <b>JBoss</b> di <b>Red Hat</b> si discosta per certi versi dalla versione Comunity. La versione da me utilizzata per questo tutorial è la <b>5.0.1-CR2</b> su <b>Red Hat Enterprise Linux 5.5</b> con la <b>SUN JDK 6 update 21</b> il tutto a <b>32 bit</b>.<br />
<br />
Facciamo i seguenti assunti:<br />
<ul><li>JBoss è installato con l'utente "<i>jboss</i>" nella directory <i>/home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as</i></li>
<li>la SUN JDK è installata in <i>/usr/java/jdk1.6.0_21</i></li>
<li>per questi test utilizziamo il profilo "<i>all</i>" di JBoss</li>
</ul><br />
<br />
Per abilitare il supporto SSL in JBoss EAP ci sono due strade che si discostano sostanzialmente dall'utilizzo che si deve fare dei certificati:<br />
<ol><li><b>Strada semplice</b>: certificato autofirmato necessario semplicemente per il server</li>
<li><b>Strada complicata</b>: gestione di una Certification Authority, con certificato per il server, certificati per i client e Revocation List</li>
</ol><br />
Iniziamo con la <b>strada semplice</b>. Per fare in modo che il nostro Application Server possa creare delle connessioni crittografate con un certificato autofirmato possiamo utilizzare l'utility "<i>keytool</i>" presente nella jdk di SUN.<br />
<br />
Con questo comando generiamo una chiave per il server con l'algoritmo RSA denominata "<i>tomcat</i>", la salviamo nel file secure.keystore con la password "<i>jboss123</i>":<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">keytool -genkey -alias tomcat -keyalg RSA -keystore /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/conf/secure.keystore -storepass "jboss123"</span></span><br />
<br />
Dopo aver risposto alle domande verrà generata la chiave che potremmo vedere con il comando:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">keytool -list -keystore /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/conf/secure.keystore</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Enter keystore password: </span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Keystore type: JKS</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Keystore provider: SUN</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Your keystore contains 1 entries</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">tomcat, Sep 7, 2010, PrivateKeyEntry, </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Certificate fingerprint (MD5): 1B:AF:B5:A8:A3:6E:84:96:0F:43:8A:AC:1F:5D:99:32</span></span><br />
<br />
Adesso configuriamo il tomcat embedded in JBoss per accettare connessioni <b>SSL</b> sulla porta <b>8443</b>. Nel mio caso nella directory <i>/home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/deploy/jbossweb.sar</i> editeremo il file <b>server.xml</b>:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><!-- SSL/TLS Connector configuration using the admin devl guide keystore --></span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> <Connector protocol="HTTP/1.1" SSLEnabled="true" </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> port="8443" address="${jboss.bind.address}"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> scheme="https" secure="true" clientAuth="false" </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> keystoreFile="${jboss.server.home.dir}/conf/secure.keystore"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> keystorePass="jboss123" keyAlias="tomcat" sslProtocol = "TLS" /></span></span><br />
<br />
<br />
Con la versione JDK 6, il programma keytool è in grado di gestire anche keystore in formato <b>PKCS12</b>, quindi se abbiamo un certificato in questo formato nel nostro caso <i>mycert.p12</i> lo possiamo andare a gestire anche con il keytool:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">keytool -list -keystore mycert.p12 -storetype pkcs12</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Enter keystore password: </span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Keystore type: PKCS12</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Keystore provider: SunJSSE</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Your keystore contains 1 entry</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">tomcat, Sep 7, 2010, PrivateKeyEntry, </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Certificate fingerprint (MD5): 73:21:5D:3E:B9:5D:B1:98:C7:C3:5F:C3:49:83:BF:33</span></span><br />
copiandolo nella directory del nostro profilo con il comando:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">cp mycert.p12 /home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/conf/</span></span><br />
<br />
e poi modificando il <b>server.xml</b> in <i>/home/jboss/EnterprisePlatform-5.0.1.CR2/jboss-as/server/all/deploy/jbossweb.sar</i>:<br />
<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><!-- SSL/TLS Connector configuration using the admin devl guide keystore --><br />
<Connector protocol="HTTP/1.1" SSLEnabled="true" <br />
port="8443" address="${jboss.bind.address}"<br />
scheme="https" secure="true" clientAuth="false" <br />
keystoreFile="${jboss.server.home.dir}/conf/mycert.p12"<br />
keystorePass="jboss123" keyAlias="tomcat" sslProtocol = "TLS" keystoreType="PKCS12" /></span><br />
<br />
potremo far gestire a JBoss EAP anche direttamente certificati <b>PKCS12</b>.<br />
<br />
<br />
<br />
<b>Nella prossima puntata vedremo la soluzione più complicata.</b>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-59416539943718287122010-08-17T10:58:00.000+02:002010-08-17T10:58:07.248+02:00Giacomo Agosto 2010Questo è mio figlio Giacomo, nato da pochi giorni e già fan sfegatato di Torre Orsina. Quando è nato pesava 3Kg ed era lungo 50 cm.<br />
<br />
<br />
<a href="http://goo.gl/photos/6BaD" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://lh4.ggpht.com/_o9JxVfHWVPw/TGjoDvohnII/AAAAAAAAASI/XjaUm-8M7go/s512/CIMG0860.JPG" /></a>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-25723093530545920692010-08-15T10:15:00.000+02:002010-08-15T10:15:53.371+02:00Oracle - Analizzare un processo PID Unix Oracle che genera carico sulla macchina.Con il comando <b>top</b> o con il comando <b>ps</b> individuiamo il processo che carica maggiormente la macchina in termini di CPU utilizzata.<br />
<br />
Se il PID del processo Oracle incriminato sul sistema operativo UNIX è ad esempio <b>27335</b>:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">select USERNAME, PID, SPID, ADDR from v$process where spid='<b>27335</b>';</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">USERNAME</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> PID SPID </span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">ADDR</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">--------------- ---------- ------------ --------</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">oracle</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 210 27335</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><b>7D4E1E1C</b></span></span><br />
<br />
individuiamo ADDR che ci permette di risalire alla sessione:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">column MACHINE format a20</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">SELECT s.sid, s.command, s.serial#, s.username, s.osuser, s.machine, s.program FROM v$session s where s.paddr ='<b>7D4E1E1C</b>';</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> SID SERIAL# USERNAME</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> OSUSER</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> MACHINE</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> PROGRAM</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">---------- ---------- ------------------------------ ------------------------------ ---------------------------------------------------------------- -----------------------</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> <b>2217</b></span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">43510 SCHEDULER </span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> root</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> Blade01-Encl1-6</span></span><span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> java@Blade01-Encl1-6 (TNS V1-V3)</span></span><br />
<br />
individuiamo il SID che ci permette di capire quale Query sta impegnado il processo Oracle:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">column SQL_TEXT format a60</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">select s.sid,sq.sql_text from v$session s, v$sqlarea sq where s.SQL_ADDRESS = sq.ADDRESS and s.sql_hash_value=sq.hash_value and s.sid=<b>2217</b>;</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> SID SQL_TEXT</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">---------- ------------------------------------------------------------</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> 2217 SELECT thes_code, categories_id, thes_id from when_where_has</span></span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> _thesaurus_del WHERE thes_code >= :1 AND thes_code < :2 AND</span></span><br />
<span class="Apple-tab-span" style="white-space: pre;"><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"> pico_id = :3 ORDER BY (thes_code) ASC</span></span><br />
<div><br />
</div>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-31379218687497333282010-08-15T10:06:00.006+02:002010-08-15T10:09:11.943+02:00Oracle - Query più pesanti in termini di lettura su disco<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">column SQL_TEXT format a20</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span> </span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">select sql_text, disk_reads, loads, optimizer_cost, parsing_user_id, serializable_aborts, au.username from gv$sql, all_users au where disk_reads > 10000 and parsing_user_id = au.user_id order by disk_reads desc;</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-74038872098548409392010-07-26T11:37:00.000+02:002010-07-26T11:37:28.960+02:00Linux - Filesystem superiori a 2 TeraByteRed Hat Enterprise Linux 5.1 e successive supportano singoli filesystem fino a 16 Terabyte.<br />
<br />
Per creare un filesystem EXT3 superiore a 2 Terabyte bisogna utilizzare il normale LVM e il comando mkfs.ext3 per la formattazione come di seguito spiegato:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">pvcreate /dev/sdc</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">vgcreate VG_Grande /dev/sdc</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">lvcreate -L 8000G -n LV_Grande VG_Grande</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">mkfs.ext3 /dev/VG_Grande/LV_Grande</span></span><br />
<br />
Questo esempio crea un filesystem da 8 Terabyte EXT3 sul device /dev/sdc. ATTENZIONE occorre usare l'intero device, poichè i sistemi di partizionamento come ad esempio fdisk NON supportano partizioni superiori a 2.1 Terabyte.<br />
<br />
Per creare un filesystem da 16 Terabyte o comunque superiore a 8 Terabyte occorre utilizzare un blocksize da 4k. Questa è la procedura:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">pvcreate /dev/sdc</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">vgcreate VG_Grande /dev/sdc</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">lvcreate -L 16000G -n LV_Grande VG_Grande</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">mkfs.ext3 -F -b 4096 /dev/VG_Grande/LV_Grande</span></span>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-85620092444554855602010-05-20T17:33:00.001+02:002010-05-28T09:58:55.878+02:00Linux - Lustre - Clustering e FailoverNel precendete articolo abbiamo implementato una soluzione con un singolo server Lustre, chiaramente questa è una soluzione puramente didattica, poiche' nella realtà dobbiamo prevedere un alta affidabilità del sistema in modo tale da garantire ai Client la continua accessibilità.<br />
<br />
Lustre non ha alcun sistema di alta affidabilità, ma si affida a software di clusterware per implementarla, come ad esempio Heartbeat o meglio PaceMaker. Molti clienti però adottando il sistema operativo Red Hat preferiscono utilizzare Red Hat Cluster Suite per l'alta affidabilità, quindi adotteremo quest'ultimo come infrastruttura di clusterware.<br />
<br />
Dobbiamo dividere l'implementazione in due parti, la prima riguarda la configurazione da fare al cluster Lustre per dichiarare dei volumi in Failover, la seconda riguarda la configurazione di RHCS.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwtzbA2vF_mSsKf8CeiCs_3HMbFP_zyQZOrtx2ebDkJuJBu3ApBUTfLCObkcBV449QELBBWkBP8UGVr9w4GtvhpbF1kjw9pIF2QPQGCH2F4OXKgdxBMlC5ytY-JKEheAf9YAGuTA/s1600/lustre-schema-cluster.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwtzbA2vF_mSsKf8CeiCs_3HMbFP_zyQZOrtx2ebDkJuJBu3ApBUTfLCObkcBV449QELBBWkBP8UGVr9w4GtvhpbF1kjw9pIF2QPQGCH2F4OXKgdxBMlC5ytY-JKEheAf9YAGuTA/s320/lustre-schema-cluster.png" /></a></div><br />
<br />
Dallo schema in figura possiamo desumere che la configurazione sarà effettuata fra due server (192.168.2.20 e 192.168.2.22) sui cui avremo installato preventivamente i pacchetti lustre lato server. La configurazione finale sarà attiva/attiva cioè sul primo nodo denominato cln01 saranno presenti i servizi MGS, MDS e OST0, mentre nel secondo nodo deominato cln02 sarà presente l'OST1. Questo permetterà al client non solo di accedere al filesystem "prova" da due canali iSCSI paralleli, ma anche da due server paralleli aumentando ancora di più il trhoughput.<br />
<br />
Configuriamo il nostro filesystem con i seguenti comandi, l'opzione reformat permette di sovrascrivere eventuali precedenti configurazioni:<br />
<br />
<br />
<ul><li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo1: mkfs.lustre --mgs --failnode=192.168.2.22 --reformat /dev/sdb1</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo1: mkfs.lustre --reformat --mdt --mgsnode=192.168.2.20 --fsname=prova --failover=192.168.2.22 /dev/sdb4</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo1: mkfs.lustre --reformat --ost --mgsnode=192.168.2.20 --failover=192.168.2.22 --fsname=prova /dev/sdb2</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo2: mkfs.lustre --reformat --ost --mgsnode=192.168.2.20 --failover=192.168.2.20 --fsname=prova /dev/sdb3</span></li>
</ul><br />
<br />
Per avviare i servizi di lustre sarà sufficiente montare i relativi filesystem, prima ci creiamo l'alberatura di mount su entrambi i nodi:<br />
<br />
<ul><li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">mkdir -p /lustre/mgs_prova</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">mkdir -p /lustre/mdt_prova</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">mkdir -p /lustre/ost0_prova</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">mkdir -p /lustre/ost1_prova</span></li>
</ul><br />
e quindi montiamo:<br />
<br />
<ul><li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo1: mount -t lustre /dev/sdb1 /lustre/mgs_prova</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo1: mount -t lustre /dev/sdb4 /lustre/mdt_prova</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo1: mount -t lustre /dev/sdb2 /lustre/ost0_prova</span></li>
<li><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: small;">dal nodo2: mount -t lustre /dev/sdb3 /lustre/ost1_prova</span></li>
</ul><br />
<br />
dal client la nuova stringa di connessione sarà:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">modprobe lustre</span></span><br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">mount -t lustre 192.168.2.20@tcp:192.168.2.22@tcp:/prova /prova</span></span><br />
<br />
Facciamo una prova di switch ad esempio del'ost0 dal nodo1 al nodo2, tenendo sempre il client montato:<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">dal nodo1: umount -fl /lustre/ost0_prova</span></span><br />
<br />
attendiamo qualche secondo<br />
<br />
<span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"><span class="Apple-style-span" style="font-size: small;">dal nodo2: mount -t lustre /dev/sdb2 /lustre/ost0_prova</span></span><br />
<br />
attendiamo qualche secondo e dal client potremo continuare tranquillamente ad accedere ai nostri file. Nella prossima parte potremo automattizare il processo di failover utilizzando RHCS.<br />
<br />
<br />
<b>Devo ringraziare per la collaborazione Roberto.</b><br />
<div><br />
</div>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-84887754241383092442010-05-13T17:49:00.002+02:002010-05-13T18:14:49.318+02:00Linux - Lustre - Installazione del Filesystem LustreLustre è un filesystem parallelo distribuito, è in grado di gestire filesystem fino a 10PByte con un thrghtoup aggregato di 100 Gbyte/sec. Supporta nativamente reti Ethernet, 10 GbE, Infiniband, Elan, Myrinet. E' il filesystem più utilizzato fra i Top500 cluster più potenti al mondo. Lustre è un progetto Open Source basato su licenza GPL che gira su sistema operativo Linux.<br />
<br />
Le componenti principali di una soluzione Lustre sono:<br />
<ul><li>MGS - E' il servizio che tiene conto di tutte le configurazioni di un cluster Lustre </li>
<li>MDS - E' il servizio che gestisce i metadati di un singolo filesystem distribuito</li>
<li>OSS - E' il servizio che gestisce gli storage server dove vengono salvati i dati</li>
<li>Client - E' la componente che permette l'accesso al cluster</li>
<li>LNET - E' il sottosistema di rete nativo di Lustre</li>
</ul><br />
Tutte le componenti sono state sviluppate come moduli del kernel, le configurazioni vengono scritte durante la fase di formattazione del filesystem e passate al MGS, non esistono a livello del filesystem alcun file da configurare o configurazione da gestire.<br />
<br />
Lustre necessita per le componenti MGS, MDS e OSS il patching del kernel partendo dai sorgenti, per il client è possibile scegliere tra un client patched o patchless, la differenza è in qualche punto percentuale di degrado delle performance. Se non si desidera ricompilare il kernel, vengono resi disponibili gli RPM pre-compilati e già pronti per le distribuzioni Oracle Linux, Red Hat Enterprise Linux e Suse Linux.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDqBV0x3kpLs7M2p6mgIozsd6Yt8GuCwez6pVpxI815b36FLj_SwxGXg1nCS7Ur1X-UZFHOaI3bFk8NUGtQoEEL0HJ4E3BX9WMoEZFbgIYQ1SyjKbFnbw0op-0dBO26qvbE2dVbA/s1600/lustre-schema-singolo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDqBV0x3kpLs7M2p6mgIozsd6Yt8GuCwez6pVpxI815b36FLj_SwxGXg1nCS7Ur1X-UZFHOaI3bFk8NUGtQoEEL0HJ4E3BX9WMoEZFbgIYQ1SyjKbFnbw0op-0dBO26qvbE2dVbA/s320/lustre-schema-singolo.png" /></a></div><br />
A titolo didattico partiamo con una soluzione, rappresentata in figura, con un unico server Lustre contenente le componenti MGS, MDS e OSS. Tale server dotato di una distribuzione Red Hat Enterprise Linux con kernel 2.6.18-164.11.1.el5 è agganciata a uno storage esterno iSCSI dove verranno ricavate 4 partizioni secondo il seguente schema:<br />
<ul><li>Target del MGS: partizione /dev/sdb1 da 1 GB</li>
<li>Target del MDS: partizione /dev/sdb4 da 1 GB</li>
<li>Due target per la componente di Storage: OST0 /dev/sdb2 da 10GB e OST1 /dev/sdb3 da 10GB</li>
</ul>La configurazione appena proposta permetterà al client di accedere ad un unico filesystem di 20GB composto da due Storage Target in Striping che quindi aggregheranno la banda dei due canali iSCSI e permetteranno migliori performance al client.<br />
<br />
La versione di Lustre utilizzata è la 1.8.3, sul client utilizzeremo la configurazione patchless.<br />
<br />
Lato server installeremo i seguenti pacchetti con il comando:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">rpm -ivh e2fsprogs-1.41.10.sun2-0redhat.rhel5.i386.rpm </span></span><br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">kernel-2.6.18-164.11.1.el5_lustre.1.8.3.i686.rpm </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">lustre-1.8.3-2.6.18_164.11.1.el5_lustre.1.8.3.i686.rpm </span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">lustre-ldiskfs 3.0.9-2.6.18_164.11.1.el5_lustre.1.8.3.i686.rpm </span></div><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">lustre-modules-1.8.3-2.6.18_164.11.1.el5_lustre.1.8.3.i686.rpm --force</span></span><br />
<br />
e aggiungeremo al file /etc/modprobe.conf la seguente riga per abilitare il sistema LNET su ethernet:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">options lnet networks=tcp</span></span><br />
<br />
riavviamo il server con il kernel appena installato e iniziamo a formattare / configurare Lustre con i seguenti comandi:<br />
<ul><li>MGS: mkfs.lustre --mgs /dev/sdb1 </li>
<li>MDS: mkfs.lustre --mdt --mgsnode=192.168.2.20 --fsname=prova /dev/sdb4</li>
<li>OSS0: mkfs.lustre --ost --mgsnode=192.168.2.20 --fsname=prova /dev/sdb2</li>
<li>OSS1: mkfs.lustre --ost --mgsnode=192.168.2.20 --fsname=prova /dev/sdb3</li>
</ul>Per avviare i servizi di lustre sarà sufficiente montare i relativi filesystem, prima ci creiamo l'alberatura di mount:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">mkdir -p /lustre/mgs_prova</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">mkdir -p /lustre/mdt_prova</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">mkdir -p /lustre/ost0_prova</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">mkdir -p /lustre/ost1_prova</span></span><br />
<br />
e quindi montiamo:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">mount -t lustre /dev/sdb1 /lustre/mgs_prova<br />
mount -t lustre /dev/sdb4 /lustre/mdt_prova<br />
mount -t lustre /dev/sdb2 /lustre/ost0_prova<br />
mount -t lustre /dev/sdb3 /lustre/ost1_prova</span><br />
<br />
<b>ATTENZIONE</b>: I filesystem appena montati NON devono essere acceduti, questa operazione serve solamente per avviare i moduli dei servizi server di Lustre.<br />
<br />
Lato client installeremo i seguenti pacchetti:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">rpm -ivh lustre-client-1.8.3-2.6.18_164.11.1.el5_lustre.1.8.3.i686.rpm lustre-client-modules-1.8.3-2.6.18_164.11.1.el5_lustre.1.8.3.i686.rpm</span></span><br />
<br />
e aggiungeremo al file /etc/modprobe.conf la seguente riga per abilitare il sistema LNET su ethernet:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">options lnet networks=tcp</span></span><br />
<br />
per maggiore sicurezza facciamo un bel reboot del client e proviamo ad accedere al nostro filesystem "prova":<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">mkdir /prova</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">modprobe lustre</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">mount -t lustre 192.168.2.20@tcp:/prova /prova</span></span><br />
<br />
dovreste vedere il vostro filesystem /prova montato e delle dimensioni di 20GB.<br />
<br />
La procedure corretta di stop del cluster Lustre sarà :<br />
<ol><li>dal client: umount /prova</li>
<li>dal server: umount /lustre/ost1_prova</li>
<li>dal server: umount /lustre/ost0_prova</li>
<li>dal server: umount /lustre/mdt_prova</li>
<li>dal server: umount /lustre/mgs_prova</li>
</ol><b><br />
</b><br />
<b>Devo ringraziare per la collaborazione Roberto.</b>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-11121477027468680272010-04-03T11:13:00.001+02:002010-04-03T11:14:21.256+02:00Cucina - Pesto alla trapaneseGrazie alla mia amica Caterina e soprattutto a suo padre, dopo una serie di tentativi ecco finalmente la ricetta del pesto alla trapanese.<br />
<br />
Per 4 persone:<br />
- 100 gr di mandorle<br />
- 3 spicchi di aglio (meglio se aglio rosso IGP di Trapani)<br />
- 150 gr basilico fresco<br />
- pecorino o (se non volete proprio morire) parmigiano<br />
- pomodori pachino<br />
- capperi (meglio se di pantelleria)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.sanvitolocapoville.it/immaginisanvito/SalineTrapani.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="215" src="http://www.sanvitolocapoville.it/immaginisanvito/SalineTrapani.jpg" width="320" /></a></div><br />
<br />
Il pesto dovrebbe essere fatto sul mortaio, ma se usate un frullatore viene bene ugualmente e la cosa è più pratica!!! Scottate su un tegamino le mandorle e frullatele. Frullate separatamente anche l'aglio e il basilico. Mettete tutto in una terrina dove insieme con pepe, sale (meglio se proveniente dalle saline di Trapani!!!), il pecorino, abbondante olio e i capperi, mescolerete. Lasciate riposare per un oretta e poi aggiungente i pomodori pachino tagliuzzati, mentre in acqua abbondante fate cuocere la pasta.<br />
Alla fine con un po' di acqua di cottura mantecate il tutto... naturalmente ricetta per ALITI FORTI!!!!<br />
<br />
P.S: La foto è stata presa dal sito http://www.sanvitolocapoville.itGabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com1tag:blogger.com,1999:blog-15780243.post-74089986142947493562010-03-09T10:25:00.003+01:002010-05-17T15:51:15.508+02:00Linux - Apache - Ottimizzazioni modulo mod_jkAl fine di rendere più reattivo un server <b>Apache</b> au Linux a 32 bit, utilizzato come <b>Load Balancer</b> per una infrastruttura di <b>Application Server</b> come ad esempio <b>Tomcat</b> o <b>JBoss</b> possiamo effettuare le operazioni di ottimizzazione sotto descritte.<br />
<br />
Occorre innanzitutto determinare la modalità di esecuzione di Apache, in questo caso con il comando <i><b>apachectl -l</b></i> determiniamo quali moduli sono caricati, nel nostro caso:<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">Compiled in modules:</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> core.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_authn_file.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_authn_default.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_authz_host.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_authz_groupfile.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_authz_user.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_authz_default.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_auth_basic.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_include.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_filter.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_log_config.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_env.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_setenvif.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_proxy.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_proxy_connect.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_proxy_ftp.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_proxy_http.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_proxy_ajp.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_proxy_balancer.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <b>prefork.c</b></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> http_core.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_mime.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_status.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_autoindex.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_asis.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_cgi.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_negotiation.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_dir.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_actions.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_userdir.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_alias.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_rewrite.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> mod_so.c</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><br />
Quindi notiamo che la modalità di esecuzione è "<i>prefork</i>", andiamo quindi a ottimizzare l'apposito file di configurazione: <b>httpd-mpm.conf</b><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><IfModule mpm_prefork_module></span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> StartServers 50</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> MinSpareServers 10</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> MaxSpareServers 50</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> MaxClients 500</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> MaxRequestsPerChild 250</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"></IfModule></span></span><br />
Per quanto concerne il modulo <b>mod_jk</b> effettuiamo le seguenti ottimizzazioni nel file <b>workers.proprieties</b>:<span style="font-size: x-small;"><br />
</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">worker.node1.ping_mode=A</span><span style="font-size: x-small;"></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">worker.node1.ping_timeout=20000</span><span style="font-size: x-small;"></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">worker.node1.connection_pool_timeout=600</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"> </span><br />
per tutti i nodi gestiti dal Load Balancer.<br />
<br />
Naturalmente questo tuning lato Apache dovrà essere accompagnato dal tuning sul sistema operativo, quindi nel file <b>/etc/sysctl.conf</b> inseriamo i parametri di ottimizzazione del kernel<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.tcp_keepalive_time = 300</span><span style="font-size: x-small;"></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.tcp_keepalive_intvl = 60</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.tcp_keepalive_probes = 20</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">kernel.shmmax=2147483648</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">kernel.sem=250 32000 100 128</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">fs.file-max=794598</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.ip_local_port_range=1024 65000</span><span style="font-size: x-small;"></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.rmem_default=262144</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.wmem_default=262144</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.rmem_max=262144</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.wmem_max=262144</span><br />
<br style="font-family: "Courier New",Courier,monospace;" />Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-65388265330768096442010-03-09T10:08:00.002+01:002010-05-17T15:57:26.675+02:00Linux - JBoss - Ottimizzazioni, perfomance e tuningConsiderando una installazione di JBoss in ambiente Linux a 32 bit. L'utente che esegue JBoss è "<b><i>root</i></b>", l'installazione è in <b>/usr/local/jboss-4.0.4.GA</b><br />
<br />
<br />
Questo è il file contenente i parametri di ottimizzazione di JBoss: <b>/usr/local/jboss-4.0.4.GA/bin/run.conf</b> in cui sostituiremo la seguente stringa:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">JAVA_OPTS="-server -Xms1048m -Xmx1048m -XX:ThreadStackSize=128 -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dfile.encoding=ISO-8859-1 -Duser.timezone=Europe/Rome"</span><br />
<br />
Le opzioni selezionate servono a bilanciare la quantità di Heap Size e il numero di Threads Disponibili, infatti in un ambiente a 32 bit la quantità totale disponibile di memoria per singolo processo è di circa 1.5Mbyte, se l'Heap Size (Xms e Xmx) è troppo alta, la memoria disponibile per i Thread (ThreadStackSize) limita il numero di Thread disponibili. <br />
<br />
<br />
Nel file <b>/etc/sysctl.conf</b> inseriamo i parametri di ottimizzazione del kernel<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.tcp_keepalive_time = 300</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.tcp_keepalive_intvl = 60</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.tcp_keepalive_probes = 20</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">kernel.shmmax=2147483648</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">kernel.sem=250 32000 100 128</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">fs.file-max=794598</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.ipv4.ip_local_port_range=1024 65000</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.rmem_default=262144</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.wmem_default=262144</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.rmem_max=262144</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">net.core.wmem_max=262144</span><br />
<span style="font-size: x-small;"><br />
</span><br />
<br />
Nel file <b>/etc/security/limits.conf </b>aumentiamo il numero di file che possono essere aperti, naturalmente se l'utente con cui viene fatto girare JBoss è diverso dovrà essere modificato di conseguenza:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">root soft nofile 790598</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">root hard nofile 790598</span><br />
<br />
<br />
<br />
Nel caso di connessioni verso un database Oracle occorre modificare e ottimizzare il seguente file <b>/usr/local/jboss-4.0.4.GA/server/all/deploy/oracle-ds.xml</b> per aumentare il numero di pool di connessioni.<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><min-pool-size>100</min-pool-size></span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><max-pool-size>100</max-pool-size></span><br />
<br />
Se JBoss viene indirizzato da un Load Balancer che verifica la disponibilità del servizio attraverso il protocollo AJP è necessario aumentare il tempo di timeout nel file <b>server.xml</b> del Tomcat embedded in JBoss:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> <!-- A AJP 1.3 Connector on port 8009 --></span><br />
<span style="font-size: x-small;"> <Connector port="8009" address="${jboss.bind.address}"</span><br />
<span style="font-size: x-small;"> emptySessionPath="true" enableLookups="false" redirectPort="8443" </span><br />
<span style="font-size: x-small;"> connectionTimeout="600000" maxThreads="200" keepAliveTimeout="600000"</span><br />
<span style="font-size: x-small;"> protocol="AJP/1.3"/></span></div><br />
Script di start, stop e restart di JBoss da inserire in <b>/etc/init.d/jboss</b><br />
<span style="font-size: x-small;"><br />
</span><br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">#!/bin/sh<br />
#<br />
# JBoss Control Script<br />
#<br />
# chkconfig: 3 80 20<br />
# description: JBoss EJB Container<br />
#<br />
# To use this script<br />
# run it as root - it will switch to the specified user<br />
# It loses all console output - use the log.<br />
#<br />
# Here is a little (and extremely primitive)<br />
# startup/shutdown script for RedHat systems. It assumes<br />
# that JBoss lives in /usr/local/jboss, it's run by user<br />
# 'jboss' and JDK binaries are in /usr/local/jdk/bin. All<br />
# this can be changed in the script itself.<br />
# Bojan<br />
<br />
# [ #420297 ] JBoss startup/shutdown for RedHat<br />
<br />
export JAVA_HOME="/usr/java/jdk1.5.0_10"<br />
export LD_LIBRARY_PATH="/home/oracle/instantclient/lib"<br />
export ORACLE_HOME="/home/oracle/instantclient"<br />
export PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/java/jdk1.5.0_10/bin:/root/bin"<br />
export TNS_ADMIN="/home/oracle/instantclient"<br />
<br />
#define where jboss is<br />
JBOSS_HOME=${JBOSS_HOME:-"/usr/local/jboss-4.0.4.GA"}<br />
<br />
#make java is on your path<br />
JAVAPTH=${JAVAPTH:-"/usr/java/jdk1.5.0_10/bin"}<br />
<br />
#define the classpath for the shutdown class<br />
JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jbossall-client.jar"}<br />
<br />
#define the script to use to start jboss<br />
JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c all"}<br />
if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then<br />
# ensure the file exists<br />
touch $JBOSS_CONSOLE<br />
fi<br />
<br />
if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then<br />
echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"<br />
echo "WARNING: ignoring it and using /dev/null"<br />
JBOSS_CONSOLE="/dev/null"<br />
fi<br />
<br />
<br />
#define what will be done with the console log<br />
JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}<br />
CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"<br />
<br />
# inserire la password per lo shutdown<br />
CMD_STOP="$JBOSS_HOME/bin/shutdown.sh -S -u admin -p admin"<br />
<br />
# se l'utente è diverso da root inserire il comando su -<br />
SUBIT=""<br />
if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then<br />
export PATH=$PATH:$JAVAPTH<br />
fi<br />
if [ ! -d "$JBOSS_HOME" ]; then<br />
echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME<br />
exit 1<br />
fi<br />
echo CMD_START = $CMD_START<br />
<br />
case "$1" in<br />
start)<br />
cd $JBOSS_HOME/bin<br />
if [ -z "$SUBIT" ]; then<br />
eval $CMD_START >${JBOSS_CONSOLE} 2>&1 &<br />
else<br />
$SUBIT "$CMD_START >${JBOSS_CONSOLE} 2>&1 &"<br />
fi<br />
logger "Jboss Started"<br />
;;<br />
<br />
stop)<br />
if [ -z "$SUBIT" ]; then<br />
$CMD_STOP<br />
else<br />
$SUBIT "$CMD_STOP"<br />
fi<br />
logger "Jboss Stopped"<br />
;;<br />
<br />
restart)<br />
$0 stop<br />
sleep 10<br />
$0 start<br />
;;<br />
<br />
*)<br />
echo "usage: $0 (start|stop|restart|help)"<br />
<br />
esac</span>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-30729701104003531462010-01-27T16:39:00.002+01:002010-03-09T10:09:17.393+01:00Linux - Lustre - Gestire una corruzione del filesystem LustreConsiderando il filesystem lustre montato su <b>/lustrefs</b> e che i server sono così organizzati:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">MGS -> /dev/sdb1 -> /lustre/mgs</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">MDT -> /dev/sdc1 -> /lustre/mdt</span></div><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">OST -> /dev/sdd1 -> /lustre/ost</span><br />
</span><br />
<br />
Smontare lustre da tutti i client con il comando:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#umount /lustrefs</span></div><br />
se il filesystem risulta <i>busy</i> lanciare il comando:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#umount -fl /lustre</span></div><br />
Smontare dai server tutte le componenti <i>OST</i>, <i>MDT</i>, <i>MGS</i>:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#umount /lustre/ost</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#umount /lustre/mdt</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#umount /lustre/mgs</span></div><br />
eseguire il comando <i>e2fsck -f</i> sui relativi device:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#e2fsck -f /dev/sdb1</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#e2fsck -f /dev/sdc1</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#e2fsck -f /dev/sdd1</span></div><br />
<br />
rimontare le componenti di lustre:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#mount -t lustre /dev/sdb1 /lustre/mgs</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#mount -t lustre /dev/sdc1 /lustre/mdt</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">#mount -t lustre /dev/sdd1 /lustre/ost </span></div><br />
effettuare l'<i>abort recovery</i> sugli <i>ost</i>.<br />
<br />
con il comando <span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">lctl dl | grep obdfilter</span></span> si verifica il numero della device (è la prima colonna), con il seguente comando si effetta l'abort:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">lctl --device >n device< abort_device</span></span><br />
<br />
occorre a questo punto far collegare un client che forzerà il recovery del client stesso, processo che necessita almeno di 300 secondi. Il count down lo troviamo nel /var/log/messages.<br />
<br />
Più informazioni si possono trovare <a href="http://wiki.lustre.org/index.php/Fsck_Support">Fsck_Support</a>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-81434622405066410682010-01-26T17:44:00.000+01:002010-01-26T17:44:54.142+01:00Linux - iSCSI - Esportare un device iSCSI con Red HatVediamo come esportare un device iSCSI con Red Hat Enterprise Linux. Occorre innanzitutto procurarsi una Red Hat Enterprise Linux 5.3 o superiore, poichè solamente da questa versione è stato implementato in maniera stabile il sottosistema iSCSI.<br />
<br />
Consideriamo di voler esportare il device /dev/hdb da un macchina RHEL 5.3 denominata "nas".<br />
<br />
<b>Configurazione server iSCSI</b><br />
<br />
Installare i pacchetti <b><i>scsi-target-utils</i></b> e <i><b>perl-Config</b></i> che si trovano sotto la directory ClusterStorage del DVD della RHEL 5.3.<br />
<br />
Lanciare il demone <i><b>tgt</b></i>:<br />
<br />
<code class="jive-code"># service tgtd start</code><br />
<br />
Creare un nuovo target denominato <i><b>nas:storage.disk1</b></i>:<br />
<br />
<pre class="jive-pre"><code class="jive-code"># tgtadm --lld iscsi --op new --mode target --tid=1 --targetname nas:storage.disk1</code></pre><br />
Verificare la creazione del nuovo target:<br />
<br />
<pre class="jive-pre"><code class="jive-code"># tgtadm --lld iscsi --op show --mode target</code></pre><br />
Associare il device /dev/hdb al target denominato <i><b>nas:storage.disk1</b></i> con LUN 1, la LUN 0 è del controller iSCSI:<br />
<br />
<pre class="jive-pre"><code class="jive-code"># tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/hdb</code></pre><br />
Permettere a chiunque (ALL) di connettersi al target:<br />
<br />
<pre class="jive-pre"><code class="jive-code"># tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL</code></pre><br />
Verificare che la porta 3260 sia accessibile da host remoti.<br />
<br />
Per rendere persistente ai reboot la configurazione:<br />
<br />
<code class="jive-code"># tgt-admin --dump > /etc/tgt/targets.conf </code><br />
<code class="jive-code"># chkconfig tgtd on </code><br />
<br />
<b>Configurazione target iSCSI</b><br />
<br />
Consideriamo di voler importare il device /dev/hdb da un macchina RHEL 5.3 denominata "oracle1".<br />
<br />
Installare il pacchetto <i><b>iscsi-initiator-utils</b></i> che si trova sotto la directory Server del DVD della RHEL 5.3.<br />
Avviamo il demone <i>iscsid</i> e attiviamo al boot: <br />
<br />
<pre class="jive-pre"><code class="jive-code">#service iscsid start
#chkconfig iscsid on
</code></pre><br />
Verifichiamo quali target vengono esportati dalla nostro server "nas" (occorre sostituire >ip server< con l'ip della macchina "nas"):<br />
<br />
<code class="jive-code">#iscsiadm -m discovery -t sendtargets -p >ip server< </code><br />
<pre class="jive-pre"><code class="jive-code">
</code></pre>Importiamo il target che desideriamo con il seguente comando (occorre sostituire >ip server< con l'ip della macchina "nas" e >target name< con il nome del target che desideriamo importare):<br />
<br />
<br />
<pre class="jive-pre"><code class="jive-code">#iscsiadm -m node -T >target name< -p >ip server< -l</code></pre><br />
La configurazione viene automaticamente salvata e ad ogni riavvio viene importato il target.Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-65169959982875169442010-01-24T10:43:00.001+01:002010-01-24T10:43:33.065+01:00Ristoranti - Italia - Dove vale la pena cenare !!!Ecco alcuni ristoranti dove vale proprio la pena di cenare:<br />
<br />
<b>Ristorante Mediterraneo - Lungomare di Acciaroli - Salerno Tel. 0974904747</b><br />
Cucina ottima di pesce tradizionale. Il posto è molto bello soprattutto se si cena all'ultimo piano con vista sul golfo, anche se il palazzo stesso è un pò un eco-mostro nel contesto del paesetto di Acciaroli. Lista dei vini limitata 35 EURI.<br />
<br />
<b>Restorant Alpenrose - Sils-Maria St. Moritz - Svizzera Tel.081 8338008<br />
</b><br />
Cucina di carne rivista in chiave moderna, spettacolare la renna e l'agnello. Lista di vini limitata al locale, ma ottimi. Costo molto elevato!Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-92008192411929689912010-01-17T16:54:00.005+01:002010-05-17T16:05:04.436+02:00Ristoranti - Autostrada - Dove mangiare quando si è in viaggioQuando si viaggia, l'Autogrill è la sosta obbligata... ma è proprio così? Esistono dei ristoranti nelle vicinanze delle Autostrade che possono accoglierci per un buon pasto? Ecco alcuni consigli:<br />
<br />
<b>Ristorante Opera Ghiotta - Via bachelet 12 - San Giorgio di Mantova - Tel. 0376<b>374248</b></b><br />
<b><b>Uscita Mantova Nord A22</b></b><br />
E' un presidio SlowFood, ottima la cucina, ottima la carta dei vini, buono il prezzo ed è proprio sull'uscita dell'Autostrada. 30 EURI.<br />
<br />
<b>Ristorante Genovese - Corso Roma 19 - Rapallo - Tel. <span dir="ltr">018561111</span></b><br />
<b><span dir="ltr">Uscita Rapallo A12 </span></b><br />
La cucina della signora è ottima. Si consigliano i primi, dato che la pasta la producono direttamente loro e freshissimo il pesce. 35 EURI.<br />
<br />
<b>Ristorante I Casolari - Via di Persignano - Terranuova Bracciolini - Tel. <span dir="ltr">055969390</span></b><br />
<b><span dir="ltr">Uscita Valdarno A1</span></b><br />
Per provare la vera fiorentina... ma attenzione a non bere troppo Chianti... poi occorre guidare!!! 40 EURI.<br />
<br />
<b>Ristorante Il Boccone del Prete - Via E.Bellini, 12/14 - Porano - Tel. <span dir="ltr">0763374772</span></b><br />
<b><span dir="ltr">Uscita Orvieto A1</span></b><br />
Ottimo locale con vista sulla cattedrale di Orvieto. Inserito in grotta, offre piatti della tradizione Ternana. 30 EURI.Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-90161794390463838072009-12-21T14:33:00.005+01:002009-12-24T12:52:52.110+01:00Cucina - Salmi di cinghialePer 4 persone:<br />
- 1 kg di cinghiale tagliato a pezzi medio-grandi<br />
- 1 litro di vino rosso meglio se Barbera<br />
- 1 cipolla, 1/2 aglio, alloro, chiodi di garofano (pochi), 1 ramo di rosmarino, 1 costa di sedano, 2 carote, timo, salvia<br />
- burro<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigR1dfsV-XGFuoQZrHK_OIK-BbszcrirKPFBTxgt2Av6mwgukK5fhAkuMjf2bO_n8uG8GdvKSh1kqofZ54GrZm6DAY9eGFcgREO_cOcyknWHOPbiFGvCJyawylgGwZHsc4i_tHWw/s1600-h/cinghiale.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigR1dfsV-XGFuoQZrHK_OIK-BbszcrirKPFBTxgt2Av6mwgukK5fhAkuMjf2bO_n8uG8GdvKSh1kqofZ54GrZm6DAY9eGFcgREO_cOcyknWHOPbiFGvCJyawylgGwZHsc4i_tHWw/s320/cinghiale.jpg" /></a><br />
</div><br />
<br />
Far frollare per almeno 12 ore il cinghiale con cipolla, aglio, alloro, chiodi di garofano, rosmarino, sedano, carote, timo, salvia e coprite il tutto con il vino. Dopo la frollatura estrarre i pezzi di cinghiale, asciugarli e rosolarli con burro per qualche minuto.<br />
Rimettere il cinghiale nella pentola e far andare per almeno 2 ore a fuoco lento.<br />
Finita la cottura è possibile prendere tutto il sugo e frullarlo per far diventare una salsa fluida, oppure lasciare così com'è il sugo e servire con lenticchie o polenta.<br />
<br />
Buon appetito!!!Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-546233982356474022009-11-22T17:03:00.000+01:002009-11-22T17:03:08.745+01:00Cucina - Linguine al tartufo - Autunno umbro!!!Le linguine al tartufo o gli spaghetti al tartufo sono uno dei quei piatti semplici della mia terra: la <a href="http://www.umbriavalnerina.com/">Valnerina</a>.<br />
In questa ricetta consigliamo il tartufo nero "estivo" detto anche <i>scorzone</i> per due buoni motivi fondamentali: il costo e l'odore. Il tartufo nero "estivo" costa circa un decimo di quello nero "invernale" ed inoltre ha un sapore molto molto forte di quest'ultimo e quindi lo possiamo somministrare a chiunque. Chiaramente l'estimatore di quest'ultimo potrà sempre sostituire il tartufi "estivo" con quello invernale.<br />
<br />
Per 2 persone (con abbondanza) occorrono:<br />
- aglio, meglio se rosso della zona di Trapani<br />
- olio, meglio se Umbro della Valnerina o della zona di Trevi<br />
- prezzemolo fresco<br />
- <a href="http://it.wikipedia.org/wiki/Tuber_aestivum">tartufo "estivo"</a><br />
- 300g di linguine o spaghetti meglio se lavorati al bronzo<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWQ5AHpjsQg7Mr89iKuIattVKHc21e5I9JY6v-KicJI1wmaJDBx_YFdmraCN5Vb_fyhAsMK3rmza3RkGfjt36FpfYoGlF_ypAaAH9EEde_4WUd78vNWIpzWw3ah6ybO-BdHIb0iQ/s1600/22112009345.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWQ5AHpjsQg7Mr89iKuIattVKHc21e5I9JY6v-KicJI1wmaJDBx_YFdmraCN5Vb_fyhAsMK3rmza3RkGfjt36FpfYoGlF_ypAaAH9EEde_4WUd78vNWIpzWw3ah6ybO-BdHIb0iQ/s320/22112009345.jpg" /></a><br />
</div><br />
<br />
Il procedimento viene effettuato tutto esclusivamente a freddo. Occorre grattuggiare finemente il tubero, si taglia a pezzettini l'aglio e il prezzemolo, si fanno insaporire insieme all'olio che deve ricoprire il tutto per almeno 3 ore (meglio se tutto il giorno). Si fanno bollire le linguine in tanta acqua con sale grosso, scolando la pasta si mantiene un po' di acqua di cottura. Si manteca la pasta con il tartufo e l'acqua di cottura a fuoco vivace. Il risultato è notevole.Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-69560023570886786012009-11-14T09:47:00.008+01:002010-03-09T10:10:20.132+01:00Home Theatre - PS3 - Setup Audio e VideoOrmai da qualche anno sono appassionato di sistemi audio e video in alta definizione o utilizzando un termine inglese: Home Theatre. Il mio sistema è composto da un sintoamplificatore <a href="http://www.eu.onkyo.com/indices/A_V_Receiver_5917373.html">Onkyo</a> TR-605E, da casse <a href="http://www.wharfedale.co.uk/">Wharfedale</a> Diamond in configurazione 5.1, da un lettore DVD della <a href="http://www.lge.com/products/main.jhtml">LG</a> e da un televisore LCD <a href="http://www.samsung.com/it/">Samsung</a>. Ultimamente ho acquistato la nuova <a href="http://it.playstation.com/ps3/">Playstation 3</a> slim come stazione multimediale e in particolare per la riproduzione di dischi in formato Blu-Ray.<br />
<br />
Il settaggio del mio sistema è piuttosto semplice:<br />
- il televisore è collegato con il sintoamplificatore attraverso l'uscita HDMI Out di questo<br />
- l'audio del televisore è disabilitato e tramite due jack rca l'uscita audio del televisore è connessa al sintoaplificatore<br />
- il lettore DVD è connesso al sintoamplificatore attraverso un cavo HDMI per la parte video e un cavo coassiale digitale per la parte audio. Questo settaggio è dovuto al fatto che l'uscita HDMI del lettore DVD non supporta traffico BitStream, ma solo PCM, in buona sostanza i segnali DTS e Dolby Sorround non vengono trasferiti.<br />
- la PS3 è collegata con il solo cavo HDMI, dato che questa supporta traffico BitStream su questo canale. E' da notare che la vecchia PS3 supportava solo traffico PCM. In questo caso si possono ascoltare i segnali in formato TrueHD e DTS HD Master Audio.<br />
<ul></ul>Chiaramente, avendo acquistato la PS3 per un uso multimediale, mi sono dotato di apposito telecomando!<br />
<br />
- Settaggio PS3<br />
- Settaggio OnkyoGabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-3271028158326365062009-11-11T14:40:00.005+01:002009-11-14T09:43:06.986+01:00Cucina - Mezze maniche alla Zucca - Una domenica autunnale con amiciIn una domenica autunnale prepariamo delle mezze maniche alla zucca.<br />
<br />
Per 2 persone (con abbondanza) occorrono:<br />
- 1 cipolla, timo<br />
- 250g di zucca gialla<br />
- 100g di pancetta<br />
- 500g di mezze maniche<br />
- provolone piccante <br />
<br />
In un tegame prepariamo il soffritto di cipolla, quando è ben dorato aggiungiamo la zucca tagliata a cubetti piccoli. In un pentolino a parte facciamo un brodo di verdure. Aggiungiamo il brodo di verdure alla zucca man mano che mandiamo avanti la cottura. Saranno necessari 15-20 minuti, a fine cottura aggiungiamo del Marsala per sfumare e del Timo. A questo punto possiamo frullare il tutto fino a produrre un salsa fluida.<br />
In un pentolino colmo di olio cuciamo la pancetta tagliata a bastoncini fino a renderla croccante.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdE420rHV0sViTJZi23gNv2AsEqpy7GSTsB-BvsqxLX4RjYVWgI3FwcC1ZKDGsifPskVOxhyphenhyphenIB7LwIt5Xl2H8e0Z9d8kuRtTROXzndpzaJ71r9mKyymMCH3JY01Mb2kIaTeWeCdA/s1600-h/08112009322.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdE420rHV0sViTJZi23gNv2AsEqpy7GSTsB-BvsqxLX4RjYVWgI3FwcC1ZKDGsifPskVOxhyphenhyphenIB7LwIt5Xl2H8e0Z9d8kuRtTROXzndpzaJ71r9mKyymMCH3JY01Mb2kIaTeWeCdA/s320/08112009322.jpg" /></a><br />
</div><br />
<br />
In acqua abbondante cuciamo le mezze maniche e le scoliamo al dente. Ripassiamo in una bella padella la zucca, le mezze maniche e la pancetta e serviamo con una spruzzata di provolone piccante.<br />
<br />
Buon Appetito!!!Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-8497927609198269692009-11-07T16:09:00.044+01:002010-07-16T16:23:16.441+02:00Ristoranti - Roma - Ricerca del ristorante perfettoSpesso ci vengono a trovare a Roma amici dal nord d'italia, dall'estero, dagli stati uniti. Chiara ed io ci siamo messi alla ricerca del locale perfetto a Roma dove portare amici e parenti.<br />
<br />
<b>Taverna Mithos - Via benedetto varchi, 3 00179 - Tel.06.7840034</b>. Mario è un amico e questo posto è veramente il punto in cui noi amici ci ritroviamo spesso. Il piatto che mi piace di più è la Trippa alla Romana.<br />
Purtroppo i tavoli sono pochi d'estate, pochissimi d'inverno. La carta dei vini inesistente. 25 EURI.<br />
<br />
<b>Torchio Sardo - Via Arrigo Davila, 81/87 - Tel. 06.7857140 Chiuso: Lunedì a pranzo.</b> Ottimo per il pesce... attenzione agli antipasti sono tantissimi, da non perdere i moscardini fritti. Ottimi i tris di primi estremamente abbondanti e ottimi i pesci in crosta di patate. La carta dei vini inesistente. 25 EURI.<br />
<br />
<b>Pugliamonti (ex al 104) - Via Urbana 104 - Tel. 064742772. </b>Ristorante vegetariano pugliese. Divina la burrata. A pranzo 9 EURI, primo + contorno + acqua + macedonia = ottimo. Ultimamente ricercare qualcosa di originale a tutti i costi lo sta facendo diventare troppo ardito... fave secche con cicoria è un accostamento a mio giudizio non corretto, come anche cacio e pepe con la burrata! <br />
<br />
<b>Osteria Priscilla via Appia Antica 68, Roma, </b><b>Tel. 065136379 Chiuso: Domenica. </b>Ristorante tradizionalissimo davanti alla chiesa "Quo Vadis". Cucina romana ottima e prezzo ottimo (sulle 25 EURO), strano per una zona così altamente turistica. Da provare!<br />
<br />
<b>La Buca di Ripetta via di Ripetta, 36 Roma, </b><b>Tel. 063219391 </b>La cucina romana viene rivista da Andrea e dal suo Chef in chiave moderna. Ottimo e centralissimo. La lista di vini non è ampia e non tende all'originalità. Assolutamente da provare 45 EURI.<br />
<br />
<b>Enoteca 313 via Cavour, 313 Roma, </b><b>Tel. 066785496 </b>La cucina è molto limitata seppure originalissima e serve ad accompagnare un ottima degustazione di vini. La lista dei vini è superlativa con la possibilità di degustare anche vini di Marco De Bartoli. Il costo dipende esclusivamente dalla scelta del vino.<br />
<br />
<b>Ristorante Bisteak via di Porta Ardeatina, 114 Roma, </b><b>Tel. 0657288369 </b>Cucina di carne/bisteccheria: carne ottima (non una grandissima scelta), sfizioso il kebab. Il locale è molto affollato e rumoroso. La lista dei vini è limitata. Oltre i 45 EURI.<br />
<br />
<b>Ristorante Scaramouche via Dino Penazzato, 83 Roma, </b><b>Tel. 0621802314 </b>Ottimo ristorante di pesce fuori dal centro. Piatti semplici, gustosi e con un tocco di originalità. Locale particolare, carta dei vini ottima compreso il nostro amato Marco De Bartoli. Assolutamente da provare per il pesce 40 EURI.<br />
<br />
A breve commenteremo i seguenti ristoranti:<br />
- La Matricianella Via del Leone, 4 Roma - Tel. 066832100<br />
- Insomnia - Cucina ciliaca<br />
- Trattoria Monti Via di San Vito, 13, Roma - Tel. 064466573<br />
- Palatium Via Frattina, 94, Roma - Tel. 0669202132<br />
- Primo al Pigneto<br />
- Osteria 'Gusto Piazza Augusto Imperatore, 7 Roma - Tel. 063226273<br />
- La Montecarlo Vicolo Savelli, 13 Roma - Tel. 06 6861877Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-91355508576792992952009-11-07T15:41:00.002+01:002009-11-11T18:29:27.898+01:00Disco - Muccaassassina - I LOVE MUCCAPrima serata al Muccaassassina della nuova stagione 2009/10. Musica bellissima, terzo piano rinnovato e la zona vip rinnovata. Per quanto mi riguarda la serata più bella della capitale.<br />
<br />
P.S: Hanno aumentano il prezzo di entrata, ma ne vale sempre la pena! <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidQmtcRZa37uLU8hf2shBLhQE75CWCAPTffrYgD_fxVXIC6iGKg12ekYElcbpIo88BMQON9I9765c8G7gm1LlSFJfxxyIFjpWyUZtf3LFwGzs0vblkgPt4oOiroTTTG4vCQoFdbg/s1600-h/07112009318.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidQmtcRZa37uLU8hf2shBLhQE75CWCAPTffrYgD_fxVXIC6iGKg12ekYElcbpIo88BMQON9I9765c8G7gm1LlSFJfxxyIFjpWyUZtf3LFwGzs0vblkgPt4oOiroTTTG4vCQoFdbg/s320/07112009318.jpg" /></a><br />
</div>Gabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0tag:blogger.com,1999:blog-15780243.post-26353336897713271452009-10-29T18:05:00.002+01:002010-03-09T10:10:41.643+01:00Linux - PS3 - Conversione filmati compatibili con PS3Carissimi,<br />
dopo una domenica di prove sono riuscito a trovare il formato audio e video testato e funzionante per la mia PS3. Il mio obiettivo era quello di trasformato un filmato in formato avi e similare, in un filmato compatibile e leggibile da una PS3 slim (da poco acquistata).<br />
Il fedele ffmpeg mi è stato di grandissimo aiuto e ha risolto il problema!!!<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">ffmpeg -i filmato.avi -g 300 -bf 2 -vcodec mpeg2video -sameq -acodec ac3 -ac 2 -ab 384000 -f vob -copyts filmato.vob</span></span><br />
<br />
Tanto per commentare le varie opzioni:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">-g 300 -bf 2</span></span> : servono per migliorare la qualità del encoding mpeg<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">-vcodec mpeg2video</span> : è il tipo di encoding video scelto (ho provato xvid e mpeg4 senza successo)<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">-sameq</span> : stessa qualità del video di partenza (il file risultante diventa grande!!!)<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">-acodec ac3 -ac 2</span> : codec audio di tipo ac3 a 2 canali (funziona anche il 5.1 mettondo l'opzione -ac 6)<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">-ab 384000</span></span> : l'audio è a 384kbit/s (ottima qualità)<br />
<br />
Dato che il file di uscita sarà sicuramente grande, vi conviene utilizzare una chiavetta USB per trasferire il file e ricordatevi di trasferirlo sul HD della PS3 prima di riprodurlo.<br />
<br />
SalutiGabriele Paciuccihttp://www.blogger.com/profile/17488781079253469942noreply@blogger.com0