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

<channel>
	<title>Vita di un sys-admin &#187; sysadmin</title>
	<atom:link href="http://blog.angelofailla.com/tag/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.angelofailla.com</link>
	<description>Storie, esperienze e pensieri da Dublino.</description>
	<lastBuildDate>Sun, 14 Aug 2011 22:11:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tempo di fare i pacchi.</title>
		<link>http://blog.angelofailla.com/2008/01/09/tempo-di-fare-i-pacchi/</link>
		<comments>http://blog.angelofailla.com/2008/01/09/tempo-di-fare-i-pacchi/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 22:24:42 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Lamentazioni]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[dimissioni]]></category>
		<category><![CDATA[flashdist]]></category>
		<category><![CDATA[installazione]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[yaifo]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/2008/01/09/tempo-di-fare-i-pacchi/langswitch_lang/en</guid>
		<description><![CDATA[Oggi giornata produttiva a lavoro. Finalmente insieme a Crash abbiamo sostituito il gateway OpenBSD aziendale della sede di Catania (hd con partizione / che ci stava per salutare). Per non dare disservizi abbiamo deciso di schiaffare il backup della notte precedente su un altro gw identico come hw, ma con l&#8217;hd funzionante. Bacula e&#8217; stato [...]]]></description>
			<content:encoded><![CDATA[<p>Oggi giornata produttiva a lavoro.  Finalmente insieme a Crash abbiamo sostituito il gateway OpenBSD aziendale della sede di Catania (hd con partizione / che ci stava per salutare). Per non dare disservizi abbiamo deciso di schiaffare il backup della notte precedente su un altro gw identico come hw, ma con l&#8217;hd funzionante. <a href="http://www.bacula.org">Bacula</a> e&#8217; stato d&#8217;aiuto non poco.</p>
<p>Anche il gateway della sede di Milano (una macchina <a href="http://www.soekris.com/index.htm">Soekris</a> con OpenBSD e hd da 2.5&#8243;) era in riparazione&#8230; Hd sminchiato anche lui&#8230; nella sede di Milano qualcuno inizialmente decideva che il sabato era il caso di staccare la corrente dal contatore&#8230; e addio hd&#8230;</p>
<p>Abbiamo optato questa volta per una bella CF da 1GB.</p>
<p>Purtroppo per ripristinare questo backup ce la siamo presi comoda, vuoi per cose e progetti paralleli, vuoi per altri impegni&#8230; fatto sta che sono passati 3 mesi, su Bacula noi facciamo un retention di 3  mesi, quindi addio backup. Fortunatamente avevo un dump, fatto con dd, di tutto l&#8217;hd da 40GB sul mio portatile aziendale.</p>
<p>Cosi&#8217; installo in.tftpd e dhcpd sul mio notebook e configuro tutto (se siete curiosi di capire come leggete <a href="http://www.dbnet.ece.ntua.gr/~adamo/howto/Soekris/">qui</a> e <a href="http://www.openbsd.org/faq/faq6.html#PXE">qui</a>). Verifico che tutto sia funzionante quindi apro un  bel minicom sulla seriale del soekrist, parte il ramdisk di openbsd ma&#8230; ORRORE! mi accorgo che il ramdisk non ha ssh, ne supporto ftp o nfs&#8230; morte male&#8230; io pensavo di poter fare un bel dd over ssh ma niente da fare&#8230;</p>
<p>Cosi&#8217; inizio a bestemmiare contro <a href="http://it.wikipedia.org/wiki/Theo_de_Raadt">Teo il ratto</a>, ma dico, ma mettetelo ssh! <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Cosi&#8217; girovagando per la rete e chiedendo agli amici di #mortodentro [grazie guly :*] scopro che esiste <a href="http://erdelynet.com/category/tech/yaifo/">questo progetto, YAIFO: Yet Another Installer for OpenBSD.</a></p>
<blockquote><p>Yaifo (Yet Another Installer for OpenBSD) is basically a stock bsd.rd kernel with sshd enabled.  It also includes RAIDFRAME support.  Suppose you have a server that is 500 miles away and you want to either upgrade it or do a fresh install &#8212; what do you do?  You could download <a href="http://erdelynet.com/downloads/yaifo-0.4-41.tgz">Yaifo for OpenBSD 4.1</a>, edit the config file, copy your authorized_keys file, copy the server&#8217;s ssh_host_* files, compile the yaifo.rd kernel, upload it to your server as /bsd and reboot.  When the server comes back up, ssh to the server as root and you will be prompted with the familiar &#8220;(I)nstall, (U)pgrade or (S)hell?&#8221; prompt.</p></blockquote>
<p>Mentre sono li&#8217; li&#8217; per compilare questo ben di Dio mi accorgo che sul mio gw OpenBSD 3.8 (si, lo so, e&#8217; vecchio, ma le cose che funzionano NON SI CAMBIANO OGNI 5 MINUTI) non posso compilarlo.</p>
<p>Chiedo a guly di farlo per me sulla sua macchina e ottengo due file: yaifo.fs e yaifo.rd che ora sono custoditi nel mio scrigno delle cose utili.</p>
<p>Mentre sto per usare questo rd via ssh seguendo <a href="http://undeadly.org/cgi?action=article&amp;sid=20070711154455">le istruzioni qui</a> mi rendo conto, mentre sto gzippando il dump dell&#8217;hd che si e&#8217; rotto, che sto dump supera gli 8GB e ancora va&#8217;! Mi rendo conto che quando fu&#8217; feci la cazzata di fare il dump di tutto wd0 e non delle partizioni singole&#8230; Sicuramente c&#8217;e&#8217; un modo per estrarre dal dump le singole partizioni, magari usando disklabel sul file&#8230; ma non avevo tempo cosi&#8217; ho deciso di usare <a href="http://www.nmedia.net/flashdist/">flashdist.</a></p>
<p>Che cos&#8217;e'?</p>
<blockquote><p> Flashdist is an embedded OpenBSD installer.  It will install OpenBSD onto any attached disk, <a href="http://www.pcengines.ch/cflash.htm">IDE</a> or <a href="http://www.sandisk.com/Products/Default.aspx?CatID=1137">USB</a><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=vnd&amp;sektion=4">vnode pseudo disk device</a>, or hard disk.  CompactFlash adapter,</p>
<p>It is designed to install a minimal version of OpenBSD with all of its advanced networking features.  The flashdist installation is mounted read-only during normal operation, eliminating the need for frequent writes.  This greatly reduces the potential for both boot failure due to a dirty filesystem and for flash corruption from repeated writes. The default distribution list, GENERIC kernel and the default flashdist rc fit within 32MB of RAM and 32MB of flash.  This can be scaled down with adjustments.  Flashdist will leave a large amount of free space on larger storage mediums which can be used for 3rd party software, data sets, or long term log rotation from the device itself.</p></blockquote>
<p>Scarico la immagine da 64MB per Soekris e utilizzo il comando growimg.sh per allargare la iso a 1GB della mia CF. Per usare questo comando dovete ottenre il numero di settori, cilindri e testine della vostra CF (usate fdisk su linux per saperlo).</p>
<p>La immagine carica ma non ho avuto il tempo di usarla. Vi faro&#8217; sapere.</p>
<p>A fine serata mi sono fatto i pacchi per portare via la mia roba. Incredibile quanta roba uno si porta a lavoro&#8230; ho anche trovato una bottiglia di plastica contentente un litro di vinozzo padronale (Nero d&#8217;Avola) regalatomi da un, ormai, ex collega questa estate. Non ho osato aprirlo&#8230; sara&#8217; aceto a quest&#8217;ora&#8230; <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Poi ho lasciato il portatile aziendale in ufficio, acceso col <a href="http://www.sysresccd.org/Main_Page">Linux Rescue CD</a>, a fare un:</p>
<pre>sysresccd ~ #  mount /dev/sda3 /mnt/ciao_spmc/
sysresccd ~ #  wipe -r /mnt/ciao_spmc/home/pallotron/</pre>
<p>sotto screen, e ancora STA GIRANDO <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Sul fronte Dublino: ieri ho ricevuto qualche telefonata aggiuntiva da una recruiter per ulteriori position e pare che forse posso dividermi una doppia con qualcuno trusted&#8230; vi tengo aggiornati.</p>
<p>Nelle foto: colleghi mi aiutano a trasportare le mie cose fuori dall&#8217;ufficio (notate la gioia delle persone nella prima foto).</p>
<p align="center"><img src="http://blog.angelofailla.com/wp-content/uploads/2008/01/me_dimissioni_pacco.jpg" alt="Sorry, but this post is not available in English" /></p>
<p align="center"> <img src="http://blog.angelofailla.com/wp-content/uploads/2008/01/collega_aiuto.jpg" alt="Sorry, but this post is not available in English" /></p>
<p align="center"> <img src="http://blog.angelofailla.com/wp-content/uploads/2008/01/trasloco.jpg" alt="Sorry, but this post is not available in English" /></p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=663&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2008%2F01%2F09%2Ftempo-di-fare-i-pacchi%2F&amp;title=Tempo%20di%20fare%20i%20pacchi." id="wpa2a_2"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2008/01/09/tempo-di-fare-i-pacchi/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Primo giorno di lavoro, prime impressioni.</title>
		<link>http://blog.angelofailla.com/2008/02/18/primo-giorno-di-lavoro-prime-impressioni/</link>
		<comments>http://blog.angelofailla.com/2008/02/18/primo-giorno-di-lavoro-prime-impressioni/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 20:14:12 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[Esperienze]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Irlanda]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Paranoia]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[dublino]]></category>
		<category><![CDATA[emigrazione]]></category>
		<category><![CDATA[operation engineer]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/2008/02/18/primo-giorno-di-lavoro-prime-impressioni/langswitch_lang/en</guid>
		<description><![CDATA[La mia prima giornata lavorativa e&#8217; finita. L&#8217;ho passata configurando il portatile che mi hanno assegnato. Windows brasato e Ubuntu installata. Ho una capiente scrivania con monitor LCD Dell di grande formato, tastiera e mouse Dell, entrambi USB. No pc fisso. Alcuni hanno PC fisso con dual monitor. Forse sono nonni. Io sono appena arrivato [...]]]></description>
			<content:encoded><![CDATA[<p>La mia prima giornata lavorativa e&#8217; finita. L&#8217;ho passata configurando il portatile che mi hanno assegnato. Windows brasato e Ubuntu installata. Ho una capiente scrivania con monitor LCD Dell di grande formato, tastiera e mouse Dell, entrambi USB. No pc fisso. Alcuni hanno PC fisso con dual monitor. Forse sono nonni. Io sono appena arrivato quindi non mi lamento <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>Arrivo li&#8217;, accendo il portatile semi chiuso, e uso il monitor grande con tastiera e mouse attaccati via usb.</p>
<p>Mi hanno detto di configurarmi Evolution perche&#8217; arrivano caterve di email di report Nagios e altro alla mailing list del gruppo operations, e viene piu&#8217; facile configurarsi le regole di filtraggio (prima o poi passo a mutt! <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> , non temete!).</p>
<p>Configuro la posta e leggo una email di benvenuto postata a tutta la mailing list:</p>
<blockquote><p>Please join me in welcoming two new members of Operations; Angelo (started today, sitting opposite TIZIO CAIO) and $NUOVODIPENDENTE (started Friday, sitting opposite PIPPO) , both of which will initially work from the Ops Deployment Team.</p>
<p><strong>Drop over and introduce yourself.</strong></p></blockquote>
<p>Peccato che non si e&#8217; droppato nessuno difronte a me! ahahahaha! <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>L&#8217;IT guy seduto dietro di me mi chiede poi di crearmi una chiave GnuPG perche&#8217; non mi voleva mandare i cert di openvpn in chiaro. Voleva fare il fighetto. Alche&#8217; questo mi consiglia una GUI grafica per fare cio&#8217; e io gli dico: «Non mi serve, faccio in commandline». Mi guarda con aria strana.</p>
<p>Dopo 5 minuti creo chiave, invio chiave a <a href="http://pgp.mit.edu">pgp.mit.edu</a>, mi prendo la sua pubkey, firmo, trusto e riuppo la sua chiave sul keyserver.</p>
<p>Mi hanno creato questi account:</p>
<ul>
<li>Samba share</li>
<li>Email</li>
<li>Wiki aziendale</li>
<li>Certificati Openvpn</li>
</ul>
<p>L&#8217;ufficio e&#8217; tutto un unico open space diviso a gruppi di lavoro. La mia scrivania e&#8217; vicino ad una piccola server farm che sembra un albero di natale al buio, vicino c&#8217;e&#8217; una cucina con lavastoviglie, boiler, microonde, frigo, lavello e piano cottura, macchina del caffe&#8217;, e tavoli per mangiare. Domani verifichero&#8217; se c&#8217;e&#8217; una tazza anche per me perche&#8217; anch&#8217;io devo farmi il tea col latte, come si usa qui.</p>
<p>Ho sclerato 20 minuti a cercare di capire come mai dopo 5 minuti di utilizzo non navigavo piu&#8217;, per la precisione le sessioni tcp stabilite continuavano a funzionare ma quelle nuove no! Poi ho scoperto una merda chiamata <strong>ebox</strong> che girava sul portatile, che non so&#8217; perche&#8217; ubuntu mi ha installato di default. E ho risolto con un bel:</p>
<pre># apt-get --purge remove ebox</pre>
<p>Probabilmente sono passato per cretino quando quello dietro a me vedeva che non riuscivo a fare un cazzo. Dice che nessuno ha mai avuto problemi con una installazione di default di Ubuntu. BAH! Linux sta diventando una merda. Si avvicina sempre di piu&#8217; Windows e questo e&#8217; male.</p>
<p>Sempre l&#8217;IT guy, dietro di me, mi ha creato la email scrivendo Failca al posto di Failla. Lo correggo.</p>
<p>Poi mi ha generato un certificato openvpn corrupted che non funzionava, e che mi ha fatto perdere 1 ora a capire se era un problema del file di configurazione. Gli faccio: «Penso che i certificati che mi hai dato sono corrotti». Gli faccio vedere l&#8217;output di openvpn e lui storce il naso e mi fa: «Nessuno ha mai avuto problemi da mesi, hai seguito bene la procedura nel wiki?».</p>
<p>Mi sono sentito preso per cretino e gli ho detto: «Li rifai i certificati e me li rimandi?». Quello li rifa&#8217;, me li rimanda, li provo e funzionano! Secondo voi dov&#8217;era il problema? <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Successivamente mi sono configurato ssh per fare sock5 proxy su un host che ho in rete su internet e ci ho tunnellizzato tutti i protocolli di IM che uso. <strong>Cosi&#8217;, non si sa mai.</strong></p>
<p>Il momento piu&#8217; tremendo della giornata e&#8217; stato il pranzo. Siamo andati io, il mio manager, e altri 3 ragazzi, in un ristorante vicino; Tra questi c&#8217;era un messicano anche lui nuovo (ha iniziato venerdi&#8217;). Tipo simpatico.</p>
<p>Il momento e&#8217; stato tremendo perche&#8217; ho avuto <strong>serie</strong> difficolta&#8217; a capire cosa dicevano tutti e quattro, a volte contemporaneamente; un po&#8217; ad essere sincero mi sono imparanoiato. Io sono un tipo abbastanza loquace a tavola, quando sono tra colleghi, e il non poter parlare come io volevo un po&#8217; mi provocava frustrazione. Comunque qualcosa l&#8217;ho detta e l&#8217;ho capita. In particolare c&#8217;e&#8217; un tipo che parlava in un modo assurdo, volume basso e parole impiasticciate&#8230; Vediamo tra qualche mese se riusciro&#8217; a comprenderlo! <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Pranzo offerto dal manager ovviamente, che dopo il lunch mi chiama nella meeting room per spiegarmi alcune cose sul lavoro. Pare che saro&#8217; allocato a questo team di operation deployment che si occupa di far parte dello sviluppo di un prodotto, dalla sua nascita alla consegna finale al cliente. In particolare il mio gruppo entra in gioco nella fase che stra tra il development e il deployment dal cliente. Alcuni del team di deployment possono far parte delle riunioni inerenti il design dell&#8217;architettura. Ci si occupa di costruire from scratch l&#8217;architettura in modo che sia scalabile e con zero o pochi single point of failure, quindi si parla anche di storage/network/power cabling, racking, installazione di sistemi operativi, configurazione dell&#8217;hw e del sw. Mi dicono che ci sara&#8217; anche la possibilita&#8217; di viaggiare in europa. Vedremo. Quando il lavoro di questa fase finisce, e&#8217; compito della gente che era in deployment trasferire le competenze in support. Eventualmente poi spostandosi in support lui stesso per fornire il supporto al cliente e quindi entrare nel giro dell&#8217;on-call, oppure essere riallocato ad un altro progetto sempre nel team di deployment.</p>
<p>Comunque l&#8217;impressione e&#8217; stata positiva, mi sembrano organizzati. Il manager mi ha detto che da domani avro&#8217; un mentor che sara&#8217; al mio fianco nei primi tempi a cui posso chiedere tutto quello che concerne aspetti tecnici e non tecnici (eccetto alcuni altri aspetti a cui devo fare riferimento direttamente al manager, tipo problemi di ritardo o salute, problemi personali con gente o col lavoro, tipo se mi sento stressato perche&#8217; non arrivo a fare le cose, mi sento sovrallocato, etc).</p>
<p>Probabilmente domani iniziero&#8217; a vedere qualche documento tecnico e iniziero&#8217; ad entrare piu&#8217; nel dettaglio del lavoro. Sono un po&#8217; imparanoiato dal mio inglese. Ma sono sicuro che migliorera&#8217;.</p>
<p>Ora vi saluto che devo andare a cucinarmi qualcosa. Ho un mal di schiena tremendo forse perche&#8217; quella sedia la devo ancora sistemare. Ho comprato un po&#8217; di prosciutto Beretta, del cheddar a fette, un po&#8217; di pane a cassette, un po&#8217; di Philadelphia e la carta stagnola, cosi&#8217; domani non devo mangiare porcherie a pranzo e mi preparo due panini. <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=735&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2008%2F02%2F18%2Fprimo-giorno-di-lavoro-prime-impressioni%2F&amp;title=Primo%20giorno%20di%20lavoro%2C%20prime%20impressioni." id="wpa2a_4"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2008/02/18/primo-giorno-di-lavoro-prime-impressioni/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>How to split Solaris mirror</title>
		<link>http://blog.angelofailla.com/2008/06/28/how-to-split-solaris-mirror/</link>
		<comments>http://blog.angelofailla.com/2008/06/28/how-to-split-solaris-mirror/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 09:00:16 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[appunti]]></category>
		<category><![CDATA[dyne]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[split mirror]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=841&#038;langswitch_lang=en</guid>
		<description><![CDATA[Eccoci, il Direttore dice che sono mono tematico ultimamente, in effetti e&#8217; vero. Cosi&#8217; ecco, per gli aficionados nerd che mi leggono, un post tecnico. Come sapete sono stato in Germania la scorsa settimana per delle attivita&#8217; on site. Uno dei task era quello di installare i server del secondo armadio per avere ridondanza. I [...]]]></description>
			<content:encoded><![CDATA[<p>Eccoci, il Direttore dice che sono mono tematico ultimamente, <strong>in effetti e&#8217; vero.</strong></p>
<p>Cosi&#8217; ecco, per gli aficionados nerd che mi leggono, un post tecnico. Come sapete sono stato in Germania la scorsa settimana per delle attivita&#8217; on site. Uno dei task era quello di installare i server del secondo armadio per avere ridondanza. I server sono delle macchina Sun Fire X2200 (processore AMD x86).</p>
<p>A parte che in questo progetto ne abbiamo avuto gia&#8217; troppo di sfiga:</p>
<ul>
<li>Una di queste box che abbiamo trovato <strong>era rotta</strong>. Ti potevi connettere all&#8217;ILOM, ma dopo l&#8217;accensione della macchina ed uno start AgentInfo/console non accadeva niente. IL NIENTE. Neanche il bios si riusciva a vedere. L&#8217;omino SUN e&#8217; poi venuto a cambiare LA CPU.</li>
<li>Su uno di questi server mesi fa siamo stati vittima di un non tanto noto <strong>bug di UFS</strong> (piu&#8217; che bug lo chiamerei cataclisma), che ci ha fatto perdere il contenuto della root partition.</li>
<li>Il controller B di un SAN andato.</li>
</ul>
<p>Mi chiedo se SUN faccia i quality check come si deve&#8230; Non ti aspetti simili problemi specie su macchine che si vantano di essere fighe super enterprise&#8230;</p>
<p>Comunque, per mettere su le macchine del secondo armadio ci si rompeva ad installare Solaris a mano in ogni macchina via CD-ROM cosi&#8217; si e&#8217; pensato di fare lo split del mirror delle macchine del primo armadio, usare il secondo disco di ogni macchina del primo armadio come primo disco delle nuove macchine sul secondo armadio.</p>
<p>Fare il boot e risincronizzare i mirror su entrambe le macchine.</p>
<p>Mi sono fatto una procedura che pubblico per gli altri sysadmin o wannabie tali:</p>
<ul>
<li>stop all applications (runlevel 1?)</li>
<li>unmount all possible mount points. umount /var ?</li>
<li>detach the second mirror of /root, /var, swap and slice 6
<pre>metadetach d10 d12    # /
metadetach d50 d52    # /var
metadetach d20 d22    # swap
metadetach d60 d62    # slice 6, if present</pre>
</li>
<li>detach the metadb on the second disk  &#8212; metadb -d /dev/dsk/c2d0s7</li>
<li>detach the metadb on the first disk forcing  &#8211;  metadb -fd /dev/dsk/c1d0s7</li>
<li>run a file check on the detached mirrors</li>
<li>mount the root file system of the detached mirror (mount /dev/dsk/c2d0s0 /mnt) (upgrade /etc/hosts, /etc/nodename, zones, etc.)</li>
<li>I hope but I don&#8217;t know if the sun engineer copied grub to the second disk.
<pre>installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c2d0s0</pre>
</li>
<li>remove all entries in /mnt/etc/system between  begin and end of MDD (do the same on /etc/system)
<pre>* Begin MDD root info (do not edit)
rootdev:/pseudo/md@0:0,10,blk
* End MDD root info (do not edit)</pre>
</li>
</ul>
<ul>
<li>remove all entries in /mnt/kernel/drv/md.conf between  begin and end of MDD (do the same on /mnt/kernel/drv/md.conf):
<pre># Begin MDD database info (do not edit)
mddb_bootlist1="cmdk:71:16:id1,cmdk@ASEAGATE_ST32500NSSUN250G_0741B58YS4=5QE58YS4/hcmdk:71:8208:id1,cmdk@ASEAGATE_ST32500NSSUN250G_0741B58YS4=5QE58YS4/hcmdk:71:16400:id1,cmdk@ASEAGATE_ST32500NSSUN250G_0741B58YS4=5QE58YS4/hcmdk:7:16:id1,cmdk@ASEAGATE_ST32500NSSUN250G_0741B58Z22=5QE58Z22/hcmdk:7:8208:id1,cmdk@ASEAGATE_ST32500NSSUN250G_0741B58Z22=5QE58Z22/hcmdk:7:16400:id1,cmdk@ASEAGATE_ST32500NSSUN250G_0741B58Z22=5QE58Z22/h";
# End MDD database info (do not edit)</pre>
</li>
</ul>
<ul>
<li>save the original vfstab; copy /mnt/etc/vfstab /mnt/etc/vfstab.mirror (do this on the first disk too)</li>
<li>edit /mnt/etc/hosts, /mnt/etc/nodename, /mnt/etc/hostname.* and /mnt/etc/zones/*, etc.</li>
</ul>
<ul>
<li>restore the vfstab to boot without mirror device; maybe there is an old one (without zfs!!!) (do this on the first disk too)</li>
</ul>
<p>Dopo aver effettuato questa procedura si spegne la macchina in questione con init 5.<br />
Si spegne anche l&#8217;altra macchina. Quella ancora brasata.</p>
<p>Si attende un 30 secondi per lo spin off dei dischi (sono paranoico), poi si swappano i dischi e si eseguono le normali procedure di mirroring del root file system su solaris. Trovate un sacco di howto su internet ma ne pubblico uno alla prossima puntata.</p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=841&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2008%2F06%2F28%2Fhow-to-split-solaris-mirror%2F&amp;title=How%20to%20split%20Solaris%20mirror" id="wpa2a_6"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2008/06/28/how-to-split-solaris-mirror/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Impossibile sniffare sulla interfaccia di loopback in Solaris?</title>
		<link>http://blog.angelofailla.com/2008/08/12/impossibile-sniffare-sulla-interfaccia-di-loopback-in-solaris/</link>
		<comments>http://blog.angelofailla.com/2008/08/12/impossibile-sniffare-sulla-interfaccia-di-loopback-in-solaris/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 18:01:36 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[Esperienze]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Lamentazioni]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[lamentazione]]></category>
		<category><![CDATA[merda]]></category>
		<category><![CDATA[sniff]]></category>
		<category><![CDATA[snoop]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=984&#038;langswitch_lang=en</guid>
		<description><![CDATA[Salve, Oggi ho sclerato una giornata per fare il troubleshooting di una cosa su Solaris. Problemi di comunicazione random tra apache che fa reverse proxy verso un tomcat nella stessa Zona di Solaris con traffico passante sulla interfaccia di loopback. Pero&#8217;: root@solaris # ./tcpdump -n -i lo0 tcpdump: /dev/lo0: No such file or directory root@solaris [...]]]></description>
			<content:encoded><![CDATA[<p>Salve,</p>
<p>Oggi ho sclerato una giornata per fare il troubleshooting di una cosa su Solaris. Problemi di comunicazione random tra apache che fa reverse proxy verso un tomcat nella stessa Zona di Solaris con traffico passante sulla interfaccia di loopback. Pero&#8217;:</p>
<pre>root@solaris # ./tcpdump -n -i lo0
tcpdump: /dev/lo0: No such file or directory

root@solaris # snoop -d lo0
snoop: /dev/lo: No such file or directory</pre>
<p>Solaris. Sei proprio un sistema operativo di merda!</p>
<p>Leggete <a href="http://phildev.net/ipf/IPFsolaris.html#solaris12">http://phildev.net/ipf/IPFsolaris.html#solaris12</a>:</p>
<blockquote><p><strong># Why can&#8217;t I filter on the loopback interface, or virtual interfaces?</strong><br />
The loopback interface on Solaris is a <strong>&#8220;fake&#8221; interface.</strong> You cannot filter it, nor can you snoop it. This is for <strong>performance reasons</strong>. Virtual interfaces in Solaris are very similar, to filter on them, use the physical interface instead. </p></blockquote>
<p>Perfomance reasons! Ma andatevene affanculo va&#8217;!<br />
Alla fine sono riuscito a  sniffare in un altro modo invertendo il reverse proxy verso un tomcat di un altro nodo e sniffando sulla interfaccia reale&#8230; sono riuscito ad isolare il problema e a decidere chi dei due sia il colpevole (almeno credo) e domani ci lavoro.</p>
<p>Saluti.</p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=984&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2008%2F08%2F12%2Fimpossibile-sniffare-sulla-interfaccia-di-loopback-in-solaris%2F&amp;title=Impossibile%20sniffare%20sulla%20interfaccia%20di%20loopback%20in%20Solaris%3F" id="wpa2a_8"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2008/08/12/impossibile-sniffare-sulla-interfaccia-di-loopback-in-solaris/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Considerations about Sun Solaris 10.</title>
		<link>http://blog.angelofailla.com/2008/08/23/considerations-about-sun-solaris-10/</link>
		<comments>http://blog.angelofailla.com/2008/08/23/considerations-about-sun-solaris-10/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 09:54:05 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[smf]]></category>
		<category><![CDATA[solaris 10]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[zfs]]></category>
		<category><![CDATA[zone]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=1012&#038;langswitch_lang=en</guid>
		<description><![CDATA[In NewBay I&#8217;m currently working on a project which uses Sun Solaris 10 in a multi-tier architecture. I&#8217;ve already used before this system in Italy, so it isn&#8217;t new for me; in Italy I was responsible for creating Sun packages for projects made by my ex company in behalf of Nokia and Vodafone Italy. By [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.angelofailla.com/wp-content/uploads/2008/08/sol10logo.png"><img class="aligncenter size-full wp-image-1013" title="sol10logo" src="http://blog.angelofailla.com/wp-content/uploads/2008/08/sol10logo.png" alt="" width="343" height="179" /></a></p>
<p>In <a href="http://www.newbay.com">NewBay</a> I&#8217;m currently working on a project which uses Sun Solaris 10 in a multi-tier architecture. I&#8217;ve already used before this system in Italy, so it isn&#8217;t new for me; in Italy I was responsible for creating Sun packages for projects made by my ex company in behalf of Nokia and Vodafone Italy.</p>
<p>By the way, as I started working in Newbay, I was allocated to this project called <a href="http://www.myfaves.co.uk/">MyFaves</a> for <a href="http://en.wikipedia.org/wiki/T-mobile">T-Mobile International</a>. This is based exclusively on Solaris 10 (both x86 and sparc architecture).<br />
After a few months I&#8217;ve used, and I&#8217;ve became pretty confident, with most of the big new and historical features of Solaris 10 like the <a href="http://en.wikipedia.org/wiki/Service_Management_Facility">SMF</a>, the <a href="http://en.wikipedia.org/wiki/Service_Management_Facility">ZFS</a> file system, the Solaris <a href="http://en.wikipedia.org/wiki/Solaris_Zones">zone/containers.</a></p>
<p>So what do I think about it?</p>
<p>Well, I think the only stuff really good in Solaris are the 3 I&#8217;ve mentioned above. All the other things I&#8217;ve seen around the system are pretty crappy. When I started using SMF I was thinking: «oh man! this is ridiculous! I&#8217;ve to type <em>svcadm enable/disable svc:/blabla/blablala/myapp:default</em> every fucking time i need to start or stop a service! <em>/etc/init.d/service start/stop</em> is much more better!». Then I studied a lot this SMF, and I have to admit is brilliant! I really would like to have it in enterprises Linuxes like Red Hat, or even, let&#8217;s say, in Debian! <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>ZFS is brilliant as well! I know it&#8217;s now stable and ready for production on BSD systems like FreeBSD. I&#8217;m not really sure if the Linux ZFS implementation, which use the fuse subsystem, is ready for production as well&#8230;</p>
<p>Zones and containers&#8230; well&#8230; I think they&#8217;re cool. Maybe I&#8217;m wrong but I think they&#8217;ve copied the <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html">FreeBSD jails</a> and they&#8217;ve integrated it very nicely with the system, especially with the solaris resoure manager. So you can, for exapmle, decide the amount of memory, or the number of CPUs that can be used by a single process, user, or group, in each zone. Integration between ZFS and Zones is cool as well!</p>
<p>Despite all these stuff I have to say that <strong>I still don&#8217;t really like Solaris:</strong></p>
<ul>
<li>I don&#8217;t like to have the f***ing old style vi written by <a href="http://en.wikipedia.org/wiki/Bill_Joy">Bill Joy</a>.</li>
<li>I dont&#8217;t like to have defined <em>export EDITOR=ed</em> and <em>export PAGER=more</em> by default.</li>
<li>I don&#8217;t like the fucking ps command (but you have to use the one into <em>/usr/ucb/</em>).</li>
<li>I don&#8217;t like the fact that your default shell is an old style c-shell instead of <em>/bin/bash</em></li>
<li>I don&#8217;t like the fucking OLD cron daemon which is not able to read the GNU syntax (for something like <em>*/5</em> to schedule a job every 5 minutes you have to write &#8220;<em>05,10,15,20,25,30,35,40,45,50,55</em>&#8220;. So ridicolous!!!!!)</li>
<li>I don&#8217;t like the fact that you don&#8217;t have ANY messages while booting!</li>
<li>I don&#8217;t like the packaging system, is shit compared with APT/DPKG, or with the the BSD ports system.</li>
<li>I don&#8217;t like CDE and JavaDesktop (or should I say GNOME! <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ).</li>
</ul>
<p>Why the fuck aren&#8217;t they using the GNU subsystem instead of their own CRAP? Are they using this only on OpenSolaris maybe?</p>
<p>Someone might say that this is because big companies (like banks for example) are still using OLD software which needs to use old crap to work. So they need old crap shell interpreter, and stuff like that. And they obviously like to have all the old crap by default installation&#8230;</p>
<p>Fuck them I say! This is ridicolous! <strong>They</strong> have to do the effort to adjust their our systems to work with the new OS&#8217;s. <strong>Not me! <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </strong></p>
<p>So this is what I think about Solaris 10. You can insult me now.</p>
<p>Cheers.<br />
Angelo</p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=1012&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2008%2F08%2F23%2Fconsiderations-about-sun-solaris-10%2F&amp;title=Considerations%20about%20Sun%20Solaris%2010." id="wpa2a_10"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2008/08/23/considerations-about-sun-solaris-10/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Lazyness</title>
		<link>http://blog.angelofailla.com/2009/03/13/lazyness/</link>
		<comments>http://blog.angelofailla.com/2009/03/13/lazyness/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 10:53:57 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[automazione]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=1351</guid>
		<description><![CDATA[C&#8217;e&#8217; stata una migrazione qualche notte fa per $GRANDECLIENTE. Fortunatamente io non vi ho fatto parte, se no avrei dovuto passare la notte in ufficio. Uno step previsto per la migrazione consisteva nel disattivare tutti i check nagios della vecchia release ceh girava su una 20ina di server. La CGI Nagios e&#8217; notoriamente uno schifo. [...]]]></description>
			<content:encoded><![CDATA[<p>C&#8217;e&#8217; stata una migrazione qualche notte fa per $GRANDECLIENTE. Fortunatamente io non vi ho fatto parte, se no avrei dovuto passare la notte in ufficio.</p>
<p>Uno step previsto per la migrazione consisteva nel disattivare tutti i check nagios della vecchia release ceh girava su una 20ina di server. La CGI Nagios e&#8217; notoriamente uno schifo. Non c&#8217;e&#8217; nessuna funzionalita&#8217; tipo &#8220;select all&#8221; -&gt; click. Cosi&#8217; quei geni si sono messi <strong>a cliccare come pazzi, spendendo UN&#8217;ORA.</strong></p>
<p><strong>Ora, per me tu puoi fare quello che vuoi, ma siccome non si sa mai che in un futuro prossimo io debba essere al posto loro, ho rimediato con l&#8217;ennesimo script.<br />
</strong></p>
<p>Fossi io avrei preferito spendere un&#8217;ora a scrivermi uno script che non mi avrebbe fatto perdere un&#8217;ora ogni volta che avessi dovuto fare una cosa del genere. E cosi&#8217; ho fatto ieri sera dopo cena, non avendo un cazzo di molto interessante da fare.</p>
<p>Lo script e&#8217; <a href="http://www.pallotron.net/software/nagios_extcmd.sh">qui.</a></p>
<pre>
/home/pallotron/bin/nagios_extcmd.sh <-n | -N | -p | -P | -C | -c> host service_description <cmdfile_path>
/home/pallotron/bin/nagios_extcmd.sh -h

-n disable notification
-N enable notification

-p disable passive check
-P enable passive check

-c disable check
-C enable check</pre>
<p>Lo script scrive qualcosa nella pipe che il daemon Nagios piazza nel file system.</p>
<p>Ho preso la lista dei comandi da <a href="http://www.nagios.org/developerinfo/externalcommands/commandlist.php">qui.</a></p>
<p>Avrete bisogno di editarlo e cambiare il path della pipe in base al vostro sistema. Poi sbizzarrirvi con un robe del tipo:</p>
<pre>for i in web01de web02de web03de web04de
do
   nagios_extcmd.sh -n $i "SC Apache"
   nagios_extcmd.sh -p $i "SC Apache"
   nagios_extcmd.sh -c $i "SC Apache"
done</pre>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=1351&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2009%2F03%2F13%2Flazyness%2F&amp;title=Lazyness" id="wpa2a_12"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2009/03/13/lazyness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AAA cercasi</title>
		<link>http://blog.angelofailla.com/2009/05/25/aaa-cercasi/</link>
		<comments>http://blog.angelofailla.com/2009/05/25/aaa-cercasi/#comments</comments>
		<pubDate>Mon, 25 May 2009 14:04:16 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[Irlanda]]></category>
		<category><![CDATA[Lavoro]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=1440</guid>
		<description><![CDATA[Sono tornato. Questo post e&#8217; un po&#8217; OT rispetto ai post precedenti. Ho appena saputo che la mia azienda cerca un Deployment Engineer in USA e uno qui a Dublino per rimpolpare il gruppo di Deployment in cui lavoro. Se siete interessati cliccate qui per scaricare la job specification. Inviare curricuvlum a pallotron &#60;at&#62; freaknet [...]]]></description>
			<content:encoded><![CDATA[<p>Sono tornato. Questo post e&#8217; un po&#8217; OT rispetto ai post precedenti.</p>
<p>Ho appena saputo che la mia azienda cerca un Deployment Engineer in USA e uno qui a Dublino per rimpolpare il gruppo di Deployment in cui lavoro. Se siete interessati cliccate <a href="http://blog.angelofailla.com/wp-content/uploads/2009/05/deployment-engineer.doc">qui</a> per scaricare la job specification.</p>
<p>Inviare curricuvlum a pallotron &lt;at&gt; freaknet &lt;dot&gt; org</p>
<p>Saluti.</p>
<p>PS: questo annuncio e&#8217; per chi si trova <strong>gia&#8217; </strong>in Irlanda, o per chi si trasferira&#8217; qui nelle prossime settimane.</p>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=1440&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2009%2F05%2F25%2Faaa-cercasi%2F&amp;title=AAA%20cercasi" id="wpa2a_14"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2009/05/25/aaa-cercasi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up WordPress Multisite on Debian 5.0 (lenny)</title>
		<link>http://blog.angelofailla.com/2010/12/29/setting-up-wordpress-multisite-on-debian-5-0-lenny/</link>
		<comments>http://blog.angelofailla.com/2010/12/29/setting-up-wordpress-multisite-on-debian-5-0-lenny/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 18:09:35 +0000</pubDate>
		<dc:creator>pallotron</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp3]]></category>

		<guid isPermaLink="false">http://blog.angelofailla.com/?p=2095</guid>
		<description><![CDATA[This post explains how to install WordPress 3.x on a Debian lenny and to set up a multisite installation on your Debian server. All the blogs will log into the same file /var/log/apache2/access.log; the first column will be the blog host and port (see the LogFormat configured below). This chapter is based on information collected [...]]]></description>
			<content:encoded><![CDATA[<p>This post explains how to install WordPress 3.x on a Debian lenny and to set up a multisite installation on your Debian server.</p>
<p>All the blogs will log into the same file <code>/var/log/apache2/access.log</code>; the first column will be the blog host and port (see the LogFormat configured below).</p>
<p>This chapter is based on information collected at http://codex.wordpress.org/Create_A_Network and in <code>/usr/share/doc/wordpress/README.Debian</code>.</p>
<p>All WordPress blogs will use the same shared PHP code in <code>/usr/share/wordpress</code>.</p>
<p><strong>Assumptions</strong></p>
<ul>
<li>Main website will be http://domain.com</li>
<li>Blogs will be under http://${blogname}.domain.com</li>
</ul>
<p>File uploaded into the main blog (www.domain.com) will be stored in <code>/srv/www/wp-uploads/domain.com/%year/%month/</code></p>
<p>Files uploaded into the <code>*.domain.com</code> blogs will be stored in <code>/usr/share/wordpress/wp-content/blogs.dir/${blog_id}/files/%year/%month/</code>, where <code>${blog_id}</code> is the numeric id of the blog, as managed by the Multisite feature.</p>
<p><strong>Configuration of Debian lenny-backports repository and installation</strong></p>
<p>WordPress 3.x is not in lenny so we have to use the backport repository.<br />
Excute this as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;deb http://backports.debian.org/debian-backports lenny-backports main&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&lt;&lt;</span>EOF <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>preferences
Package: <span style="color: #000000; font-weight: bold;">*</span>
Pin: release <span style="color: #007800;">a</span>=lenny-backports
Pin-Priority: <span style="color: #000000;">200</span>
EOF
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> lenny-backports <span style="color: #c20cb9; font-weight: bold;">install</span> wordpress</pre></div></div>

<p><strong>Installation of non free swf plugin</strong></p>
<p>As stated in <code>/usr/share/doc/wordpress/README.Debian</code> WordPress originally comes with a Flash-based tool that allows to upload files. However, that tool violates the Debian Policy, as stated in the<br />
bug #591195. That is why this tool is not shipped with the Debian package anymore. If you want to enable this feature, you need to install the Flash file yourself with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>wp-includes<span style="color: #000000; font-weight: bold;">/</span>js<span style="color: #000000; font-weight: bold;">/</span>swfupload<span style="color: #000000; font-weight: bold;">/</span>swfupload.swf http:<span style="color: #000000; font-weight: bold;">//</span>core.svn.wordpress.org<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3.0</span><span style="color: #000000; font-weight: bold;">/</span>wp-includes<span style="color: #000000; font-weight: bold;">/</span>js<span style="color: #000000; font-weight: bold;">/</span>swfupload<span style="color: #000000; font-weight: bold;">/</span>swfupload.swf</pre></div></div>

<p><strong>Configure your DNS server</strong></p>
<p>Add the following records in your zone (I suppose you know how to deal with your DNS zone):</p>

<div class="wp_syntax"><div class="code"><pre class="bind" style="font-family:monospace;">; wp multisite
$ORIGIN        IN A       ${IP}
www            IN A       ${IP}
*.domain.com.  IN CNAME   www</pre></div></div>

<p><strong>Apache configuration</strong></p>
<p>Configure the <code>vhost_combined</code> log format in <code>/etc/apache2/apache2.conf</code> modifying the default one:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">LogFormat</span> <span style="color: #7f007f;">&quot;%{Host}i:%p %h %l %u %t <span style="color: #000099; font-weight: bold;">\&quot;</span>%r<span style="color: #000099; font-weight: bold;">\&quot;</span> %&gt;s %O <span style="color: #000099; font-weight: bold;">\&quot;</span>%{Referer}i<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\&quot;</span>%{User-Agent}i<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> vhost_combined</pre></div></div>

<p>Configure apache in <code>/etc/apache2/sites-available/wordpress-multisite</code> :</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
<span style="color: #00007f;">UseCanonicalName</span>    <span style="color: #0000ff;">Off</span>
&nbsp;
<span style="color: #00007f;">ServerAlias</span> *.domain.com domain.com
<span style="color: #00007f;">ServerName</span> www.domain.com
<span style="color: #00007f;">DocumentRoot</span> /srv/www/domain.com/
&nbsp;
<span style="color: #00007f;">Options</span> <span style="color: #0000ff;">All</span>
<span style="color: #00007f;">ServerAdmin</span> you@domain.com
&nbsp;
<span style="color: #adadad; font-style: italic;"># Store uploads of www.domain.com in /srv/www/wp-uploads/$0</span>
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteRule</span> ^/wp-uploads/(.*)$ /srv/www/wp-uploads/%{HTTP_HOST}/$1
&nbsp;
&lt;<span style="color: #000000; font-weight:bold;">Directory</span> /&gt;
        <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">FollowSymLinks</span>
        <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">All</span>
&lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
&nbsp;
<span style="color: #00007f;">CustomLog</span> /var/log/apache2/access.log vhost_combined
&nbsp;
<span style="color: #adadad; font-style: italic;"># this is needed when activating multisite, WP needs to to a </span>
<span style="color: #adadad; font-style: italic;"># fopen(&quot;http://randomname.domain.com&quot;) to verify</span>
<span style="color: #adadad; font-style: italic;"># that apache is correctly configured</span>
<span style="color: #00007f;">php_admin_flag</span> allow_url_fopen <span style="color: #0000ff;">on</span>
&nbsp;
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>Configure <code>/etc/wordpress/htaccess</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">IfModule</span> mod_rewrite.c&gt;
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteBase</span> /
<span style="color: #00007f;">RewriteRule</span> ^index\.php$ - [L]
<span style="color: #adadad; font-style: italic;">## uploaded files</span>
<span style="color: #00007f;">RewriteRule</span> ^files/(.+) wp-<span style="color: #0000ff;">includes</span>/ms-files.php?file=$1 [L]
<span style="color: #adadad; font-style: italic;">## real files dealt directly</span>
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} -f [OR]
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} -d
<span style="color: #00007f;">RewriteRule</span> ^ - [L]
<span style="color: #adadad; font-style: italic;">## other go through index.php</span>
<span style="color: #00007f;">RewriteRule</span> . index.php [L]
&lt;/<span style="color: #000000; font-weight:bold;">IfModule</span>&gt;</pre></div></div>

<p>Enable the config executing this as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">a2ensite wordpress-multisite
a2enmod rewrite <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> a2enmod vhost_alias
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<p><strong>Setting some permissions</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># required to allow the main site to upload content</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> www-data <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> www-data <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># required to allow subdomains site to upload content</span>
<span style="color: #c20cb9; font-weight: bold;">chgrp</span> www-data <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>blogs.dir<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> g+<span style="color: #c20cb9; font-weight: bold;">w</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>blogs.dir<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># required in order to be able to install/update themes/plugins </span>
<span style="color: #666666; font-style: italic;"># from the webgui (only on the main site)</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>wp-content<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>wp-admin<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p><strong>Creating main site</strong></p>
<p>At this stage we can create the main site using this bash script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>wordpress<span style="color: #000000; font-weight: bold;">/</span>examples<span style="color: #000000; font-weight: bold;">/</span>setup-mysql <span style="color: #660033;">-n</span> main domain.com</pre></div></div>

<p>This script creates the DB &#038; tables and it also creates a file called <code>/etc/wordpress/config-domain.com.php</code>.</p>
<p>You should end up with the following files:</p>
<ul>
<li><code>/etc/wordpress/config-domain.com.php</code>
</li>
<li><code>/srv/www/domain.com</code> symlink to -> <code>/usr/share/wordpress</code>
</li>
<li><code>/srv/www/wp-uploads/domain.com/</code></li>
</ul>
<p><strong>Activating Network (aka multisite)</strong></p>
<p>At this stage you should log into http://domain.com and follow the on screen instructions.<br />
Once you are in the backend you can than click into the &#8220;Tools -> Network&#8221; link and enable the mulsite, this will create some tables in your db and it will ask you to copy&#038;paste some lines into <code>/etc/wordpress/config-domain.com.php</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'SUBDOMAIN_INSTALL'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$base</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'DOMAIN_CURRENT_SITE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'domain.com'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'PATH_CURRENT_SITE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'SITE_ID_CURRENT_SITE'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'BLOG_ID_CURRENT_SITE'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'AUTH_KEY'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'SECURE_AUTH_KEY'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'LOGGED_IN_KEY'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'NONCE_KEY'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'AUTH_SALT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'SECURE_AUTH_SALT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'LOGGED_IN_SALT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'NONCE_SALT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blabla'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'MULTISITE'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># for debugging purposes only
</span><span style="color: #666666; font-style: italic;"># define('WP_DEBUG', true);</span></pre></div></div>

<p>After that you&#8217;re ready to go <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Logging as super admin and going into the SuperAdmin webgui area you can create new subdomains (blogs), and users, when you can create blogs an email is sent to the owner, you can personalize templates, decide how much storage space you want to assign to every single blog, etc, etc.</p>
<p>At this point you should be able to also install/upgrade plugins and themes straight from the web gui.<br />
Note that <code>define('WP_CORE_UPDATE', false);</code> in your config file will disable the auto update, your wordpress update cycle will be managed using Debian apt tool.</p>
<p>That&#8217;s it folks, any question please comment <img src='http://blog.angelofailla.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://blog.angelofailla.com/?ak_action=api_record_view&id=2095&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.angelofailla.com%2F2010%2F12%2F29%2Fsetting-up-wordpress-multisite-on-debian-5-0-lenny%2F&amp;title=Setting%20up%20WordPress%20Multisite%20on%20Debian%205.0%20%28lenny%29" id="wpa2a_16"><img src="http://blog.angelofailla.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.angelofailla.com/2010/12/29/setting-up-wordpress-multisite-on-debian-5-0-lenny/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

