Category Archives: Linux

Testing Debian KFreeBSD

# uname -a
GNU/kFreeBSD debian 8.1-1-686 #0 Tue Jan  4 17:59:05 UTC 2011 i686 i386 Intel(R) Atom(TM) CPU N550   @ 1.50GHz GNU/kFreeBSD

Update

# apt-get update
Ign cdrom://[Debian GNU/Linux 6.0.0 _Squeeze_ – Official kfreebsd-i386 CD Binary-1 20110205-22:58] squeeze Release.gpg
Media change: please insert the disc labeled
‘Debian GNU/Linux 6.0.0 _Squeeze_ – Official kfreebsd-i386 CD Binary-1 20110205-22:58’
in the drive ‘/media/cdrom/’ and press enter

hit CTRL+C to stop end edit /etc/apt/sources.list

# nano /etc/apt/sources.list

give # in front of deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ – Official kfreebsd-i386 CD Binary-1 20110205-22:58]/ squeeze main line.

Re try one more time.

t# apt-get update
Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Get:2 http://ftp.us.debian.org squeeze Release.gpg [1,671 B]
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://ftp.us.debian.org/debian/ squeeze/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_US
Hit http://security.debian.org squeeze/updates Release
Ign http://ftp.us.debian.org/debian/ squeeze/main Translation-en_US
Hit http://security.debian.org squeeze/updates/main Sources
Get:3 http://ftp.us.debian.org squeeze-updates Release.gpg [836 B]
Hit http://security.debian.org squeeze/updates/main kfreebsd-i386 Packages
Ign http://ftp.us.debian.org/debian/ squeeze-updates/main Translation-en
Ign http://ftp.us.debian.org/debian/ squeeze-updates/main Translation-en_US
Hit http://ftp.us.debian.org squeeze Release
Get:4 http://ftp.us.debian.org squeeze-updates Release [113 kB]
Hit http://ftp.us.debian.org squeeze/main Sources
Hit http://ftp.us.debian.org squeeze/main kfreebsd-i386 Packages
Hit http://ftp.us.debian.org squeeze-updates/main Sources/DiffIndex
Hit http://ftp.us.debian.org squeeze-updates/main kfreebsd-i386 Packages/DiffIndex
Hit http://ftp.us.debian.org squeeze-updates/main kfreebsd-i386 Packages
Fetched 117 kB in 12s (9,015 B/s)
Reading package lists… Done
#

Upgrade

# apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be upgraded:
base-files bind9-host dnsutils exim4 exim4-base exim4-config exim4-daemon-light host isc-dhcp-client isc-dhcp-common
kfreebsd-image-8-686 kfreebsd-image-8.1-1-686 libbind9-60 libdns69 libisc62 libisccc60 libisccfg62 liblwres60 python
python-minimal tzdata
21 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.8 MB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue [Y/n]? y

Get:1 http://ftp.us.debian.org/debian/ squeeze/main base-files kfreebsd-i386 6.0squeeze1 [63.3 kB]
Get:2 http://security.debian.org/ squeeze/updates/main isc-dhcp-client kfreebsd-i386 4.1.1-P1-15+squeeze2 [253 kB]
Get:3 http://ftp.us.debian.org/debian/ squeeze-updates/main tzdata all 2011d-0squeeze1 [767 kB]
Get:4 http://security.debian.org/ squeeze/updates/main isc-dhcp-common kfreebsd-i386 4.1.1-P1-15+squeeze2 [314 kB]
Get:5 http://security.debian.org/ squeeze/updates/main dnsutils kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [153 kB]
Get:6 http://ftp.us.debian.org/debian/ squeeze/main python all 2.6.6-3+squeeze6 [168 kB]
Get:7 http://security.debian.org/ squeeze/updates/main bind9-host kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [67.2 kB]
Get:8 http://security.debian.org/ squeeze/updates/main libisc62 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [153 kB]
Get:9 http://ftp.us.debian.org/debian/ squeeze/main python-minimal all 2.6.6-3+squeeze6 [33.8 kB]
Get:10 http://ftp.us.debian.org/debian/ squeeze/main kfreebsd-image-8.1-1-686 kfreebsd-i386 8.1+dfsg-8 [10.9 MB]
Get:11 http://security.debian.org/ squeeze/updates/main libdns69 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [664 kB]
Get:12 http://security.debian.org/ squeeze/updates/main libisccc60 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [30.8 kB]
Get:13 http://security.debian.org/ squeeze/updates/main libisccfg62 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [50.3 kB]
Get:14 http://security.debian.org/ squeeze/updates/main liblwres60 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [50.0 kB]
Get:15 http://security.debian.org/ squeeze/updates/main host all 1:9.7.3.dfsg-1~squeeze1 [17.8 kB]
Get:16 http://security.debian.org/ squeeze/updates/main libbind9-60 kfreebsd-i386 1:9.7.3.dfsg-1~squeeze1 [38.3 kB]
Get:17 http://security.debian.org/ squeeze/updates/main exim4-config all 4.72-6+squeeze1 [464 kB]

