Archive for February, 2010

Installing eAccelerator for PHP5 on Debian Lenny (5.04)

Wednesday, February 17th, 2010

 

Here is a quick way step by step instructions on installing Eaccelerator (the PHP the accelerator & optimizer).

1. Add the following lines to /etc/apt/sources.list:

deb http://debian.mcmillan.net.nz/debian lenny awm deb-src http://debian.mcmillan.net.nz/debian lenny awm
deb http://debian.schnuckelig.eu/ lenny main contrib non-free

2. Import the repository keys to prevent missing gpg key warnings.

server:~# gpg –keyserver keyring.debian.org –recv-keys 0x8f068012;
server:~# gpg –export –armor 0x8f068012 | apt-key add –
server:~# wget -O – http://debian.schnuckelig.eu/repository-key.gpg | apt-key add –

3. Install the eaccelearor from the debian repository

server:~ # apt-get update
server:~# apt-get install php5-eaccelerator

An alternative way for installation is the canonical way from source:

 

 

Eventhough installing eaccelerator from this Debian repositories sounds like a good idea I don’t want to risk using unofficial Debian repositories.
Therefore I decided to install it personally that way to prevent some possible security threats.

Here is once again a step by step installing walk through:

1. Install some packages required for compilation of eAccelerator on Debian platform.

server:~ # apt-get install build-essential php5-dev bzip2

2. Download, compile and install from source eaccelerator as a PHP5 module

server:~# cd /usr/local/src server
server:~# wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
server:~# tar xvfj eaccelerator-0.9.5.3.tar.bz2 server # cd eaccelerator-0.9.5.3 server
server:~# phpize
server:~# ./configure
server:~# make
server:~# make install

3. Create eaccelerator disk cache directory server

server:~# mkdir -p /var/cache/eaccelerator
server:~# chmod 0777 /var/cache/eaccelerator

4. Edit php.ini to enable eaccelerator module in PHP

Put the following after the last line in php.ini

extension=”eaccelerator.so”
eaccelerator.shm_size=”16″
eaccelerator.cache_dir=”/var/cache/eaccelerator” eaccelerator.enable=”1″ eaccelerator.optimizer=”1″ eaccelerator.check_mtime=”1″ eaccelerator.debug=”0″ eaccelerator.filter=”” eaccelerator.shm_max=”0″ eaccelerator.shm_ttl=”0″ eaccelerator.shm_prune_period=”0″ eaccelerator.shm_only=”0″ eaccelerator.compress=”1″ eaccelerator.compress_level=”9″

Nevertheless, which way to install is used after the eaccelerator installation is compileted it is necessery to restart apache in order to load the new php.ini settings in the php module; So we now, let’s check apache for errors in configurations and restart it:

server:~# /usr/sbin/apache2ctl -t
Syntax OK

server# /etc/init.d/apache2 restart Now try your apache with some apache benchmarking tool to check about performance of php execution in apache.
See for yourself how eacceleator makes PHP script execution a way faster.

Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error on Start

Tuesday, February 16th, 2010

This is annoying error which occurs when you try to start, restart or
check apache configuration.
This error is caused by duplicate NameVirtualHost entries. In my case in Debian.
I had to comment it in /etc/apache2/ports.conf . Apparently,

NameVirtualHost *:80

was mentioned twice in my overall Apache configuration files.
I should note that this is just a warning so Apache will be working just fine, even when the error appears on Apache start-up.

Fix to an “Unknown DAV provider: svn” on Debian GNU Linux

Tuesday, February 16th, 2010

I’ve been installing subversion with WebDAV support on Apache2. After
configuring in the VirtualHost to have support for WebDAV:
I encountered the following error while testing apache configuration:
Unknown DAV provider: svn
In order to fix the problem I had to install libapache2-svn.
Here is how;

apt-get install the libapache2-svn

This fixed the issue.

A Pilgrim journey to Obrotishte, The Tekke in Obrotishte (The beginning of the Orthodox Lent)

Monday, February 15th, 2010

Obrotishte Sufis Tekke

