The Remains Of The Day http://gamito.blogs.sapo.pt/ The Remains Of The Day - SAPO Blogs Fri, 04 Jan 2008 19:35:53 GMT LiveJournal / SAPO Blogs http://gamito.blogs.sapo.pt/53822.html Fri, 04 Jan 2008 19:32:11 GMT Portagens gamito http://gamito.blogs.sapo.pt/53822.html <p>A1, Aveiro Sul &ndash; Coimbra, ida e volta, 5,40 euros cada.<br /> <br /> Sempre são 1080$00 na moeda antiga.<br /> Isto não será um bocadinho de exagero ?<br /> <br /> Chiça!<br /> <br /> <br /> <span style="font-family: Courier New;">A ouvir: Estrela do Mar, Jorge Palma.</span><br style="font-family: Courier New;" /> <span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=NBvsiX6mY-I</span></p> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/53822.html 0 sociedade http://gamito.blogs.sapo.pt/53093.html Thu, 13 Dec 2007 20:32:19 GMT Há 20 anos atrás... *sigh* gamito http://gamito.blogs.sapo.pt/53093.html <div style="text-align: center;"><img border="0" alt="" style="border-color: black;" src="http://fotos.sapo.pt/azoigueiro/pic/00047pt7" /></div> http://gamito.blogs.sapo.pt/53093.html 2 http://gamito.blogs.sapo.pt/52525.html Wed, 05 Dec 2007 02:12:11 GMT Vou criar a minha própria distribuição de Linux... gamito http://gamito.blogs.sapo.pt/52525.html <span style="font-style: italic;">... and guess what</span>, agora que o <span style="font-style: italic;">software</span> do Prof. Dan Bernstein &eacute; do dom&iacute;nio p&uacute;blico, vai ser uma distribui&ccedil;&atilde;o para um servidor de email completo utilizando qmail como MTA.<br /><br />Provavelmente vai chamar-se qmailux e ser&aacute; baseada em CentOS 5.1<br /><br />H&aacute; tanto tempo que eu queria fazer isto mas n&atilde;o podia.<br /><span style="font-style: italic;">It's a dream come true :)</span><br /><br /><br /><span style="font-family: Courier New;">A ouvir: Wow, Kate Bush.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=xKh-HhzMX<wbr />GE</span> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/52525.html 2 qmail http://gamito.blogs.sapo.pt/52359.html Tue, 04 Dec 2007 16:13:40 GMT Finalmente gamito http://gamito.blogs.sapo.pt/52359.html O Prof. Dan Bernstein decidiu colocar todo o seu software j&aacute; escrito (e.g. qmail, djbdns, daemontools) e futuro sob dom&iacute;nio p&uacute;blico.<br /><br />Aqui a <a href="http://cr.yp.to/qmail/dist.html">p&aacute;gina</a> onde faz o an&uacute;ncio para o qmail e aqui o <a href="http://video.google.com/videoplay?docid=-3147768955127254412&amp;q=bernstein+public+domain&amp;total=2&amp;start=0&amp;num=10&amp;so=0&amp;type=search&amp;plindex=0">v&iacute;deo</a> aonde anuciou a novidade com palmas e gritinhos da audi&ecirc;ncia.<br /><br />Vou fazer RPMs para o qmail, daemontools, ucspi-tcp e checkpassword, yack :)<br /><br />Ser&aacute; que vem a&iacute; um qmail 2 ?<br /><br /><br /><span style="font-family: Courier New;">A ouvir: Victor's Solo Piano, </span><span id="BeginvidDescUgYbVV4OHbE"><span style="font-family: Courier New;">Danny Elfman.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=UgYbVV4OH<wbr />bE</span></span> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/52359.html 2 qmail http://gamito.blogs.sapo.pt/51751.html Mon, 19 Nov 2007 05:05:34 GMT SAPO codebits gamito http://gamito.blogs.sapo.pt/51751.html Foi com muita pena que, por motivos de tempo, n&atilde;o pude inscrever-me no SAPO codebits que unanimemente foi considerado um sucesso.<br /><br />Queria l&aacute; ter ido fazer uma(s) brincadeira(s) com um servidor de email e <span style="font-style: italic;">web services</span> numa m&aacute;quina virtual, ouvir a apresenta&ccedil;&atilde;o do <a href="http://blog.sig9.net/">Nuno Loureiro</a> sobre a API do <span style="font-style: italic;">webmail </span>do SAPO que era uma coisa que me interessava bastante e conviver com algumas pessoas conhecidas que j&aacute; n&atilde;o vejo h&aacute; algum tempo (Paulo Laureano Santos, Paulo Trezentos, M&aacute;rio Valente...).<br /><br />Paci&ecirc;ncia, talvez para o ano possa ir.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: Thank You, Led Zeppelin.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">Youtube: http://www.youtube.com/watch?v=Qj3bi_mck<wbr />W0</span> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/51751.html 0 hacking http://gamito.blogs.sapo.pt/51537.html Wed, 14 Nov 2007 16:27:07 GMT Sporting gamito http://gamito.blogs.sapo.pt/51537.html Tenho andado nos &uacute;ltimos dias um bocado arredado das not&iacute;cias e s&oacute; agora soube dos tr&ecirc;s secos que o meu Sporting emborcou do Braga.<br /><br />Eu por mim j&aacute; me estou lixando, <span style="FONT-STYLE: italic">business as usual</span>.<br /><br />Agora, come&ccedil;o &eacute; a sentir-me um bocado &quot;culpado&quot; por ter feito do <a href="http://gpg.blogs.sapo.pt">meu filho</a> de 9 anos um Sportinguista ferrenho.<br /><br />Porra para isto.<br /><br /><br /><span style="FONT-FAMILY: Courier New">A ouvir: Dance On A Volcano, Genesis.</span><br style="FONT-FAMILY: Courier New" /><span style="FONT-FAMILY: Courier New">YouTube: http://www.youtube.com/watch?v=FraoJitaP<wbr />7I</span> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/51537.html 1 sporting http://gamito.blogs.sapo.pt/51402.html Wed, 14 Nov 2007 16:14:19 GMT Caixa Mágica e Mandriva gamito http://gamito.blogs.sapo.pt/51402.html <p>Devo dizer que acolho a notícia de a Caixa Mágica mudar a sua base de SuSE para Mandriva com a maior satisfação.<br /> <br /> Com efeito, a Mandriva é de longe a melhor distribuição Linux KDE <span style="font-style: italic;">based</span> que há.<br /> <span style="font-style: italic;">Let there be no doubt about it</span>.<br /> <br /> Agora bom, bom, era a Caixa Mágica ter um sistema&nbsp;de gestão de pacotes diferente do urpmi que na verdade é uma boa treta.<br /> <br /> Espero que a Caixa Mágica tenha artes para contornar/resolver esta questão.<br /> <br /> <span style="font-style: italic;">Nice move</span>, Paulo :)<br /> <br /> PS. O DarkLord da Caixa Mágica deixou em comentário que a distribuição não vai usar o urpmi, mas sim o <span class="txt">apt-rpm/Synaptic</span>.</p> <p>&nbsp;</p> <p><i>Nice move again</i>, Paulo :)<br /> <br /> <br /> <span style="font-family: Courier New;">A Ouvir: Eleventh Earl Of Mar, Genesis.</span><br style="font-family: Courier New;" /> <span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=9sNgU4cJV<wbr />P4</span></p> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/51402.html 3 linux http://gamito.blogs.sapo.pt/50736.html Wed, 14 Nov 2007 15:44:58 GMT A1 Aveiro - Lisboa gamito http://gamito.blogs.sapo.pt/50736.html A A1, pelo menos entre Aveiro e Lisboa, est&aacute; metade em obras, com duas faixas estreitinhas e placas de velocidade m&aacute;xima de 80 km/h.<br /><br />Quanto ao pre&ccedil;o, &eacute; o mesmo de sempre.<br /><br />Arrota pelintra.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: Down And Out, Genesis.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=HFqs3zhjj<wbr />YU</span> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/50736.html 2 sociedade http://gamito.blogs.sapo.pt/50146.html Wed, 07 Nov 2007 09:01:23 GMT Browser mamão gamito http://gamito.blogs.sapo.pt/50146.html <p>Este Firefox em Linux, suga a módica quantidade de 120 MB de RAM e não tenho extensões instaladas.<br /> <br /> Irra lá para o gajo.<br /> <br /> <span style="font-family: Courier New;">A ouvir: Red Rain, Peter Gabriel.</span><br style="font-family: Courier New;" /> <span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=pIG5wU0Eh<wbr />Cc</span></p> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/50146.html 4 http://gamito.blogs.sapo.pt/49047.html Sat, 27 Oct 2007 20:49:32 GMT gFTP gamito http://gamito.blogs.sapo.pt/49047.html Esta recente vers&atilde;o do Mandriva, traz pela primeira vez o Filezilla em vez do gFTP como cliente de FTP.<br /><br />Ok, o Filezilla tem uma grande fama &mdash; especialmente em Windows, j&aacute; que &eacute; &agrave; borli&uacute; e legal &mdash; mas em Linux prefiro o velhinho gFTP.<br /><br />Como n&atilde;o havia um RPM para este Mandriva, v&aacute; de ./configure &amp;&amp; make &amp;&amp; make install.<br /><br />E aqui est&aacute; o bicharoco a fungar :)<br /><br /> <div style="text-align: center;"><img border="0" src="http://fotos.sapo.pt/azoigueiro/pic/000466wt" style="border-color: black;" alt="" /><br /><br /><br /> <div style="text-align: left;"><span style="font-family: Courier New;">A ouvir: Left Of Center, Suzanne Vega.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">Youtube: http://www.youtube.com/watch?v=KFXftW3Uq<wbr />9E</span></div> </div> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/49047.html 4 linux http://gamito.blogs.sapo.pt/48794.html Sat, 27 Oct 2007 14:21:10 GMT PlayStation 3 e Sony gamito http://gamito.blogs.sapo.pt/48794.html H&aacute; coisa de tr&ecirc;s meses, comprei uma PlayStation 3 para o meu filho. H&aacute; dois, avariou-se, deixou de reconhecer qualquer tipo de disco.<br /><br />Liguei para a assist&ecirc;ncia da Sony, foram impec&aacute;veis. N&atilde;o se puseram com perguntas da treta.<br />Disseram-me para colocar (s&oacute;) a consola numa caixa, junto com c&oacute;pia do tal&atilde;o de compra e do c&oacute;digo da avaria que me deram, e ligar para a SEUR de Coimbra que eles vinham busc&aacute;-la. E que da&iacute; a duas ou tr&ecirc;s semanas, teria uma nova.<br /><br />Impec&aacute;vel, no outro dia de manh&atilde;, vieram mesmo busc&aacute;-la.<br /><br />N&atilde;o demorou duas ou tr&ecirc;s semanas, mas quatro. Bem, ningu&eacute;m morreu por causa disso, acho.<br /><br />Agora, PlayStation novinha em folha, toca a lig&aacute;-la... nada. Nem imagem, nem som, n&eacute;pia, zero, nada, niente.<br /><br />J&aacute; experimentei com dois cabos diferentes e nada.<br /><br />Esta malta n&atilde;o testa o que envia ? A consola &eacute; mesmo nova, d&aacute; para ver.<br /><br />Agora l&aacute; vai o meu filho ficar mais quatro semanas sem a consola.<br /><br />Quer dizer, quase metade do tempo que passou desde que comprei a consola, na pr&aacute;tica &eacute; como se n&atilde;o o tivesse feito.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: Come Away With Me, Norah Jones.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">Youtube: http://www.youtube.com/watch?v=aBKcKQHZX<wbr />ks</span> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/48794.html 2 http://gamito.blogs.sapo.pt/48538.html Sat, 27 Oct 2007 14:14:56 GMT Mas quem é o gajo ? gamito http://gamito.blogs.sapo.pt/48538.html <p>Eu confesso que quando nos telejornais da SIC vem aquela treta do FUTURO HOJE com aquele senhor de bigode e pera, levanto-me e vou à varanda fumar um cigarro enquanto a coisa passa.<br /> Isto não é treta, é mesmo verdade, já não tenho pachorra para as asneiras umas em cima das outras que o homem debita.<br /> <br /> No entanto ontem, por curiosidade, fiquei para ver o que diria ele do Leopard.<br /> <br /> Mas não, ele não disse nada sobre o Leopard, só falou no &quot;Léópárde&quot;.<br /> <br /> Ainda que mal pergunte, que raio de futuristicamente hoje é este homem que nem Inglês sabe falar ?<br /> <br /> Ainda por cima descobriu a pólvora: os múltiplos desktops que já há tanto tempo existem, excepto no Windows que é a única coisa que ele conhece.<br /> <br /> Segundo ele, &quot;é como se fossem quatro computadores num só&quot;.<br /> É o milagre da multiplicação da capacidade de processamento. São processadores, Senhor.<br /> <br /> Seguem mais uns cigarrinhos à varanda, não caio em mais nenhuma.<br /> <br /> <span style="font-family: Courier New;">A ouvir: Nightingale, Norah Jones,</span><br style="font-family: Courier New;" /> <span style="font-family: Courier New;">Youtube: http://www.youtube.com/watch?v=hdtioKfk9<wbr />T8</span></p> <p>&nbsp;</p> http://gamito.blogs.sapo.pt/48538.html 2 http://gamito.blogs.sapo.pt/46937.html Fri, 28 Sep 2007 20:39:29 GMT Negócios do Open Source gamito http://gamito.blogs.sapo.pt/46937.html Hoje comprei um <span style="font-style: italic;">template </span>para o Joomla para o projecto que estou a fazer.<br /><br />Foram 39,95 USD mas a coisa vale bem o dinheiro.<br /><br />Agora, documenta&ccedil;&atilde;o para mexer naquilo ? Duas p&aacute;ginas que n&atilde;o explicam a ponta de um corno e n&atilde;o, n&atilde;o se trata de mexer em CSS. &Eacute; muito mais do que isso.<br />Tem que andar o pessoal no f&oacute;rum do <span style="font-style: italic;">site </span>a dar dicas uns aos outros.<br /><br />Outra coisa que n&atilde;o percebo, por muito burro que possa ser, &eacute; porque &eacute; que as imagens s&oacute; mostram os <span style="font-style: italic;">layers </span>quando abertas no Fireworks em Windows.<br />Nem Photoshop, nem GIMP, nem Paint Shop Pro, nem nada.<br />Se se quiser alterar as imagens tem que ser no Fireworks, obviamente em Windows.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: A Song For You, Ray Charles.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=mXGc0OoZE<wbr />sM</span> <p>&nbsp;</p> 0 projectos http://gamito.blogs.sapo.pt/46814.html Fri, 28 Sep 2007 12:33:19 GMT Não estão fartos disto ? gamito http://gamito.blogs.sapo.pt/46814.html De ter que premir a tecla y para copiar ficheiros com o mesmo nome ?<br /><br /><span style="font-family: Courier New;"># cp * /lixo</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/cert.pem'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/create-homedir'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/defaultdelivery'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/defaultdomain'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/defaultquota'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/dirmaker'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldapbasedn'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldapcluster'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldapgid'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldaplocaldelivery'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldaplogin'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldapmessagestore'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldapobjectclass'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldappassword'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldapserver'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/ldapuid'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/locals'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/Makefile'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/me'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/plusdomain'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/qmail-imapd.rules'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/qmail-pop3d.rules'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/qmail-qmqpd.rules'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/qmail-smtpd.rules'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/quotawarning'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/rcpthosts'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/signatures'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/tcp.smtp'? y</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cp: overwrite `/lixo/tcp.smtp.cdb'? y</span><br style="font-family: Courier New;" /><br />Bem, isto &eacute; porque o cp tem um <span style="font-style: italic;">alias</span> para o param&ecirc;tro -i (# man cp):<br /><br /><span style="font-family: Courier New;"># alias</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">alias cp='cp -i'</span><br style="font-family: Courier New;" /><br />Das duas uma: ou o removem, o que n&atilde;o &eacute; muito aconselh&aacute;vel, ou fazem:<br /><br /><span style="font-family: Courier New;"># \cp * /lixo</span><br /><br />Yap, o backslash faz toda a diferen&ccedil;a ;-)<br /><br /><br /><span style="font-family: Courier New;">A ouvir: On An Island, David Gilmour</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=SROK4biHO<wbr />Pk</span> <p>&nbsp;</p> 0 linux http://gamito.blogs.sapo.pt/46402.html Fri, 28 Sep 2007 12:02:52 GMT Naughty, naughty gamito http://gamito.blogs.sapo.pt/46402.html Era s&oacute; para dizer a estes curiosos <span style="font-style: italic;">wannabes </span>que n&atilde;o, n&atilde;o viram a minha <span style="font-style: italic;">home share</span> do Samba.<br /><br />De qualquer modo, basta uma linha no smb.conf para afastar a curiosidade:<br /><br /><span style="font-family: Courier New;">hosts allow = 192.168.0.100</span><br /><br />Lista de curiosos:<br /><br /><span style="font-family: Courier New;"># ls /var/log/samba/[^smbd*-a-z]*&nbsp; | cut -f5 -d '/' | cut -f1 -d '.'</span><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><span style="font-family: Courier New;">carla-2000gzr9q</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">carlos-ir33ncm8</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">carlos</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">carlos</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">carlos-s6b9brdp</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">casa-7xtjzspqi8</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">casa</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">celeron</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cesar</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">chupapa-b1o4lc5</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cliente-5uvddox</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">comp</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">computador1</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">computador1</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">computername</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">contabilidade</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cpq28901672019</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">cracks</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">crack</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">eric</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">f-dvb8w73sf78t7</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">filipe-02i2d14a</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">flaviacg</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">helena</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">hermano</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">hnunes01</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">hnunes01</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">home-mt6or4k6l</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">house-pyldfzdzz</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">hvvm9xjz1wzhbkg</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">ibm558097x</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">individu-jid4ez</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">individu-jid4ez</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">ines</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">isabel</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">jcpc-m4kqvro83u</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">jcthc</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">jcthc</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">jesus-83txnx9u8</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">jmrr-8rozz76apo</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">joao-cdqkfh3gfm</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">jorge-0avyhq88a</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">jorge</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">levi-a5n4d52cfj</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">lobo-ee166pqgp0</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">loureiro</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">luis-95modnu830</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">luisa</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nat-7q46e74wygk</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">newton___</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">newton___</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nmbd</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nmbd</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nmbd</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nmbd</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nome-e3vucd6gwq</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nuno</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">nuno</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">o-c4f6hc8efdrzm</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">oscar</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">p40</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pandreia-5mbo1i</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">particul-u9ukxk</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">patrice</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pc1</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pc931196262726</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pc931196262726</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pc_iolanda</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pcmiudos</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pessoal-hanf015</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">posto1</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">privado-edadehn</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">pt-c</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">rakel</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">ricardo-mxokjho</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">richar-8d10ybcn</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">rita-39cm61gbeg</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">roubado</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">rozete-a7amtaee</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">rui-n5tfqykvyff</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">talentoaa</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">talentoaa</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">telmo</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">test-kk74z8p2oe</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">tiago</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">torvalds</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">torvalds</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">torvalds</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">torvalds</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">torvalds</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">user-penacho</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">usila-v3ggbctko</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">utilizad-sg66h6</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">xanita</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">x</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">yr3fp4mcbfipc43</span><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><span style="font-family: Courier New;">A ouvir: Portobello Belle, Dire Straits</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=Jdbbt31ab<wbr />SU</span> <p>&nbsp;</p> 0 linux http://gamito.blogs.sapo.pt/45736.html Tue, 25 Sep 2007 14:02:25 GMT PHP chrooted gamito http://gamito.blogs.sapo.pt/45736.html Na sequ&ecirc;ncia do artigo anterior sobre como correr o MySQl num ambiente <span style="font-style: italic;">chrooted</span>, aqui vai a vez do PHP.<br /><br /><span style="font-family: Courier New;"># gzip -dc apache_1.3.47.tar.gz | tar xvf -</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># gzip -dc php-5.2.3.tar.gz | tar xvf -</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># gzip -dc mod_security_1.95.tar.gz | tar xvf -</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># cp mod_security_1.95/apache1/mod_security.c apache_1.3.37/src/modules/extra/</span><br /><br /><span style="font-family: Courier New;"># cd apache_1.3.37</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># ./configure --prefix=/usr/local/httpd</span><br style="font-family: Courier New;" /><br />Compilar o PHP:<br /><br /><span style="font-family: Courier New;"># cd ../php-5.3.2<br /># ./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.37 --enable-safe-mode (etc. mais op&ccedil;&otilde;es)</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># make</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># make install</span><br style="font-family: Courier New;" /><span class="body"><code><span style="font-family: Courier New;"># cp php.ini-dist /usr/local/lib/php.ini</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># chown root:sys /usr/local/lib/php.ini</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># chmod 644 /usr/local/lib/php.ini</span><br /><br /></code></span>O Apache:<br /><br /><span style="font-family: Courier New;"># cd ../apache_1.3.37</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># ./configure --prefix=/usr/local/httpd --disable-module=all --server-uid=apache --server-gid=apache --enable-module=access --enable-module=log_config --enable-module=dir --enable-module=mime --enable-module=auth --activate-module=src/modules/extra/mod_<wbr />security --enable-module=security --activate-module=src/modules/php5/libph<wbr />p5.a</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># make</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># make install</span><br /><br /><br /><span style="font-family: Courier New;">#chown -R root:sys /usr/local/httpd</span><br /><br />Agora, prepara-se o ambiente <span style="font-style: italic;">chrooted </span>para o Apache com o m&oacute;dulo PHP:<br /><br /><span style="font-family: Courier New;"># cp /usr/local/mysql/lib/mysql/libmysqlclien<wbr />t.so.12 /chroot/httpd/usr/lib/</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># cp /usr/lib/libm.so.2 /chroot/httpd/usr/lib/</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># cp /usr/lib/libz.so.2 /chroot/httpd/usr/lib/</span><br /><br />Adicionamemte, temos que copiar o ficheiro de configura&ccedil;&atilde;o do PHP:<br /><br /><span style="font-family: Courier New;"># umask 022</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># mkdir -p /chroot/httpd/usr/local/lib</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># cp /usr/local/lib/php.ini /chroot/httpd/usr/local/lib/</span><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><span style="font-family: Courier New;"># mkdir </span><span class="body" style="font-family: Courier New;">/chroot/httpd/tmp</span><span style="font-family: Courier New;"><br /># chown -R root.root </span><span class="body" style="font-family: Courier New;">/chroot/httpd/tmp<br /># chmod 1777 /chroot/httpd/tmp<br /><br /></span><span class="body" style="font-family: Verdana;"><code><font size="3"># chroot /chroot/httpd /usr/local/httpd/bin/httpd<br /><br /># ln /tmp/mysql.sock /chroot/httpd/tmp/</font><br /><br /><span style="font-family: Verdana;">Configura&ccedil;&atilde;o do Apache para defesa contra </span><span style="font-style: italic; font-family: Verdana;">cross side scripting</span><span style="font-family: Verdana;"> e SQL </span><span style="font-style: italic; font-family: Verdana;">injection</span><span style="font-family: Verdana;">, atrav&eacute;s do mod_secutity:</span><br style="font-family: Verdana;" /><br /><font size="3">&lt;IfModule mod_security.c&gt;<br />&nbsp;AddHandler application/x-httpd-php .php<br /><br />&nbsp;SecAuditEngine On<br />&nbsp;SecAuditLog logs/audit_log<br />&nbsp;SecFilterScanPOST On<br />&nbsp;SecFilterEngine On<br /><br />&nbsp;SecFilterDefaultAction &quot;deny,log,status:500&quot;<br />&nbsp;SecFilter &quot;&lt;(.|\n)+&gt;&quot;<br /><br />&nbsp;SecFilter &quot;'&quot;<br />&nbsp;SecFilter &quot;\&quot;&quot;<br />&lt;/IfModule&gt;<br /><br /><br /><span style="font-family: Verdana;">Ok, para a pr&oacute;xima, explico como tornar o Apache </span><span style="font-style: italic; font-family: Verdana;">chrooted</span><span style="font-family: Verdana;">, ok ?</span><br style="font-family: Verdana;" /><br /><br />A ouvir: Just Good Friends, Fish.<br />YouTube: http://www.youtube.com/watch?v=ApxexrzQQ<wbr />as</font></code></span> <p style="font-family: Verdana;">&nbsp;</p> 0 linux http://gamito.blogs.sapo.pt/45122.html Sun, 23 Sep 2007 22:58:06 GMT Joomla gamito http://gamito.blogs.sapo.pt/45122.html Estou a fazer o meu novo projecto em Joomla.<br /><br />&Eacute; absolutamente 5 estrelas, tinham-me dito horrores de como construir um site com ele, mas acho que para quem como eu fez o tiroc&iacute;nio em CMS com o Siteseed 1, est&aacute; preparado para enfrentar qualquer outro (desculpa Paulo Laureano Santos, mas tinha que dizer isto :P).<br /><br />S&oacute; &eacute; pena que algumas das extens&otilde;es mais interessantes sejam pagas, mas enfim, j&aacute; percebi que h&aacute; uma verdadeira ind&uacute;stria de volta do Joomla.<br /><br />Mas compensa e recomendo, construir um site com isto &eacute; o mesmo que limpar o rabinho a um beb&eacute;.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: The Carpet Crawlers, Genesis.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">YouTube: http://www.youtube.com/watch?v=ko0hiIYGA<wbr />NU</span> <p>&nbsp;</p> 0 software http://gamito.blogs.sapo.pt/44973.html Sun, 23 Sep 2007 16:49:57 GMT Novo Projecto gamito http://gamito.blogs.sapo.pt/44973.html Estou a come&ccedil;ar um novo projecto, j&aacute; tenho dom&iacute;nio registado e muita coisa feita.<br /><br />E n&atilde;o, n&atilde;o tem nada que ver com blogs :P<br /><br /><br /><span style="font-family: Courier New;">A ouvir: Come As You Are, Nirvana<br />YouTube: http://www.youtube.com/watch?v=aNqAyIijj-Y<br /><br /></span> 0 eu http://gamito.blogs.sapo.pt/44641.html Sun, 23 Sep 2007 11:25:14 GMT MySQL :: It's the ctl, stupid gamito http://gamito.blogs.sapo.pt/44641.html Er... pois, o <span style="font-style: italic;">ctl file</span> normal do MySQL agora n&atilde;o funciona, por isso, aqui vai um para arrancar e parar o MySQL <span style="font-style: italic;">chrooted</span>.<br /><br /><span style="font-family: Courier New;">#!/bin/sh</span><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><span style="font-family: Courier New;">CHROOT_MYSQL=/chroot/mysql</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;"></span><span style="font-family: Courier New;">SOCKET=/tmp/mysql.sock</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">MYSQLD=/usr/local/mysql/libexec/mysqld</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">PIDFILE=/usr/local/mysql/var/`hostname`.p<wbr />id</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">CHROOTUID=/usr/local/sbin/chrootuid</span><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><span style="font-family: Courier New;">echo -n &quot; mysql&quot;</span><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><span style="font-family: Courier New;">case &quot;$1&quot; in</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">start)</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: Courier New;">nohup ${CHROOTUID} ${CHROOT_MYSQL} mysql ${MYSQLD} &gt;/dev/null 2&gt;&amp;1 &amp;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sleep 5 &amp;&amp; ln ${CHROOT_MYSQL}/${SOCKET} </span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">stop)</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kill `cat ${CHROOT_MYSQL}/${PIDFILE}`</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rm -rf ${CHROOT_MYSQL}/${SOCKET}</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">*)</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;&quot;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Usage: `basename $0` {start|stop}&quot; &gt;&amp;2</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 64</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">esac</span><br style="font-family: Courier New;" /><br style="font-family: Courier New;" /><span style="font-family: Courier New;">exit 0</span><br /><br /><br /><span style="font-family: Courier New;">A ouvir: Still Got The Blues, Gary Moore<br />YouTube: http://www.youtube.com/watch?v=wPA4KXKyV<wbr />jU<br /><br /></span> 0 linux http://gamito.blogs.sapo.pt/44315.html Sun, 23 Sep 2007 11:06:40 GMT MySQL :: Just a little tighter, honey gamito http://gamito.blogs.sapo.pt/44315.html No seguimento do artigo sobre o MySQL em ambiente <span style="font-style: italic;">chrooted</span>, ainda h&aacute; mais algumas coisas que podem ser feitas para aumentar a sua seguran&ccedil;a, nomeadamente:<br /><br /> <ul> <li>Desabilitar o acesso remoto:<br /><br />Adicionar ao ficheiro /etc/my.cnf, na sec&ccedil;&atilde;o [mysqld], a linha<br /><br /><span style="font-family: Courier New;">skip-networking</span><br /><br />Se, mesmo assim, for necess&aacute;rio o acesso remoto ao MySQL, por exemplo para efectuar um <span style="font-style: italic;">backup</span>, pode utilizar-se o SSH:<br /><br /><span style="font-family: Courier New;"># ssh mysqlserver /usr/local/mysql/bin/mysqldump -A &gt; backup.sql<br /></span><br /></li> <li>Desabilitar a utiliza&ccedil;&atilde;o do comando LOAD DATA LOCAL INFILE:<br /><br />Adicionar ao /etc/my.cnf a linha<br /><br /><span style="font-family: Courier New;">set-variable=local-infile=0<br /></span><br /></li> <li>Remover a base de dados <span style="font-style: italic;">test</span>, bem como todos os <span style="font-style: italic;">users</span>, excepto o <span style="font-style: italic;">root</span>:<br /><br /><span style="font-family: Courier New;">mysql&gt; drop database test;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">mysql&gt; use mysql;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">mysql&gt; delete from db;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">mysql&gt; delete from user where not (host=&quot;localhost&quot; and user=&quot;root&quot;);</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">mysql&gt; flush privileges;<br /></span><br /></li> <li>Agora, alterar o nome do administrador do MySQL (<span style="font-style: italic;">root</span>) para outro:<br /><br /><span style="font-family: Courier New;">mysql&gt; update user set user=&quot;mydbadmin&quot; where user=&quot;root&quot;;</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">mysql&gt; flush privileges;</span></li> </ul> <br /><span style="font-family: Courier New;">A ouvir: Come Away With Me, Norah Jones<br />YouTube: http://www.youtube.com/watch?v=aBKcKQHZX<wbr />ks<br /><br /></span> 0 linux http://gamito.blogs.sapo.pt/43938.html Sat, 22 Sep 2007 23:28:53 GMT MySQL chrooted gamito http://gamito.blogs.sapo.pt/43938.html Uma coisa que eu costumo fazer sempre nos servidores que instalo &eacute; &quot;chrootar&quot; o MySQL e aplicar-lhe alguns truques (que ficam para outro artigo) para o tornar o mais seguro poss&iacute;vel.<br /><br />Vou assumir um MySQL instalado tal como <a href="http://gamito.blogs.sapo.pt/27665.html">neste artigo que escrevi anteriormente</a> e a funcionar perfeitamente. Para o verificar, executar:<br /><br /># mysql -p<br /><br />Para tudo estar bem, deve aparecer o seguinte:<span class="body"> <pre>mysql&gt; <span style="font-weight: bold;">show databases;</span><br />+----------+<br />| Database |<br />+----------+<br />| mysql |<br />| test |<br />+----------+<br />2 rows in set (0.00 sec)<span class="body"><pre>mysql&gt; <span style="font-weight: bold;">quit;</span></pre> </span><span style="font-family: Verdana;">Adiante para o chroot...<br /><br />&Eacute; necess&aacute;rio criar a seguinte estrutura de direct&oacute;rios:<br /></span><span class="body"><code><br /><font size="3"># mkdir -p /chroot/mysql/dev<br /># mkdir -p /chroot/mysql/etc<br /># mkdir -p /chroot/mysql/tmp<br /># mkdir -p /chroot/mysql/var/tmp<br /># mkdir -p /chroot/mysql/usr/local/mysql/libexec<br /># mkdir -p /chroot/mysql/usr/local/mysql/share/mysql/english</font></code></span><font size="3"><br /></font><br /><span style="font-family: Verdana;">Os direitos de acesso a estes direct&oacute;rios devem ser os seguintes:</span><br /><br /><span class="body"><code><font size="3"># chown -R root:sys /chroot/mysql<br /># chmod -R 755 /chroot/mysql<br /># chmod 1777 /chroot/mysql/tmp</font><br /><br /><span style="font-family: Verdana;">Agora, t&ecirc;m que ser copiados alguns ficheiros para esta estrutura de direct&oacute;rios:</span><br /></code></span><span class="body"><code><br /><font size="3"># cp /usr/local/mysql/libexec/mysqld<br />&nbsp;/chroot/mysql/usr/local/mysql/libexec/<br /># cp /usr/local/mysql/share/mysql/english/errmsg.sys<br />&nbsp;/chroot/mysql/usr/local/mysql/share/mysql/english/<br /># cp /etc/hosts /chroot/mysql/etc/<br /># cp /etc/host.conf /chroot/mysql/etc/<br /># cp /etc/resolv.conf /chroot/mysql/etc/<br /># cp /etc/group /chroot/mysql/etc/<br /># cp /etc/master.passwd /chroot/mysql/etc/passwords<br /># cp /etc/my.cnf /chroot/mysql/etc/</font></code></span><br /><br /><span style="font-family: Verdana;">Dos ficheiros </span><span class="body"><span style="font-family: Verdana;">/chroot/mysql/etc/passwords e /chroot/mysql/etc/group,<br />removem-se todas as linhas, excepto as respeitantes ao MySQL.</span><em style="font-family: Verdana;"><br /><br /></em><span style="font-family: Verdana;">Tem que ser criado um device file especial para o /dev/null:</span></span><span class="body"> <pre><font size="3"># mknod /chroot/mysql/dev/null c 2 2<br /># chown root:sys /chroot/mysql/dev/null<br /># chmod 666 /chroot/mysql/dev/null</font><br /><br /><span style="font-family: Verdana;">E copiar a base de dados dos previl&eacute;gios do MySQL:</span><br /><span class="body"><code><br /><font size="3"># cp -R /usr/local/mysql/var/ /chroot/mysql/usr/local/mysql/var<br /># chown -R mysql:mysql /chroot/mysql/usr/local/mysql/var</font></code></span></pre> </span><span style="font-family: Verdana;">O MySQL est&aacute; pronto a ser executado num ambiente chrooted:</span><br /><br /><font size="3"># <span class="body"><code>chrootuid /chroot/mysql mysql /usr/local/mysql/libexec/mysqld &amp;</code></span></font></pre> </span>Bem, quando tiver pachorra, escrevo um artigo sobre como correr o Apache tamb&eacute;m em ambiente chrooted e como integrar com o PHP e o MySQL de modo a fazer um todo coerente.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: Yet Another Movie, Pink Floyd<br />YouTube: http://www.youtube.com/watch?v=Ep9RTAmH5<wbr />Rw<br /><br /></span> 0 linux http://gamito.blogs.sapo.pt/43555.html Sat, 22 Sep 2007 23:11:21 GMT BASH, stdout e stderr gamito http://gamito.blogs.sapo.pt/43555.html Precisei de fazer um script (backup.sh) corrido pelo <span style="font-style: italic;">cron daemon</span> fazendo com o que o rsync&nbsp; gerasse o maior n&uacute;mero de informa&ccedil;&atilde;o poss&iacute;vel dos respectivos <span style="font-style: italic;">logs </span>(-vv) para um ficheiro &ndash; /var/log/rsync.backup.log<br /><br />Os <span style="font-style: italic;">logs </span>precisavam de combinar o <span style="font-style: italic;">stdout </span>e o <span style="font-style: italic;">stderr</span>, portanto:<br /><br /><span style="font-family: Courier New;"># backup.sh &gt;&gt; /var/log/backup.log 2&gt;&amp;1</span><br /><br />Contudo, apenas queria que o <span style="font-style: italic;">output </span>do <span style="font-style: italic;">stderr </span>fosse para o <span style="font-style: italic;">cron</span>, para em caso de erro, me ser enviado em e-mail.<br /><br />Ent&atilde;o:<br /><br /><span style="font-family: Courier New;"># (./backup.sh &gt; /var/log/backup.log) 2&gt;&amp;1 | tee -a /var/log/backup.log</span><br style="font-family: Courier New;" /><br />o que propaga o stderr para o cron e a restante tralha do <span style="font-style: italic;">stdout </span>para o ficheiro de logs :)<br /><br />Agora s&oacute; me falta organizar a informa&ccedil;&atilde;o, &eacute; uma chatice que o <span style="font-style: italic;">stdout </span>e o <span style="font-style: italic;">stderr </span>n&atilde;o sejam sincronizados.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: Sorrow, Pink Floyd<br />YouTube: http://www.youtube.com/watch?v=njQtAC6EH<wbr />8E<br /><br /></span> 0 linux http://gamito.blogs.sapo.pt/43509.html Fri, 21 Sep 2007 16:29:06 GMT 4 kb stack ou 8kb stack gamito http://gamito.blogs.sapo.pt/43509.html O valor por omiss&atilde;o para o <span style="font-style: italic;">stack size</span> no Linux s&atilde;o 8 kb.<br />Note-se que este &eacute; o valor para o <span style="font-style: italic;">kernel stack</span>, n&atilde;o para o <span style="font-style: italic;">user-space stack</span>.<br /><br />Contudo, na configura&ccedil;&atilde;o do Kernel, este valor pode ser alterado para 4kb, na sec&ccedil;&atilde;o <span style="font-style: italic;">Kernel hacking</span>:<br /><br /> <div style="text-align: center;"><img border="0" src="http://fotos.sapo.pt/azoigueiro/pic/0003f893" style="border-color: black;" alt="" /><br /><br /><img border="0" src="http://fotos.sapo.pt/azoigueiro/pic/0003gdb5" style="border-color: black;" alt="" /></div> <br />Em que ficamos ent&atilde;o ? Qual o melhor valor para o <span style="font-style: italic;">read/write size</span> ?<br /><br />V&aacute;rias opera&ccedil;&otilde;es requerem ou s&atilde;o mais eficientes quando lidam com tamanhos m&uacute;ltiplos do <span style="font-style: italic;">block size</span>.<br /> <pre wrap="" style="font-family: Verdana;">Diferentes opera&ccedil;&otilde;es podem envolver diferentes <span style="font-style: italic;">block sizes</span>; e.g. a <span style="font-style: italic;">page size</span> da RAM n&atilde;o &eacute; necessariamente<br />a mesma da do <span style="font-style: italic;">block size</span> do disco, portanto, opera&ccedil;&otilde;es<br />que envolvam c&oacute;pia de dados entre disco e RAM<br />devem idealmente usar valores que sejam m&uacute;ltiplos de ambos (i.e. um m&uacute;ltiplo do maior dos dois).<br /><br />Tamb&eacute;m, a <span style="font-style: italic;">page size</span> da RAM pode variar entre arquitecturas de<br /> CPU, enquanto que o <span style="font-style: italic;">block size</span> dos discos pode variar com <br />os <span style="font-style: italic;">filesystems </span>utilizados ou mesmo em diferentes parti&ccedil;&otilde;es<br />&nbsp;do mesmo <span style="font-style: italic;">filesystem</span>.<br /><br />Quaisquer tamanhos relevantes, podem ser obtidos via uma <br />macro <span style="font-style: italic;">standard </span>ou atrav&eacute;s do sysconf() ou fo [f]pathconf().<br /><br />Quanto a <span style="font-style: italic;">networking</span>, n&atilde;o opera em blocos, portanto, n&atilde;o interessa.<br /><br /><br /><span style="font-family: Courier New;">A ouvir: This Is The Sea - Waterboys<br />YouTube: http://www.youtube.com/watch?v=gTTKcrbQog8<br style="font-family: Verdana;" /><br /></span></pre> 0 linux http://gamito.blogs.sapo.pt/43260.html Fri, 21 Sep 2007 12:42:29 GMT A funny guy... gamito http://gamito.blogs.sapo.pt/43260.html in qmail's mailing list:<br /><br /><span style="font-family: Courier New;">&quot;Hi, </span><br style="font-family: Courier New;" /> <br style="font-family: Courier New;" /><span style="font-family: Courier New;">I want to send emails using Qmail server in asp.Net Webapplication (windows platform).Is it possible to migrate Qmail in windows&nbsp; platform.Can you please assist me on the same.Your reply&nbsp; would be more than appreciated. </span><br style="font-family: Courier New;" /> <br style="font-family: Courier New;" /><span style="font-family: Courier New;">Thanks in Advance.</span><br style="font-family: Courier New;" /><span style="font-family: Courier New;">*******************&quot;</span><br style="font-family: Courier New;" /><br /><br style="font-family: Courier New;" /><span style="font-family: Courier New;">A ouvir: Hoochie Coochie Man, Eric Clapton<br />YouTube: http://www.youtube.com/watch?v=4z4fxDOd7<wbr />IE<br /><br /></span> 0 linux http://gamito.blogs.sapo.pt/42788.html Fri, 21 Sep 2007 12:32:24 GMT Truques, Minas e Alçapões :: II gamito http://gamito.blogs.sapo.pt/42788.html Fazer um rsync para <span style="font-style: italic;">backup </span>de dados, por exemplo, com SSH &eacute; muito simples.<br /><br />Temos que ter a nossa chave p&uacute;blica no servidor remoto.<br /><br />Suponhamos que tenho que fazer um <span style="font-style: italic;">backup </span>dos meus e-mails:<br /><br /><span style="font-family: Courier New;"># /usr/bin/rsync -azq -e &quot;ssh -i /root/rsync/chave-mirror-rsync&quot;&nbsp;&nbsp; gamito@192.168.0.102/var/spool/mail/gami<wbr />to/ /var/spool/mail/gamito/<br /><br /><br />A ouvir: Sorrow, Pink Floyd<br />YouTube: </span><span style="font-family: Courier New;">http://www.youtube.com/watch?v=njQtAC6EH<wbr></wbr>8E</span><br /><span style="font-family: Courier New;"><br /><br /></span> 0 linux