пятница, 25 февраля 2011 г.

Installation mongodb+php on Ubuntu/Debian

By looking in internet for way to install mongodb driver I have found only truncated instructions. And there will be my complete guide :)

First of all we need to install mongodb server:
 sudo aptitude install mongodb  
And try whether it works:
 $ mongo  
 MongoDB shell version: 1.6.6-pre-  
 connecting to: test  
 > show dbs  
Now we can install pear
 sudo apt-get install php5-dev php-pear  
and download & install mongodb driver for php
 sudo pecl install mongo
now we have to create file /etc/php5/conf.d/mongo.ini and write 1 line in it
restart apache
 sudo /etc/init.d/apache2 restart  
and try some php code like that:
 var_dump(new Mongo());  
in my case output was
 object(Mongo)#1 (4) {  
  string(0) ""  

среда, 9 февраля 2011 г.

putty autoreconnect

I'm having hard time right now... while using Windows. And one of problems is using PuTTY. This is great software for Windows world, but extremely unusable for me as Linux user.
Having all the time yakuake terminal running number of sessions, I sometime open ssh-sessions and they never lose connection even if I'm not using them (except internet loss or downtime). So I was expecting same with putty or auto-reconnect feature at least.

In fact there is simple solution, which i get on superuser.com. I just set up keepalive in Connection settings.