old-releases.ubuntu.com vs us.archive.ubuntu.com

As copy paste user I never realized the difference between that address :us.archive.ubuntu.com

and

old-releases.ubuntu.com

Yes, old-release hold old version ubuntu that not supported any longer. I see that when I need to install php5-curl on Maverick and I get 404 message.

Change sources.list entry from us.archive.ubuntu.com to old-releases.ubuntu.com give me php5-curl 🙂

# apt-get install php5-curl
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libfreeradius2 freeradius-common freeradius-utils libperl5.10
Use ‘apt-get autoremove’ to remove them.
The following NEW packages will be installed:
php5-curl
0 upgraded, 1 newly installed, 0 to remove and 125 not upgraded.
Need to get 25.5kB of archives.
After this operation, 127kB of additional disk space will be used.
Install these packages without verification [y/N]? y

Check install :

# dpkg -l | grep curl
ii  libcurl3                        7.21.0-1ubuntu1                   Multi-protocol file transfer library (OpenSSL)
ii  libcurl3-gnutls                 7.21.0-1ubuntu1                   Multi-protocol file transfer library (GnuTLS)
ii  php5-curl                       5.2.10.dfsg.1-2ubuntu6            CURL module for php5

don’t forget to restart apache to get into business.

Testing Newrelic on Ubuntu Server

I have chance to try newrelic software. Its advance monitoring service and analysis in one place.

As they said “application performance management and monitoring”.

After sign up for free account I continue to deploy it on Ubuntu server (most of my server use freeBSD but I prefer to try it on Linux based system first).

The process is easy and straightforward as you can see from the picture :

newrelic1

 

The only problem is PHP version since I downgrade it for compatible issue.

# 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

Continue

# wget -O - http://download.newrelic.com/548C16BF.gpg | apt-key add -

# nano /etc/apt/sources.list.d/newrelic.list

enter these line :

deb http://apt.newrelic.com/debian/ newrelic non-free

deploy newrelic agent:

# apt-get update

# apt-get install newrelic-php5

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
newrelic-daemon newrelic-php5-common
The following NEW packages will be installed:
newrelic-daemon newrelic-php5 newrelic-php5-common
0 upgraded, 3 newly installed, 0 to remove and 124 not upgraded.
Need to get 12.2 MB of archives.
After this operation, 31.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

# newrelic-install install

new screen will show up

New Relic PHP Agent Installation (interactive mode)
===================================================
In order for the New Relic agent to function correctly it requires a license
key. Please enter that key now. If you do not have your license key handy you
can add it to your INI file(s) later. Please be aware that the license key you
specify here will be installed in the default INI files, and will be the key
used for any virtual host or directory / application that does not over-ride
the key on a per-host or per-directory basis. This is only relevant if you run
a multi-tenant site. Please contact [email protected] if you run such a
site and have any questions.

If you are upgrading from a previous version please leave this blank. Please
also note that the key you enter here will not replace any existing key in
your INI file(s). It applies only to newly created INI files or INI files that
have not been modified by this script before.

Enter New Relic license key (or leave blank):

Just follow on screen guide.

Then you’ll see this message :

New Relic is now installed on your system. Congratulations!

The last step before you will start seeing data in your account is to restart
your web server or servers, or whatever environment hosts the PHP you wish to
monitor. For example, you may need to restart Apache or nginx, or if you are
using php-fpm and FastCGI, you will need to restart php-fpm. If you installed
New Relic into multiple locations you may have multiple PHP hosts to restart.
If everything is working properly you should see the following two log files:

/var/log/newrelic/newrelic-daemon.log
/var/log/newrelic/php_agent.log

Now you should create a simple test php script that contains the line:

<?php phpinfo(); ?>

and point your browser at the test script, and you should see the New Relic
extension and its settings. If you still do not see those log files or data in
your account please contact our support staff at [email protected] and be
sure to include the following file in your bug report:

/tmp/nrinstall-20130420-105849-26070.tar

Thank you for choosing New Relic!

Checking log presence :

# ls -l /var/log/newrelic | grep log

-rw-rw-rw- 1 root root 997 2013-04-20 11:02 newrelic-daemon.log
-rw-r–r– 1 root root 3303 2013-04-20 11:01 php_agent.log

Yes,log file is exist.

newrelic2

 

phpinfo() also show information about newrelic.

My newrelic dashboard now give many information :

newrelic3

 

Wow, impressive report and many more.

 

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