Archive for November, 2010

Hot wo install geoip and mod-geip2 to Apache in CentOS 5.5 Linux

Saturday, November 20th, 2010

Today I had to to install the mod_geoip on CentOS 5.5 final, here are the steps in which I succesfully installed the mod_geoip to Apache.

1. Install the GeoIP and GeoIP-devel GeoIP-data and zlib-devel packages with yum

[root@centos hipo]# yum install GeoIP GeoIP-devel GeoIP-data zlib-devel

2. Use and set my geoip_update.sh script to constantly keep your GeoIP Country and City database up2date

You can download the geoip_update.sh geoip city and countriy database update script here

You will need further to set the script to execute on your root crontab, I’ve placed the following cron rules in my root’s cron;

[root@centos hipo]# echo "02 00 1 * * /usr/sbin/geoip_update.sh >/dev/null 2>&1" | crontab -

Accustom the cron to your time of need.

3. Install the httpd-devel and arp-devel rpms via yum, necessery to be able to compile mod_geip after that

[root@centos hipo]# yum install httpd-devel apr-devel

Download and unarchive the mod_geip2 source code

The latest release of mod_geoIP presently is 1.2.5, however at the time you’re trying that there could be a newer release so check with a browser on http://geolite.maxmind.com/download/geoip/api/mod_geoip2/ to assure which one you’ll need to download.

In my case I issued:

[root@centos hipo]# wget http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz
[root@centos hipo]# tar xvzf mod_geoip2_1.2.5.tar.gz
[root@centos hipo]# cd mod_geoip2_1.2.5

4. Use the apache apxs (Apache Extension Tool) to compile the mod_geoip module

[root@centos hipo]# apxs -i -a -L/usr/lib64 -I/usr/include -lGeoIP -c mod_geoip.c

This command should install the mod_geoip.so module to /usr/lib64/httpd/modules/mod_geoip.so and add a LoadModule directive in your CentOS Apache server.
Anyhow I do recommend you check that your /etc/httpd/conf/httpd.conf contains the following line included:

LoadModule geoip_module /usr/lib64/httpd/modules/mod_geoip.so

5. Put the following Apache configuration again in /etc/httpd/conf/httpd.conf

<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat Standard
GeoIPDBFile /usr/share/GeoIP/GeoLiteCity.dat Standard
<IfModule>

6. In your /etc/php.ini add after the last line of the file

extension=geoip.so

7. Restart the httpd server for the changes to take effect

[root@centos: /root ]# /etc/init.d/httpd restart

Installing passenger with ruby gems on Debian Lenny

Friday, November 19th, 2010

Here is how I have installed the rubygems passenger module on my Debian Lenny Linux.

1. Install the module via ruby gem

debian:~# gem install passenger

2. Invoke the passenger-install-apache2-module to install the module

debian:~# passenger-install-apache2-module

If everything compiles fine with your passenger module you can skip the rest of the text in step 2 as well as the step 3, however;
Here first time I tried to compile the module I got an compilation errors because I was missing the following packages installed:
libopenssl-ruby libopenssl-ruby1.8 libcurl4-openssl-dev

Apart from this list I needed to install also the apache2-prefork-dev package installed as well as the rake (ruby build program)

Two other packages that might be necessary for the successful compilation of the passenger-install-apache2-module are:
zlib1g-dev libzlib-ruby

Thus best thing to do now is to use apt-get install to fetch and install for you all necessary components for the ruby passenger module compilation to succeed:

3. Install following debian packages before you proceed with passenger-install-apache2-module

debian:~# apt-get install libopenssl-ruby libopenssl-ruby1.8 libcurl4-openssl-dev rake apache2-prefork-dev zlib1g-dev libzlib-ruby

4. Invoke the passenger-install-apache2-module again if it failed in step 2

debian:~# gem install passenger

Hopefully now everything should compile fine.

5. Edit your apache2.conf to load the passenger module into Apache

