domingo, 15 de fevereiro de 2009

Debian 5 lançado


Após quase 2 anos, finalmente foi lançada o Debian 5.0 (Lenny).
Segue o release oficial:

The Debian Project is pleased to announce the official release of DebianGNU/Linux version 5.0 (codenamed "Lenny") after 22 months of constant development. Debian GNU/Linux is a free operating system which supports a total of twelve processor architectures and includes the KDE, GNOME, Xfce, and LXDE desktop environments. It also features compatibility with the FHS v2.3 and software developed for version 3.2 of the LSB.

Debian GNU/Linux runs on computers ranging from palmtops and handheld systems to supercomputers, and on nearly everything in between. A total of twelve architectures are supported: Sun SPARC (sparc), HP Alpha (alpha), Motorola/IBM PowerPC (powerpc), Intel IA-32 (i386), IA-64 (ia64), HP PA-RISC (hppa), MIPS (mips, mipsel), ARM (arm, armel), IBM S/390 (s390), and AMD64 and Intel EM64T (amd64).

Debian GNU/Linux 5.0 "Lenny" adds support for Marvell's Orion platform which is used in many storage devices. Supported storage devices include the QNAP Turbo Station series, HP Media Vault mv2120, and Buffalo Kurobox Pro. Additionally, "Lenny" now supports several Netbooks, in particular the Eee PC by Asus. "Lenny" also contains the build tools for Emdebian which allow Debian source packages to be cross-built and shrunk to suit embedded ARM systems.

Debian GNU/Linux 5.0 "Lenny" includes the new ARM EABI port, "armel". This new port provides a more efficient use of both modern and future ARM processors. As a result, the old ARM port (arm) has now been deprecated.

This release includes numerous updated software packages, such as the K Desktop Environment 3.5.10 (KDE), an updated version of the GNOME desktop environment 2.22.2, the Xfce 4.4.2 desktop environment, LXDE 0.3.2.1, the GNUstep desktop 7.3, X.Org 7.3, OpenOffice.org 2.4.1, GIMP 2.4.7, Iceweasel 3.0.6 (an unbranded version of Mozilla Firefox), Icedove 2.0.0.19 (an unbranded version of Mozilla Thunderbird), PostgreSQL 8.3.6, MySQL 5.0.51a, GNU Compiler Collection 4.3.2, Linux kernel version 2.6.26, Apache 2.2.9, Samba 3.2.5, Python 2.5.2 and 2.4.6, Perl 5.10.0, PHP 5.2.6, Asterisk 1.4.21.2, Emacs 22, Inkscape 0.46, Nagios 3.06, Xen Hypervisor 3.2.1 (dom0 as well as domU support), OpenJDK 6b11, and more than 23,000 other ready-to-use software packages (built from over 12,000 source packages).

With the integration of X.Org 7.3 the X server autoconfigures itself with most hardware. Newly introduced packages allow the full support of NTFS filesystems and the use of most multimedia keys out of the box. Support for Adobe(R) Flash(R) format files is available via the swfdec or Gnash plugins. Overall improvements for notebooks have been introduced, such as out of the box support of CPU frequency scaling. For leisure time several new games have been added, including puzzle games as well as first-person shooters. Also notable is the introduction of "goplay", a graphical games browser offering filters, search, screenshots and descriptions for games in Debian.

The availability and updates of OpenJDK, GNU Java compiler, GNU Java bytecode interpreter, Classpath and other free versions of Sun's Java technology, into Debian GNU/Linux 5.0 allow us to ship Java-based applications in Debian's "main" repository.

Further improvements in system security include the installation of available security updates before the first reboot by the Debian Installer, the reduction of setuid root binaries and open ports in the standard installation, and the use of GCC hardening features in the builds of several security-critical packages. Various applications have specific improvements, too. PHP for example is now built with the Suhosin hardening patch.

For non-native English speaking users the package management systems now support translated package descriptions and will automatically show the description of a package in the native language of the user, if available.

Debian GNU/Linux can be installed from various installation media such as DVDs, CDs, USB sticks and floppies, or from the network. GNOME is the default desktop environment and is contained on the first CD. Other desktop environments - KDE, Xfce, or LXDE - can be installed through two new alternative CD images. Again available with Debian GNU/Linux 5.0 are multi-arch CDs and DVDs supporting installation of multiple architectures from a single disc; and this release adds Blu-ray Discs, allowing the archive for an entire architecture to be shipped on a single BD.

In addition to the regular installation media, Debian GNU/Linux can now also be directly used without prior installation. The special images used, known as live images, are available for CDs, USB sticks, and netboot setups. Initially, these are provided for the amd64 and i386 architectures only.

The installation process for Debian GNU/Linux 5.0 has been improved in many ways: among many other improvements, support for installation from more than one CD or DVD has been restored, firmware required by some devices can be loaded by using removable media, and installations via Braille display are supported. The installer boot process has also received much attention: a graphical menu can be used to choose front-ends and desktop environments, and to select expert or rescue mode. The installation system for Debian GNU/Linux has now been translated to 63 languages.

Debian GNU/Linux can be downloaded right now via bittorrent (the recommended way), jigdo or HTTP; see Debian GNU/Linux on CDs [1] for further information. It will soon be available on DVD, CD-ROM and Blu-ray Disc from numerous vendors [2], too.