Today I’ve been to Obrotishte’s village once again. We went there with Ceco, Dimi and Rumi some good orthodox christian fellows as well as brothers. We had a great time, the morning church service was unique. It situated in the small church entrance where the Church entrance doors leading to the main body of the church were closed, this was done because the church is really big sized and is hardly heated. Heating this whole building is quite a loss of gas, therefore the Hieromonk serving there Hieromonk Father Philip decided, to have the services in the small entrance during the severe winter. Quite an intelligent and practical move, since most of the church clergy and laymans, were mid size aged ladies and gentlemen. The church was really grace filled, and peaceful. After the nice morning lent opening church service we went to have a coffee, because the monk has to go for a funeral procession. In the mean time we went to see the sea-shore near Obrotishte. The panorama there is really wonderful, laters as soon as I have the pictures may post some views from there. One of the most impressive part of our whole journey was the visitation to the local Tekke (Khanqah) . Tekke is a sort of Muslim medieval gathering building (a sort of monastery) for the so called Sufi’s brotherhood. Sufis are a Muslim sect who had some interesting beliefs, where their beliefs combined slices taken from both christianity and Islam with some other major eastern religion beliefs. I’ve said already few words for the Sufis in one of my previous posts, so for more info please check there. This Obrotishte Tekke is believed to have buried a Sufists saint in the center of the Tekke. The Tekke itself is dating from the 16th century It’s believed that this Tekke possesses some healing energy eminating from the Sufi’s saint buried body. There is a small whole with a size graven in the stone covering the Sufi’s saint’s body. According to the old tradition if a visitor pushs his hand in with faith he can get a miraculous healing from sickness.
Nowadays this Sufists holy place is serving as mainly a museum, however there are some people who also go there as a pilgrims. It’s reported by them that they have received various body healings when they have approached the place with faith. If you’re visiting Bulgaria and you are travelling near Dobrich make sure you visit this Tekke, I guarantee you’ll have a nice experience.
Eventhough I am a Orthodox Christian by faith I should acknowledge I felt peace on that place. The Tekke was partly ruined during the Russian / Ottoman Empire Bulgaria’s liberation war. Luckily the largest and most important of this ancient Sufi
sanctuary is still intact. We also visited a special place near the Tekke, itself which was used by the Sufi believers as a sort of ancient kitchen, this place had 7 pillars, because in both Muslim and Christian, tradition it symbolizes God himself.
Anyways, after we completed the Tekke visitation, we went to the Father Philip’s living place (a tiny apartment). He was quite hospitable as always and we had a nice dinner with (Banica with potatoes) during the dinner we had a spiritual talk.
After that we moved on to the Church for the night services, the services was awesome once again right after the church service we took begged each other for forgiveness (as it’s an old orthodox lent starting tradition). Then we the Church present people, had a nice improvised supper composed of food like:
Cakes, Fish, Fried Potatoes, Cheese, Yellow Cheese etc.
The time was short so we had to head back home and we said goodbye to all the people in the church and to father Philip and took a route to Dobrich. On our way home, we noticed a large burning fireplaces with gipsy people gathered all around.
I and Ceco to say hello to the people and take some pictures around the fire.
This large fires is rooted in an ancient bulgarian pagan tradition, where people used to leap through the fire. This fire leaps according to ancient Bulgarian tradition is said to guarantee you good health and fortune in the coming year.

Angry Video Game Nerd (Oldschool Games Reviews by a hardcore arcade game fan)

Sunday, February 14th, 2010

Since quite a time I’ve been enjoying the wonderful arcade game review videos,
made by a psycho who calls himself James Nintendo Nerd .
This guy is reviewing all kind of ancient stuff from Atari, Nintendo, Game Boy,
Sega to the some almost new computer games. His homepage is cinnemassacre.com
He has already produced a dozen of funny parody videos of some of the shittest
and greatest arcade games made ever notable movies like let’s say: Friday the 13th
, Nightmares on Elm Street, Back to the Future, Turtles Ninja, Ghostbusters etc.

James Nintendo Nerd has obviously been in deep love with movies direction,
plot writteng etc. He does a really cleverly reviews an old stories in a innovative
and really funny way! Every oldschool hardcore gamer will be completely charmed
by the nice gaming temper this crazy guy has developed. Watching him and his
old arcade games reviews bring backs memories of the great old times when
Video Games were king and enriches my daily sometimes boring life every now and
then. Watching his performances guarantees you a great laugh time.
I’m gonna blog here just a few of my favourite of his videos in youtube.
Hope you’ll enjoy them!

You like it 🙂 I laughted out my internals watching this funny crap!
Check out his website and youtube for more crap from the Nintendo Nerd!

Seven Samurai movie (100 Best movies ever made)

Saturday, February 13th, 2010