In /etc/apache2/apache2.conf place the lines which will appear as a text after your passenger compilation is completed on your screen, in my case what I needed to include in my apache2.conf was:

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.0/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.0
PassengerRuby /usr/local/bin/ruby

As you can see from below I had a custom installed ruby and that’s why the location of my ruby and its libraries are into the /usr/local/ dir.

Last step left is to configure a Virtualhost for your Ruby on Rails application :

6. Configure Virtualhost for your ruby on rails app

You will need to use a virtualhost similar to:

<VirtualHost *:80>
ServerName www.yourhost.com
DocumentRoot /somewhere/public # <-- be sure to point to 'public'!
<Directory /somewhere/public>
AllowOverride all # <-- relax Apache security settings
Options -MultiViews # <-- MultiViews must be turned off
</Directory>
</VirtualHost>

Of course you will also need to restart your apache for the new module to get loaded
debian:~# /etc/init.d/apache2 restart

Besides my instructions you might be interested into the following video explaining the installation process of mod passenger
Cheers 🙂

Brave New World by Aldous Huxley (book review)

Thursday, November 18th, 2010

Brave New World First edition Book Cover

I’ve bought the small book called Brave New World by the Author Aldous Huxley
I’ve bought the book second for 2 euro and I have to say it was quite a good investment.

The first time I heard the title was when Iron Maiden’s Brave New World album become popular some few years ago.
Thus I was quite interested to see what has inspired Bruce Dickinson and the other maiden guys to come with an album title,what is so much about this book by reading it 🙂
Well I should say the guys were right the book is really an awesome piece of modern sci-fi classic.
The Brave New World book in short is a story about an evaluated futuristic society, whenever every person is conditioned from his birth and another very different society which has decided not to adapt to the new way and keep their old ways.
The book is basicly a story about the clash between the new world looking only ahead (a world without pain), and the old one full of pain statitic, brutal but still real.
In that evaluated society, the human mind is conditioned what things to like and what things to dislike constantly. Whenever somebody experiences even the slightest unconfortable feeling, there is always soma a magical mood fix up drug to work it out.

In that society, marriege is prohibited and children are born in a test-tubes in the laboratories.
In that modern world people does travel only through an air transport and woman constantly change their male partner, basicly acting like whores.
Out of this fake society, the old society which decided not to go the new fake ways of living exists, there in are Indians, Christians,and all type of people who has decided not to have their children born in a test-tube or for some reason has failed to integrate to the highly technologic new society

The book story progresses as one of the persons part of the World State develops a sort of vague hatred for his society and wants to see the old type of living, e.g. go out on a vacation in a place where still “savages” as they call them live.
He mets there an fat ugly woman whom fore some reason has been abandoned to the old world, because during her vacation she got pregnant and was in violation of the norms of the new society and therefore was banned of the “brave new world” society.
As the story progresses she and her is brought again to the World State society. Her son however cannot really integrate into this society since he has a different mindset of all of them and has a strong sense for right and wrong.

At a certain point “The Savage” as the son is called develops a completely hatred for this modernistic society and does violate the World State’s rules and gots captured by the World State police.
He consequently got cast out of the futuristic society and starts living a hermit like life in a lighthouse nearby the sea.
Because of the Savage unusual behaviour he attracts the attention of the local World State inhabitants and his type of living enters the newspapers.

The Savage gots really popular and at a certain point, many many of the local World State inhabitants comes to see him personally, even Lenina (the lady he is in love with).
Seeing Lenina around is too much for John and he attacks her with his whip. People got excited and follow their conditioning getting into a huge combination of soma and sex (an orgy).
On the morning John wakes up and remembers that he has used the soma and participated into the Orgy horrified alone and hopeless as well as tormented by the painful memories he makes his last attempt to escape civillization.
When however thousand of gawking sightseers arrive in the morning to see John whipping himself, they found him dead hanging by the neck.

