Category Archives: Linux

Top 10 Cool FreeBSD T-Shirt, Hat and Mug

Hobbies at once paid is a luxury that should be in grateful. One of the hobbies that I like is learning the FreeBSD operating system. Many meet new friends, exchange the latest information and so forth. One nice thing also is when meeting with a friend who had the same hobbies.
Accessories are usually the mainstay of commonly used t-shirts, hats and mugs. Some friends ask me where can buy plus accessory can be custom fit if you wish, eg adding our name.

Search results bring into some design t-shirts, hats and mugs that can be seen below:

FreeBSD Big Logo T-ShirtsFreeBSD Big Logo T-ShirtsCHECK PRICE

FreeBSD Logo white T-ShirtFreeBSD Logo white T-ShirtCHECK PRICE

FreeBSD in your heart T-ShirtFreeBSD in your heart T-ShirtCHECK PRICE

FreeBSD Linux T-ShirtFreeBSD Linux T-ShirtCHECK PRICE

FreeBSD Big Logo wihout textFreeBSD Big Logo wihout textCHECK PRICE

FreeBSD HatFreeBSD HatCHECK PRICE

FreeBSD MugFreeBSD MugCHECK PRICE

 Why those FreeBSD stuff are cool

FreeBSD Big Logo T-Shirts – Big logo of FreeBSD with text “freeBSD” under the image. Looks cool.

FreeBSD Logo white T-Shirt – White T-Shirt with FreeBSD logo with text “freeBSD” next to the image.

FreeBSD in your heart T-Shirt – Good looking T-shirt with small FreeBSD logo along the text.

FreeBSD Linux T-Shirt – Quote what Linus Torvald said “if 386BSD had been availble when I started on Linux, Linux would probably never had happened”. FreeBSD Logo above the quote.

FreeBSD Big Logo wihout text – If you looking for Logo only T-Shirt then you’ll love this one.

FreeBSD Hat – Cool hat, if you going to hang out with your friend. Computer club meeting etc.

FreeBSD Mug – Good companion when you have ‘challenge’ in front of your monitor. Just coffe please :-)

Deploy google app engine : appcfg.py

Deploy php script aka application to google app engine is interesting. I came from traditional ftp-ing (so 1999 hehehe), scp and cpanel. Google app engine provide 2 ways of deployment; through appcfg.py and via git. I’ll try to explore both options now.

Preparation

In this stage, application need to get register first to App Engine Administration Console. Visit this address to get it done :

https://appengine.google.com/

Selection_008

Choose google account to use for this purpose.

Selection_009

click “Create Application” button.

Selection_010

make sure to check name availability and quota application (max 10).

Selection_011

Google app engine will need grant access from your google account.

Selection_012

Click ‘Accept” button to get started.

 

Deployment using appcfg.py

$ google_appengine/appcfg.py –oauth2 update digitalfusi/

08:59 PM Application: difuphp; version: 1
08:59 PM Host: appengine.google.com
08:59 PM
Starting update of app: difuphp, version: 1
08:59 PM Getting current resource limits.
Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=xxxxx6889yyy.apps.googleusercontent.com&access_type=offline

If your browser is on a different machine then exit and re-run this
application with the command-line parameter

–noauth_local_webserver

(process:3287): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0′ failed
Authentication successful.
09:01 PM Scanning files on local disk.
09:01 PM Cloning 2 application files.
09:01 PM Uploading 2 files and blobs.
09:01 PM Uploaded 2 files and blobs
09:01 PM Compilation starting.
09:01 PM Compilation completed.
09:01 PM Starting deployment.
09:01 PM Checking if deployment succeeded.
09:01 PM Deployment successful.
09:01 PM Checking if updated app version is serving.
09:01 PM Completed update of app: difuphp, version: 1

Testing the result by visit http://difuphp.appspot.com

Selection_013

appcfg.py is very straightforward command. Combine with oauth option I can upload all my php script to google infrastructure. Awesome.

 

install php sdk for google app engine on ubuntu 13.04

Another need for try php on google app engine make install all required stuff :

Install python

$ sudo apt-get install python

Check version :

$ python -V
Python 2.7.4

Install PHP CGI

Download latest php 5.4 from download page :

$ wget -c http://au1.php.net/get/php-5.4.22.tar.gz/from/this/mirror -O php-5.4.22.tar.gz

$ tar xvzf php-5.4.22.tar.gz

$ cd php-5.4.22/

$ sudo apt-get install gcc libmysqlclient-dev libxml2-dev

$ ./configure --prefix=$PWD/installdir --enable-bcmath --with-mysql

$ make install

Check version :

$ pwd

/home/alamsyah/php-5.4.22

using absolute path

$ /home/alamsyah/php-5.4.22/installdir/bin/php-cgi -v

PHP 5.4.22 (cgi-fcgi) (built: Nov 23 2013 11:22:27)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Google APP engine SDK for PHP

Download latest version from here.

$ cd

$ wget -c http://googleappengine.googlecode.com/files/google_appengine_1.8.8.zip

$ unzip google_appengine_1.8.8.zip

MySQL Server

$ sudo apt-get install mysql-server-5.5 mysql-client-5.5

check :

$ dpkg -l | grep mysql

ii  libdbd-mysql-perl                         4.021-1                                i386         Perl5 database interface to the MySQL database
ii  libmysqlclient-dev                        5.5.34-0ubuntu0.13.04.1                i386         MySQL database development files
ii  libmysqlclient18:i386                     5.5.34-0ubuntu0.13.04.1                i386         MySQL database client library
ii  mysql-client-5.5                          5.5.34-0ubuntu0.13.04.1                i386         MySQL database client binaries
ii  mysql-client-core-5.5                     5.5.34-0ubuntu0.13.04.1                i386         MySQL database core client binaries
ii  mysql-common                              5.5.34-0ubuntu0.13.04.1                all          MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server-5.5                          5.5.34-0ubuntu0.13.04.1                i386         MySQL database server binaries and system database setup
ii  mysql-server-core-5.5                     5.5.34-0ubuntu0.13.04.1                i386         MySQL database server binaries

Great, client and server installed.

At this stage all requirement has installed correctly. I need php editor and I choose sublime text 2.

Install Sublime Text 2

$sudo add-apt-repository ppa:webupd8team/sublime-text-2

$sudo apt-get update

$sudo apt-get install sublime-text

Selection_005


					

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 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.