วันอังคารที่ 13 ธันวาคม พ.ศ. 2554

Ubuntu ramdisk


Mounting ram as a working space which help I/O faster.

#mkdir -p /tmp/ram#sudo mount -t tmpfs -o size=512M tmpfs /tmp/ram/

However, be careful to not exceed the memory you have in the system.


http://www.ubuntuka.com/ubuntu-ramdisk-ramdrive-easy-way/

วันพฤหัสบดีที่ 8 ธันวาคม พ.ศ. 2554

ubuntu installing mongodb- part II : install php driver

After finishing this part, your php will be able to use mongodb function. 

To install mongodb php driver, first of all we need pecl to install from PHP repository. 
#sudo apt-get install php5-dev php5-cli php-pear
Running pecl to get and install php driver. 
#sudo pecl install mongo
Turn your back to the screen and have a coffee while system compiling the mongo extension. After finishing installation, you will see this : 
Build process completed successfully
Installing '/usr/lib/php5/20090626+lfs/mongo.so'
install ok: channel://pecl.php.net/mongo-1.2.6
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini
Then, edit php.ini  (/etc/php5/cli/php.ini, ubuntu)  and add this line extension=mongo.so.


Reference : http://www.mongodb.org/display/DOCS/PHP+Language+Center