Recently I watched Seven Samurai .
What incited me to watch that old movie from the distant 1954 was a list on
youtube according to which it is placed amongst 100 best movies
.The movie is a really slow one and if you like motion, it’ll definitely
break your patience. The first 20 or 30 minutes are the most hardly one to bear,
in this movie time interval almost nothing is happening.
The whole story behind the movie revolves around a villagers in Japan in past
time, which had been robbed by a group of felon samurais (In other words,
there are good and bad Samurais in the movie). The people in the village are
starving since the samurais has stolen all their rice, which is their basic food.
People in the village come to the conclusion they need to hire Samurais to
protect them from the evil doers. But looking for Samurais is a tough job since,
everything the peasents can provide to the Samurais as a wage is a bow of rice
3 times a day.
Consequently Seven Samurais bring together, thanks to an initiator and start
working on various plans on how to protect the village.
One of the Samurai guys is not really but an ex-villiger (quite a funny guy).
After the crop is gathered the bandit samurais come along to plunder the
the crops but this time they’re not going to meet just a fragile villagers
as in last years.

Apart from the movie it might be interesting for you to check out the
100 best movies ever made;

Installing usual Software Tools and Development header files and libraries on a newly installed Debian Server

Thursday, February 11th, 2010

installing-usual-software-tools-and-development-header-files-and-libraries-on-newly-installed-Debian-Ubuntu-server
Today I start my work as a system administrator for a new IT company.
My first duties include configuration and installation of some usual programs
used in everyday's sys admin job.
In that manner of thoughts I have long ago realized there is a common group of
tools and software I had to install on almost each and every new configured
Debian GNU / Linux running Server.
Here is a list of packages I usually install on new Debian systems,
even though this exact commands are expected to be executed on Debian (5.0) Lenny
I believe they are quite accurate for Debian Testing and Debian Testing/Unstable,
bleeding edge distributions.
Before I show you the apt-get lines with all the packages, I would advice you to install
and use netselect-apt to select the fastest Debian package mirror near you
So to install and use run the following commands;

aptitude install netselect-apt
netselect-apt -n lenny

Now as netselect-apt would have tested for the fastest mirror and created sources.list
file in your current directory, open the sources.list file and decide what should enter your
official /etc/apt/sources.list file or in other words merge the two files as you like.
Good, now as we have a fast mirror to download our packages let's continue further with the
packages to install.
Excecute the following command to install some of the basic tools and packages:

# install some basic required tools, software and header files
debian-server:~# apt-get install tcpdump mc ncurses-dev htop iftop iptraf nmap tcpdump apache2 apachetop
mysql-server-5.0 phpmyadmin vnstat rsync traceroute tcptrace e2fsprogs hddtemp finger mtr-tiny
netcat screen imagemagick flex snort mysql-server-5.0 sysstat lm-sensors alien rar unrar util-linux curl
vim lynx links elinks sudo autoconf gcc build-essential dpkg-dev webalizer awstats

Herein I'll explain just a few of the installed package and their install
purpose,as they could be unknown to some of the people out there.

apachetop - monitors apache log file in real time similar to gnu top
iftop - display bandwidth usage on selected interface interactively
vnstat - show inbound & outbound traffic usage on selected network interfaces
e2fsprogs - some general tools for creation of ext2 file systems etc.
hddtemp - Utility to monitor hard drive temperature
mtr-tiny - matt's traceroute great traceroute proggie
netcat - TCP/IP swiss army knife, quite helpful for network maintance tasks
snort - an Intrusion Detecting System
build-essential - installs basic stuff required for most applications compiled from source code
sysstat - generates statistics about server load each and every ten minutes, check man for more
lm-sensors - enables you to track your system hardware sensors information and warn in CPU heatups etc.

I believe the rest of them are no need to be explained, if you're not familiar with them check the manuals.
So far so good but this is not all I had to install, as you probably know most Apache webservers nowadays
are running PHP and are using a dozen of PHP libraries / extensions not originally bundled with PHP install
Therefore here are some more packages related to php to install that would install some more php goodies.

# install some packages required for many php enabled applications
debian-esrver:~# apt-get install php-http php-db php-mail php-net-smtp php-net-socket php-pear php-xml-parser
php5-curl php5-gd php5-imagick php5-mysql php5-odbc php5-recode php5-sybase php5-xmlrpc php5-dev

As I said that is mostly the basic stuff that is a must have on most of the Debian servers I have
configured this days, of course this is not applicable to all situations, however I hope
this would be of use to somebody out there.

Fix Virtumonde.dll Virus on Windows Vista

Wednesday, February 10th, 2010