The book was a high interest to me as it presents clearly the general direction that the modern society has taken (the more carnal) and confortable life as the one of choice, though it’s fakeness.
John’s personality is a very interesting one since he synthesizes in himself the eternal fight between the spiritual beginning and man and the carnal one.

Just to conclude I have to say that I recommend the book to anybody that is a true seeker and a old-fashioned sci-fi stories fan.

I’ll close this post with Iron Maiden’s Brave New World song as it was inspired quite a lot by the Brave New World book.

Update to the latest ruby release from source in Debian Lenny

Wednesday, November 17th, 2010

Debian Lenny’s default package included with this distro repository is 1.8.7
Since some ruby project code requires a newer release of ruby as of 1.9.2, I needed to update the ruby version installed on one of the Debian Lenny Linux servers I’m administrating.

I couldn’t find a way to make the ruby update to version 1.9.2 via a deb package thus I proceeded further and installed a ruby 1.9.2 from source into /usr/local/bin

By installing the newer release to /usr/local/bin, I’m not harming the old ruby install and I still keep the advantages of having the newer 1.9.2 installed 🙂

The installation from source comes to this easy steps:

1. Download the latest ruby source in my case this is ruby-1.9.2-p0.tar.bz2

debian:~# cd /usr/local/src
debian:/usr/local/src# wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2
...

2. Dearchive the ruby source package

debian:/usr/local/src# tar -jxvvf ruby-1.9.2-p0.tar.bz2
debian:/usr/local/src# cd ruby-1.9.2-p0

3. Compile the ruby source and install it
debian:/usr/local/src/ruby-1.9.2-p0# make
...
debian:/usr/local/src/ruby-1.9.2-p0# make install

Further on if you need to change your Apache to start using the newer installed version of ruby you will need to set the following variable in /etc/apache2/apaache2.conf

RailsRuby /usr/local/bin/ruby

The Diary of Anne Frank movie review

Tuesday, November 16th, 2010

Anne Frank black and white picture

I’m interested into Jewish tradition, as it is one of the traditions which has been closest with our traditions in Christianity.
Most of the old testament is actually a book considered as a holy by the Jews as well, just like with us Christians.

Thus I’m quite interested into what the Jewish tradition used to be and is today.
Knowing Jewish tradition gives me another way to compare my faith (the Orthodox Christianity) to the jewish judaism.

In that manner of thought, just recently I googled for the top most popupar Jewish movies and one of them that I come up with was called The Diary of Anne Frank

The version I’ve watched is actually a bit more modern since there is also a version of 1959.
The movie story line is based on a Dutch book literally translated as The Diary of a Young Girl

The movie is about a jewish young girl that in her teenage and is growing in a hiding somewhere in Amsterdam surrounded by her family and a couple of other jewish families.
The whole action develops during the progress of the Second World War (1942-1944).

The story tries to presents the hardness of the Jewish life in this days by taking a close look into the daily life of this few families that were hiding in Amsterdam in order to escape the Nazi’s concentration camps or execution.

The movie triggers a lot of emotions but generally is nothing special I actually expected a bit more, since I’ve red some positive reviews before I watched it.
However there is also good things in the movie among which is the excellent actors play.

The rest however is nothing special and doesn’t expose much the Jewish tradition and culture (as I’ve expected), at least it doesn’t get into detail of Jewish tradition like the Fiddler on the Roof musical movie

Anyhow if you’re of this people that like so much the slow progressing moviews without too much action, then you might like it.
Here I include a short movie from youtube to give you a general idea about the movie:

Make picture transparent with the Gimp on Linux

Tuesday, November 16th, 2010

GIMP Logo make picture transparent with GIMP on GNU / Linux
I’m trying to learn some basic design this days as an attempt to fill my huge missing gap of knowledge in graphic processing.
I’ve always been not too good with visual stuff and always been focused on the command line and console, however since
some time design started being quite interesting thing to me and I found it quite handy and challenging to learn some basic designing.

