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.

Installing Android SDK on Ubuntu Desktop 13.04

I want to learn about Android application and heard about phonegap. Android SDK is a must have before proceed to next step. Here my documentation for install android SDK on my Ubuntu Desktop 13.04 :

Get latest SDK Tools, minimalist is better. I pick SDK Tools only.

After get the link via firefox I decide to use wget :

$ wget -c http://dl.google.com/android/android-sdk_r22.3-linux.tgz
$ mv android-sdk_r22.3-linux.tgz /home/alamsyah/
$ cd /home/alamsyah/
$ tar xvzf android-sdk_r22.3-linux.tgz

update path ::

$ export PATH="$HOME/android-sdk-linux/tools:$HOME/android-sdk-linux/platforms:$PATH"

$ echo $PATH

/home/alamsyah/android-sdk-linux/tools:/home/alamsyah/android-sdk-linux/platforms:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

install jdk and  ant

$ sudo apt-get install openjdk-6-jdk ant

Selection_002

Click Install 9 Packages button to continue and get rid of “missing platform tools” error message.

Selection_003

After install remaining packages then the path need to adjust :

PATH=“$HOME/android-sdk-linux/tools:$HOME/android-sdk-linux/platforms:$HOME/android-sdk-linux/platform-tools:$PATH”
Last one need to install related to Android SDK is : android debug bridge
$ sudo apt-get install android-tools-adb

Enough :-)

New Ubuntu Desktop Checklist

Long time no update on this blog. Feeling sad but also get blessed in same time :-)

My old netbook get retired due to battery and screen problem. Windows license attached to my machine also useless on that case. I need to work and decide to get old friend help. Ubuntu desktop. Yes, I also use Ubuntu but for server only when FreeBSD not accepted by client. I need to setup my new environment quickly and make document for future reference.

I use Ubuntu 13.04 with these software :

  1. VirtualBox; I need this software for experiment purpose. Try new OpenBSD, NetBSD and FreeBSD folks. I hope I can create more post :-)
  2. gphpedit; notepad++ replacement . Sublime text is another option but I think its enough at the moment.
  3. Shutter; screenshot tool also need to documentation.
  4. Blue Griffon; wysiwyg html editor. I need it for quick html.
  5. Xampp; apache, mysql and php installer.

Beside the software I need to learn shortcut too. CTRL+ALT+T is my friend for terminal access :-)

Install Laravel 4 on Windows 7

Working with laravel Shirt I want to learn new things and it seem a lot of changes already happened. Specially PHP. First time I learn about this lang I see 4.0 version. Today, I see PHP already reach 5.3, 5.4 and so on. I don’t know about OOP in PHP so I decide to learn about OOP by doing it on project.

Laravel is my option after CodeIgniter . As usual, installation is big thing for me and my netbook run on Windos 7 starter.

Steps for Laravel installation on Windows 7 :

Download latest laravel version 

In time of writing I got 4.0.4 version.

Put it on Xampp htdocs directory.

I rename it to laravel after extract its content.

install_laravel_windows7_1

 

Install Git

Git work ‘distribution system control‘ . It will work together with composer.

Download latest version of Git for Windows from here.

Installation is straightforward. A few notes during installation :

– Make sure to choose “Run Git from the Windows Command Prompt” on adjusting your PATH environment section.

Checkout Window style,commit unix-style line endings on Configuring the line ending conversion section.

Install Composer for Windows

Get latest version from here. Install it as usual. Nothing serious here :-)

Configuration

In this section we just need to check if everything is work.

1. Check php version
C:\Users\pc>php -v

PHP 5.4.7 (cli) (built: Sep 12 2012 23:48:31)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

C:\Users\pc>

2. Check Git version

Continue reading

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 support@newrelic.com 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 support@newrelic.com 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.