Upgrades to Debian GNU/Linux 5.0 from the previous release, Debian GNU/Linux 4.0 (codenamed "Etch") are automatically handled by the aptitude package management tool for most configurations, and to a certain degree also by the apt-get package management tool. As always, Debian GNU/Linux systems can be upgraded painlessly, in place, without any forced downtime, but it is strongly recommended to read the release notes [3] for possible issues, and for detailed instructions on installing and upgrading. The release notes will be further improved and translated to additional languages in the weeks after the release.

1: http://www.debian.org/CD/
2: http://www.debian.org/CD/vendors
3: http://www.debian.org/releases/lenny/releasenotes


O interessante é falarem em pacotes atualizados como KDE 3.5.10 e OpenOffice.org 2.4.1 (só pra citar alguns) quando já temos por aí o KDE 4.2 e o OpenOffice.org 3.0.1 , mas enfim, estamos falando do Debian não é ? ;-)

De qualquer maneira, o Debian ainda é uma ótima alternativa para instalação em servidores, pois sabemos que o seu time de desenvolvimento tem como principais preocupações a segurança e estabilidade dos sistemas.

Recomendado !

sábado, 14 de fevereiro de 2009

Configurando Claro 3G no Ubuntu com Modem USB MF622

Me deparei hoje com um modem 3G da Claro e tinha de fazê-lo funcionar no Linux.

Depois de algumas pesquisas e testes, desenvolvi um rápido tutorial para resolver a questão. Esse tutorial serve especificamente para o modem USB MF622.

Configuração do WvDial:

Para conectar via PPP, resolvi usar o software Wv Dial (apt-get install wvdial). Para isso criei o arquivo /etc/wvdial.conf com o seguinte conteúdo:

[Dialer Defaults]
Carrier Check = off
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Password = claro
Ask Password = 0
Check Def Route = 1
Phone = *99***1#
Idle Seconds = 0
Modem Type = Analog Modem
Stupid Mode = 1
Compuserve = 0
Baud = 460800
Auto DNS = off
Dial Command = ATDT
Modem = /dev/ttyUSB0
ISDN = 0
Username = claro

[Dialer claro3g]
Stupid Mode = on
Password = claro
Auto Reconnect = off
Username = claro
Phone = *99***1#

Os dados de usuário, senha e número do telefone são padrões da Claro, não necessitando alteração. O que pode ser necessário alterar nesse arquivo será o device do modem, que normalmente é /dev/ttyUSB0.

Script de inicialização:

Criei o arquivo /etc/init.d/claro3g.sh com o seguinte conteúdo:

#! /bin/bash

# Script para inicializar modem 3G MF 622
#
# Atenção:
# O modem precisa estar plugado ao computador durante o boot
#

echo Carregando driver do Modem 3G...
echo
/sbin/modprobe usbserial vendor=0x19d2 product=0x0001

sleep 5

echo Conectando ao 3G...
echo
wvdial -C /etc/wvdial.conf &

É preciso dar permissão de execução para o script. Para isso use o seguinte comando:

chmod +x /etc/init.d/claro3g.sh

Rode também o seguinte comando para colocar o script na inicialização do sistema:

update-rc.d claro3g.sh defaults 99

Voilá.
Basta agora reiniciar seu computador com seu modem plugado que ele irá automaticamente ser reconhecido e a conexão irá subir, gerando um device pppX (ppp0, caso não haja mais nenhuma conexão PPP rodando em seu computador)

PS1: só consegui fazer o modem funcionar se ele estiver plugado antes de iniciar o computador. As tentativas de plugá-lo após o micro ter iniciado foram todas em vão. Existem várias pessoas reportando tal fato na rede e parece que isso é uma questão específica desse modem.

PS2: caso você desplugue o modem e tente novamente plugá-lo ele não irá mais responder. Para que ele volte a funcionar é preciso que o micro seja reiniciado (obedecendo o que consta no item acima)

PS3: testei o método com sucesso também no Mandriva 2008. Acredito que qualquer distro com wvdial e um kernel mais atualizado deve suportar a conexão.

segunda-feira, 2 de fevereiro de 2009

Deletando mensagens da fila do Postfix usando palavras chave

Há muito tempo uso um script (nomeado postdel), que é muito útil para deletar e-mails da fila do Postfix usando palavras chave, o que agiliza incrivelmente essa operação, se comparado ao padrão de deletar por queueID da mensagem.

Como vi hoje alguém na lista do Postfix perguntando por algo similar, resolvi compartilhar aqui o script (que é de autoria de André Galvani).

 #!/usr/bin/perl
#
# Apaga mensagens na fila do Postfix
#
# Andre Galvani
# 2004/02/17

$regexp = $ARGV[0] || help();

@postqueue = `/usr/sbin/postqueue -p`;

for (@postqueue) {
if (/^(\w+)(\*|\!)?\s/) {
$queue_id = $1;
}
if($queue_id) {
if (/$regexp/i) {
$queue{$queue_id} = 1;
$queue_id = "";
}
}
}

open(POSTSUPER,"|/usr/sbin/postsuper -d -") || die "couldn't open postsuper" ;
foreach (keys %queue) {
print POSTSUPER "$_\n";
}
close(POSTSUPER);

sub help {
print "\n Use: $0 \n\n";
print " Exemplo:\n";
print " $0 sp.*\@msn.com.br\n\n";
print " Obs.: Pode ser usado com regexp syntax.\n\n";
print "\n";
exit;
}


Boa diversão pra todos :-)