A friend of mine, brought his computer home because his machine needed a repair.
After installing Spybot S&D and checking the machine for SpyWare.
The program found like 26 spyware / adware infections. After fixing them,
I decided to run once again the program just to assure myself that the infections has been properly removed.
After scanning his hard drive a second time with SpyBot S&D, just one infection
was found though I have to admit a really tough one!
The questionable spyware found was called virtumonded.ll
I followed instructions from fixvirtumondedll.com to remove the cursed spyware.

There are basicly two major alternatives in removing virtumonde.dll in a
quick way.

1. Buy or find cracked version of Spyware Doctor
2. Or use SuperAntiSpyware

I decided to use SuperAntiSpyware, because it’s a freeware.
After installing it and running a test on the Windows Vista system,
happily It found and removed a dozen of malicious spyware.
However I decided to check the system afterwards with Spyware Doctor
cause I wanted to be certain that all the Spyware on the system is removed.
Once again checking the Fujistu Siemens notebook with Spyware Doctor
it rendered that some more 40 pieces of spyware was left undetected
by SuperAntiSpyware.
After removing the security threads lastly with Spyware Doctor, now the
system is perfectly clear.

Adolf Hitler experiences Vista Problems :)

Wednesday, February 10th, 2010

Imagine what could have happened if Computers were available during
the Second World War.
Now stop imagining and see the video below:

Howto check if mod_rewrite is installed and loaded in Apache 2.x and serving directories correctly

Wednesday, February 10th, 2010

During my professional experience as a system administrator, it was a common misfortune in newly
configured unix servers mod_rewrite not to be serving .htaccess files.
Everytime I had to fix issue in which mod_rewrite was not working I loosed a lot of my precious time
The same story happened once again I had to check why mod_rewrite is not configured correctly and I cannot
apply some redirection rules in WordPress necessery for me
to exercise some SEO on my wordpress blog .
Therefore this time I decided to blog a step by step check on in order to:

1. Determine if mod_rewrite is installed & loaded correctly in Apache
2. Find out if mod_rewrite is configured to serve .htaccess files correctly
Going through this two scenarios I would be able to determine why I cannot get wordpress SEO optimization
mod_rewrite redirection rules to work as they should.
Okay, so let’s go through the two scenarios:

1. Here is a tiny script in PHP to determine if mod_rewrite is installed and loaded in Apache correctly
To use the script save it somewhere in your Domain document root with a .php extension
Here is the code of the script as well:

< ?phpprint_r(apache_get_modules());?>

If your mod_rewrite module is configured correctly you’ll see it in the php array containing
all your apache loaded modules.

Without PHP from the shell in order to get installed Apache modules on Linux, the following command applies:

apache2ctl -t -D DUMP_MODULES

For apache 2.2.x
httpd (or apache.exe) -M will show static and shared modules loaded via LoadModule.
httpd -l will show only static (compiled in) modules

For apache 2.0.x
httpd (apache.exe) -l is available but -M is not.
You will need to manually check the LoadModule directives and the files.

2. Now we continue, further on with another script that has to be installed somewhere in Apache’s DocumentRoot
I decided to install it in a directory /test/ so in my case it’s installed in www.pc-freak.net/test/
Here is a link to the script you need to find out if mod_rewrite is configured to serve .htaccess files for your preferred domain name’s DocumentRoot.

Now save this file and again make sure it has a .php extension.

Now you need to create an .htaccess file in the directory where you have rewrite.php file stored.
The content of the .htaccess file should be the following:

RewriteEngine OnRewriteOptions InheritRewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]

Make sure the permissions of the .htaccess are correct, for example the file should have at least read
permissions for your webserver.
So let’s execute:

chmod a+r .htaccess to ensure the newly created file has proper permissions
So let’s check if mod_rewrite is enabled for my domain DocumentRoot by visiting:
this link
Hopefully if all is okay you’ll see:
Congratulations!! You are using Apache mod_rewrite whenever you press the TEST2 link
on the upmentioned webpage.

In case if you get a 404 error message, then most probably you don’t have mod_rewrite configured
to serve .htaccess files for your domain.
This often happens because of missing:
AllowOverride All in your main Directory directives in your webserver configuration file.
In my case I had a problem where mod_rewrite rules were not red from the .htaccess file:
To solve my issue I had to change:

Directory /
AllowOverride None
Order Deny,Allow
Deny from all
/Directory
in my httpd.conf to

Directory /
AllowOverride All
Order Deny,Allow
Deny from all
/Directory

So well, That’s all Folks!