I’m not really a Windows guy and thus my Photoshop skills are next to zero.
Since The Gimp is the substitute for Photoshopfor Linux users and I had a task for one of the websites I’m developing to make some pictures for the website transparent, therefore I had to learn how to make pictures transparent with The Gimp
After some reading online and some experimenting with GIMP it appeared to me it’s very easy to actually make pictures transparent with the GIMP.
So I’ve come with a small article here on how to make image or a picture transparent with Gimp in simple steps in order to help people who are trying to achieve the same easy task:

1. Open Gimp and place your mouse cursor on the picture

Here, Press the 2nd or 3rd mouse button to show menu.

2. Select Layer -> Transperancy -> Alpha to Selection

In that menu select Select Layer -> Transprerancy -> Alpha to Selection

Gimp Alpha to Selection Menu

3. Use Fuzzy Select Tool and select the picture background

Gimp fuzzy select background

4. From Gimp Window pane main menu choose the Clear option

Edit -> Clear (Delete)
gimp edit clear menu

That’s all now your picture background should be removed if some parts of the picture still needs to be purged just follow the above step and remove them.
I should say I thought making picture transparent with GIMP would be a more complex task than it really was, quite nice one more step in my development as a designer 🙂

filezilla a good substitute for the buggy gftp Gnome FTP client on Linux

Saturday, November 13th, 2010

filezilla logo picture

As a Linux user until just recently, I’ve always used either the ftp console comamnd or lftp or ncftp etc.

I have also used the gftp as a graphic FTP client to transfer some files in the far past, and even then my memories on how it behaves are painful 🙂

The gftp used to be so buggy that it crashed quite often during simple file transfers or directory listing, I thought with the years to pass the things has changed, but unfortunately my hopes were for nothing.

Just recently I tried the gftp on my Gnome desktop to transfer some files to a remote FTP server just to realize once again how buggy and slow this software is.

During some operations (which I cannot really recall the gftp (gnome ftp) client crashed). Also file listings were so slow that it usually took a couple of seconds to refresh a file directory tree.

The only thing that I have noticed as a bit different than as I remember the gftp is that it included much more configuration options and a very handy feature of adding an FTP bookmark
That’s very useful since you can easily bookmark an ftp host with it’s user and password saved, so later you can just press the host and you’re conntected again (e.g. you don’t need to remember the FTP server credentials :))

Even though the improvements in gftp I wasn’t very happy of it’s buggy behaviour so after thinking about some alternatives for a graphical FTP client I remembered there used to be a project long time ago called filezilla aiming at creating an advanded FTP client to be embedded into the Mozilla browser.

A quick apt-cache search filezilla proved the filezilla package is available for my Debian Testing Linux.
So I’ve installed filezilla using a straightforward:

debian:~# apt-get install filezilla

After launching the software and testing it with my FTP all problems were gone, FTP transfers were quicker than with gftp, no random crashes plus a very quick load up and listing of the remote server FTP directories.

So if you my dear reader are looking for a decent FTP graphical client for Gnome desktop on GNU/Linux then filezilla is the one I strongly recommend you.

Filezilla just works like a charm 🙂

quite & orange – cdak a demo a new outstanding demoscene released demo and The Assembly

Friday, November 12th, 2010

I was referred by a friend of mine (Pro-Xex) to an amazing futuristic Sci-Fi demo.

I found the video quite inspirational and I guess generally it represents the IT world currently out there and even the internet.
The internet association was the fist one that poped up in my mind while I was watching the demo video. I still don’t know if the author meant this by that or he meant to represent the complex inter-processes flowing in a computer motherboard or who knows but still I’m sure he was referring to computers 🙂
I was nicely surprised to know that still people do code such a high quality visual demos and the cutlure is still there.
Also I was reminded by Pro-Xex about the existence of the Assembly yearly conference
ASSEMBLY is a computer festival, a demo party and a LAN party all rolled into one. It is four day party running 24h/day for computer hobbyists. read more about it in the assembly faq

