Monthly Archives: January 2011

update: Debian 4 etch -> 5 lenny

It is reccomended to mount disks by UUID.
Several ways to get UUID info.
$ ls -l /dev/disk/by-uuid
more trustworthy info:
$ blkid /dev/sda6
output example:
/dev/sda6: UUID="bdddb5e7-04d0-4ae1-86be-aef5ade3b6a6" SEC_TYPE="ext2" TYPE="ext3"
Edit /boot/grub/menu.lst:
# kopt=root=/dev/hda6 ro
should be changed to:
# kopt=root=UUID=bdddb5e7-04d0-4ae1-86be-aef5ade3b6a6 ro
Edit /etc/fstab. Example:
/dev/hda6 / ext3 defaults,errors=remount-ro 0 1
should be changed to:
UUID=bdddb5e7-04d0-4ae1-86be-aef5ade3b6a6 / ext3 defaults,errors=remount-ro 0 1

Do not forget about possibility of nic rename by udev.

1. Create backup:
tar -vcpzf /home/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/home --exclude=/mnt --exclude=/sys --exclude /var/cache/apt/archives /

Make sure etch is updated.
Check for unfinished business: aptitude, g.
Check: /etc/apt/preferences/.
dpkg --audit
aptitude search "~ahold" | grep "^.h"
dpkg --get-selections | grep hold

edit /etc/apt/sources.list:
deb lenny main
deb-src lenny main
deb lenny/updates main
deb-src lenny/updates main
deb lenny/volatile main
deb-src lenny/volatile main

script -t 2>~/upgrade-lenny.time -a ~/upgrade-lenny.script
aptitude update
aptitude -y -s -f --with-recommends dist-upgrade
aptitude install aptitude apt dpkg
aptitude search "?false"

optional step, specific for webhosting server:
aptitude install proftpd nginx
aptitude install postfix
aptitude install apache2 apache2-mpm-prefork apache2.2-common apache2-suexec-custom
update custom suexec
copy new cgi: php5.2.latest and php5.3.latest

aptitude safe-upgrade
aptitude dist-upgrade
dpkg -l "linux-image*" | grep ^ii

Rebuild perl modules

Compile PHP 5.3 @ Debian 5 Lenny

apt-get install -y mysql-client libmysqlclient15-dev

Ставим зависимости:

apt-get install -y libtidy-dev curl libcurl4-openssl-dev libcurl3 libcurl3-gnutls zlib1g zlib1g-dev libxslt1-dev libzip-dev libzip1 libxml2 libsnmp-base libsnmp15 libxml2-dev libsnmp-dev libjpeg62 libjpeg62-dev libpng12-0 libpng12-dev zlib1g zlib1g-dev libfreetype6 libfreetype6-dev libbz2-dev libxpm-dev libmcrypt-dev libmcrypt4 sqlite3 bzip2 build-essential libreadline5-dev libedit-dev libc-client2007b libc-client-dev krb5-kdc openssl librecode-dev libt1-dev t1lib-bin libmysqlclient-dev unixodbc-dev libpspell-dev gawk


cd /usr/src
tar -xf php-5.3.3.tar.gz
cd php-5.3.3
./configure -prefix=/opt/php53 -with-mysql=/usr -with-mysqli=/usr/bin/mysql_config -with-tidy=/usr -with-curl=/usr/bin -with-curlwrappers -with-openssl-dir=/usr -with-zlib-dir=/usr -enable-mbstring -with-xpm-dir=/usr -with-pdo-mysql=/usr -with-xsl=/usr -with-ldap -with-xmlrpc -with-iconv-dir=/usr -with-snmp=/usr -enable-exif -enable-calendar -with-bz2=/usr -with-mcrypt=/usr -with-gd -with-jpeg-dir=/usr -with-png-dir=/usr -with-zlib-dir=/usr -with-freetype-dir=/usr -enable-mbstring -enable-zip -with-pear -with-imap -with-kerberos -with-imap-ssl -with-imagick -with-readline -with-libedit
make install