…………………….

………………………………

………………………………………

Setting up exim4-daemon-light (4.72-6+squeeze1) …
Starting MTA: exim4.
Setting up exim4 (4.72-6+squeeze1) …
Setting up python-minimal (2.6.6-3+squeeze6) …
Setting up python (2.6.6-3+squeeze6) …
Setting up kfreebsd-image-8.1-1-686 (8.1+dfsg-8) …
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 8.1-1-686 /boot/kfreebsd-8.1-1-686.gz
Generating grub.cfg …
Found kernel of FreeBSD: /boot/kfreebsd-8.1-1-686.gz
Found kernel module directory: /lib/modules/8.1-1-686
grep: /proc/swaps: No such file or directory
done
Setting up kfreebsd-image-8-686 (8.1+dfsg-8) …
#

# uname -a
GNU/kFreeBSD debian 8.1-1-686 #0 Tue Jan  4 17:59:05 UTC 2011 i686 i386 Intel(R) Atom(TM) CPU N550   @ 1.50GHz GNU/kFreeBSD
#

Great.

How to install Debian KFreeBSD

This post got delayed very long, I’ve already create the video since Februari 22 2011 but still have no time to publish. I just curious on how Debian and FreeBSD work in one place called Debian KFreBSD and as always everything just start from installation step and that is the main reason why I write this post.

Lets get start!

Get latest version of Debian KFreeBSD  and do installation with VMWare.

Choose Default Install.

Photobucket

Choose English as installation language.

Photobucket

Select Location : I choose United States.

Continue reading

Downgrade php version from 5.3 to 5.2 on Ubuntu 10.10 x86

New Server has come and again I must downgrade php version to 5.2 due to some problem on web application. I use same method I use for Ubuntu 10.04 for Ubuntu 10.10 x86.

Let start

Download required files for PHP 5.2 from Ubuntu Karmic repository

#cd /etc/apt/sources.list.d

#wget http://randyfay.com/sites/default/files/karmic_0.list

# cd /etc/apt/preferences.d/

#wget http://randyfay.com/sites/default/files/php_1.

# mv php_1. php

Find out installed PHP version

# php -v

PHP 5.3.3-1ubuntu9.1 with Suhosin-Patch (cli) (built: Oct 15 2010 14:00:18)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
#

# dpkg –get-selections | grep php
libapache2-mod-php5                             install
php-db                                          install
php-pear                                        install
php5                                            install
php5-cli                                        install
php5-common                                     install
php5-gd                                         install
php5-mcrypt                                     install
php5-mysql                                      install
php5-xsl                                        install

Delete those PHP with apt-get remove

# apt-get remove libapache2-mod-php5 php-db php-pear php5 php5-cli php5-common php5-gd php5-mcrypt php5-mysql php5-xsl

# apt-get autoremove

Add php5-mcrypt

# nano /etc/apt/preferences.d/php

put these lines :

Package: php5-mcrypt
Pin: release a=karmic
Pin-Priority: 991

at the bottom.

Update repository and reinstall PHP

#apt-get update

#apt-get install php5 libapache2-mod-php5 php-db php5-cli php5-common php5-xsl php5-gd php-pear php5-mysql php5-curl php5-memcache php5-mcrypt