The assembly conference includes events like; concerts, seminars, IT competitions and even robot wars 🙂
Anyways here is the quote & orange – cdak video

quite&orange – cdak from unc on Vimeo.

The video is uploaded to vimeo – a youtube like video service

It’s always nice to see some youtube and google competitors out there 🙂

Another very interesting internet place to visit is the pouet.net .This website is an invaluable resource for demos
So if you’re really after demoscene and demos go and check some demos there.
Cheers! 🙂

How to delete files in Linux older than 2 days

Thursday, November 11th, 2010

If you’re looking for a way on how to delete all files in a directory older than let’s say 2 days. Here is how:

1. Enter into the directory where you want to delete the files:
cd /some/example/dir/

2. Use the Linux find command like so:

find . -mtime +2 -exec rm -f {} ;

If you want to delete all files older than the last 3 days or the last X days all you need to change in that example is the +2

To delete all files on your Linux in a certain directory older than 3 days issue:

find . -mtime +3 -exec rm -f {} ;

If you need to put it to execute on crontab, create some little shell script, let’s say:

#!/bin/shcd /some/example/dirfind . -mtime +2 -exec rm -f {} ;

And set it to be executed on your crontab at your desired time, I saw the part with the crontab because this was something I needed to do just recently and I thought it might be helpful to somebody willing to do the same 🙂

My Business Ethics assignment at HAN (A Report on The DeepWater Horizon BP oil spill from a Business Ethics perspective)

Wednesday, November 10th, 2010

bp-logo-dripping-oil-business-ethics-assignment-report-cleaning-the-rp-pollution
For my Business Ethics module I follow at HAN (Hogelschool van Arnhem and Nijmegen – Arnhem Business School) I was assigned to work on a group project on the recent scandal of the huge oil spill caused by an accident on the DeepWater Horizon platform in the Gulf of Mexico.
In my assignment I was assigned to work of a group of 4 students initially, however after the first week one of the students decided to just quit the work group and we were left with a group of 3.

I had quite a struggle in the beginning and somewhere in the middle of the project because one of my group members were not showing on the first 2 or 3 meetings. Luckily with time that was managed and he started showing and parcipated actively and I even can say was quite happy with his input.
The guys I’ve worked on the project were: Ervan (Indonesian) and Miguel (Spanish). It took us about 4 weeks to complete the project but at the end the report become a good one.
The report was graded by the Business Ethics teachers Stephan and Silvia. The report was graded with the mark of 8.0 on the scale of 10 maximum, which btw is quite a good mark if it’s matched to the normal grading standards here in the Netherlands.

Deepwater-Horizon-oil-spill-business-ethics-perspective

The aim of the report was to define a Problem Statement based on the oil spilling issue in terms of:

1. Problem owner
2. How the problem owner should act
3. The Moral Nature of the Problem
4. Overall Problem Analysis
5. Possible options for actions to solve the BP Deepwater Horizon catastrophe
6. A cooperating strategy way as a mean to solve the Mexico Gulf contamination
7. Solution in terms of Black & White Strategy
8. Using a creative middle way solution to solve the BP problem
9. Ethivcal Evaluation
9.1 Ethical evaluation baesd on intuition
9.2 Ethical evaluation in light of Utilitarianism
9.3 Ethical evaluation of the problem according to John Stuart Mill's freedom principle
9.4 Case study in light of Kantian's categorical imperative
9.5 Case evaluation in terms of Aristotle's virtual ethics
9.6 Problem from Care Ethics perspective
10 Criticism on major ethical theories
11 Moral acceptable action to solve the BP Deepwater Horizon problem

Here I also post for download the Business Ethics report on British Petroleum in a PDF
and
Business Ethics report on Deepwater Horizon oil spill

I hope this report will be an interesting learning point for Business Ethics students for the upcoming years in Arnhem Business School and will be an example report on how to write and structure their Business Ethics group assignment reports.