Check PHP version

# php -v

PHP 5.2.10-2ubuntu6 with Suhosin-Patch 0.9.7 (cli) (built: Oct 23 2009 16:30:10)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
#

Great.

PHP successfully downgrade to 5.2.10 on Ubuntu 10.10 x86

Downgrade php version from 5.3 to 5.2 on Ubuntu 10.04 i386

I have chance to install new server with standard requirement. SSH, Bind9 and LAMP.

All process is smooth using i386 version of Ubuntu 10.04 but my friend complain about his web application not work well and after little investigation it looks like due to PHP version.

Quick search on Google lead me to RandyFay post about downgrade PHP version to 5.2 on Ubuntu 10.04

I follow the method and rewrite it with a few things that might useful for newbie like me :-)

Note :

I use ubuntu 10.04 i386 and username : alam

Let start

Download required files for PHP 5.2 from Ubuntu Karmic repository

# wget http://randyfay.com/sites/default/files/karmic_0.list

# mv /home/pusda/karmic_0.list /etc/apt/sources.list.d

# wget http://randyfay.com/sites/default/files/php_1.

# mv /home/pusda/php_1. /etc/apt/preferences.d/php

Find out installed PHP version

# dpkg –get-selections | grep php

libapache2-mod-php5                             install
php-db                                          install
php-pear                                        install
php5                                            install
php5-cli                                        install
php5-common                                     install
php5-gd                                         install
php5-mcrypt                                     deinstall
php5-mysql                                      install

Delete those PHP with apt-get remove

# apt-get remove libapache2-mod-php5 php-db php-pear php5 php5-cli php5-common php5-gd php5-mcrypt php5-mysql

# apt-get autoremove

Update repository and reinstall PHP

#apt-get update

#apt-get install php5 libapache2-mod-php5 php-db php5-cli php5-common php5-xsl php5-gd php-pear php5-mysql php5-curl php5-memcache

Check PHP version

# php -v

PHP Warning:  PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20060613+lfs/mcrypt.so’ – /usr/lib/php5/20060613+lfs/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.2.10-2ubuntu6 with Suhosin-Patch 0.9.7 (cli) (built: Oct 23 2009 16:30:10)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
#

Dealing with php5-mcrypt error

# apt-get install php5-mcrypt

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php5-mcrypt: Depends: phpapi-20090626+lfs
E: Broken packages
#

Quick solution for php5-mcrypt installation error

# nano /etc/apt/preferences.d/php

put these lines :

Package: php5-mcrypt
Pin: release a=karmic
Pin-Priority: 991

at the bottom.

Try reinstall php5-mcrypt

# apt-get install php5-mcrypt

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libmcrypt4
Suggested packages:
libmcrypt-dev mcrypt
The following NEW packages will be installed:
libmcrypt4 php5-mcrypt
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 91.4kB of archives.
After this operation, 332kB of additional disk space will be used.
Do you want to continue [Y/n]?y

Recheck php version after install php5-mcrypt

# php -v

PHP 5.2.10-2ubuntu6 with Suhosin-Patch 0.9.7 (cli) (built: Oct 23 2009 16:30:10)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
#

Great.

PHP successfully downgrade to 5.2.10

Upgrade Zimbra Network Edition from 6.0.1 to 6.0.8

Stop Zimbra Service

su – zimbra

$ zmcontrol stop
Host mail.yourdomain.com
Stopping stats…Done.
Stopping mta…Done.
Stopping spell…Done.
Stopping snmp…Done.
Stopping archiving…Done.
Stopping antivirus…Done.
Stopping antispam…Done.
Stopping imapproxy…Done.
Stopping memcached…Done.
Stopping mailbox…Done.
Stopping convertd…Done.
Stopping logger…Done.
Stopping ldap…Done.
$
$ exit
logout
#

Backup Zimbra

# cd /opt
# tar cvzf zimbra.tar.gz zimbra

Check Zimbra Version

$ zmcontrol -v

Release 6.0.1_GA_1816.UBUNTU8 UBUNTU8 NETWORK edition.

Check License
$ zmlicense -c
license is in grace period

$ zmlicense -c
license is OK

Continue reading