March 22, 2011

Installing Lsync on Ubuntu 9.10 / 10.04

Filed under: Uncategorized — Tags: — yasi8h @ 9:12 am

If you want to seamlessly sync two folders across two machines on the internet, you could use a lot of tools for the like sync. However if you want this syncing to take place whenever a file changes in the master (in a case where you have a master and a slave, where masters changes are propagated to slave), you can use Lsync. You can read more about it here (

Here is how to get it installed on Ubuntu. This has been tested on version 9.10 and 10.04.

Download the latest version of synced

Install the required packages
sudo aptitude install lua5.1 liblua5.1-0-dev pkg-config

Compile and install away
cd lsyncd-2.0.3
sudo make install

Test whether its installed
lsyncd -version

Thats it!

March 7, 2011

Basic Ubuntu 10.04 Server Setup Guide

Filed under: Uncategorized — Tags: , — yasi8h @ 2:56 am

There are some basic steps i do when setting up a fresh server (ahh sounds so good! :D). Going to list them out so i can follow them and have no problems forgetting anything in the future.

  • Add a user : adduser foobar
    • answer all the question asked
  • Add your public key to the authorized_keys so you can ssh in without password authentication (with public key authentication).
    • login as the new user
    • mkdir .ssh
    • nano .ssh/authorized_keys
    • put your public key in and save the file (ctrl + o, ctrl + x)
  • Add a entry for the new server in your .ssh/config for easy access to it from your local
    • nano .ssh/config
    • add a entry like this (please ignore the bullet points)
      • Host whatever_fancy_name #you will use this on your local ie: ssh whatever_fancy_name
      • User=foobar #user name on the server
      • Hostname= #your server ip
    • save the file (ctrl + o, ctrl + x)
  • Setup sudo without been asked for the password for the new user
    • visudo
    • add this line to the bottom: foobar ALL=(ALL) NOPASSWD:ALL #foobar is the username, while nopassword tells sudo not to ask the user for his password when using sudo
  • Disable remote root logins for sshd
    • sudo nano /etc/ssh/sshd_config
    • find the line ‘PermitRootLogin yes’ and replace it with ‘PermitRootLogin no’
    • save the file (ctrl + o, ctrl + x)
    • restart sshd
      • sudo /etc/init.d/ssh restart
  • Some default packages you might want to setup
    • htop (sudo aptitude install htop)


November 19, 2010

Ubuntu 10.04, Nginx with Upload and Upload Progress Modules, RVM, Postgresql

Filed under: Uncategorized — Tags: , , — yasi8h @ 2:02 am

Had to setup a staging server recently. Thought of putting down the steps i followed in to a article. This thing is getting fun.

General Stuff

We need these libraries in order to compile the following stuff

sudo apt-get install build-essential libssl-dev libpcre3-dev git-core

These are some nice to have tools, install only if you use them.

sudo aptitude install htop

You might also want to run update-db so that locate would work.

sudo update-db

Nginx from Source

We are going to get nginx 0.7.65 with upload and upload progress modules and compile them from source. Please note that additional command line options passed in to some commands bellow via two ‘-‘ character might get jumbled up by blog/editor. So if you get any unusual errors while running the following commands check whether you are typing in the correct chars (if you do a copy paste you might be trying to execute some html chars that make no sense for the command you are running).

tar xzf nginx-0.7.65.tar.gz

wget –no-check-certificate
tar zxf masterzen-nginx-upload-progress-module-v0.8.2-0-g8b55a34.tar.gz

tar zxf nginx_upload_module-2.2.0.tar.gz

cd nginx-0.7.65
./configure –add-module=../masterzen-nginx-upload-progress-module-8b55a34/ –add-module=../nginx_upload_module-2.2.0/
sudo make install

Ruby 1.8.7 with RVM

bash < <( curl )
nano ~/.bashrc
source ~/.rvm/scripts/rvm
rvm install 1.8.7
rvm use 1.8.7 –default

Rails 2.3.5

We want to install an older version of rails so

gem install rails -v 2.3.5

Postgresql 8.4

sudo apt-get install postgresql-8.4
sudo nano /etc/postgresql/8.4/main/pg_hba.conf

Towards the end of the file look for a line like

local all postgres ident

and replace it with this line

local all all trust

The above line would allow full access to the db from the localhost WITHOUT any PASSWORD. So yeah be sure you know what you are doing. You could replace trust keyword with the md5 to enable password authentication.

sudo /etc/init.d/postgresql restart

Postgresql installation have already added a user called postgres. And this user can can connect to the db and have admin rights. So connect as postgres and add a user account and create a db. Be sure to give all the needed privileges to the user account you are creating. So that it can create new dbs…etc.

createuser builder -U postgres
createdb builder_development -U builder

Ruby Gems needed for postgresql – ruby integration

sudo apt-get install postgresql-server-dev-8.4
gem install pg

Thats it for me. Hope this helps.

October 24, 2010

Rails 3 on Ubuntu 10.10 with RVM, Passenger and Nginx

Filed under: Uncategorized — Tags: , , — yasi8h @ 1:09 am

This covers setting up a Ubuntu 10.10 box to run rails 3 on production. Please notice it only focus on installing and setting up things mentioned in the title. However there are other things that you should configure and setup when deploying a application to production (like ntpd for example).

Installing RVM

We will need git before we can get started.

sudo apt-get install git

Install rvm according to the official guide.

bash < <( curl )


[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

to your .bashrc.

Once you edit your bashrc file execute the following to load rvm without logging out and back in

source ~/.rvm/scripts/rvm

Just to be safe check wether rvm is a function, which is what it should be.

type rvm | head -n1

Install ruby 1.9.2

See what you get out of rvm notes. you will need to install some stuff before you can compile ruby.

aptitude install build-essential bison openssl libreadline5 libreadline5-dev curl git-core zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev

The above packages covers some common stuff. It should be enough to get you started. However depending on what gems you want to install you might need to install additional dependencies.

rvm install 1.9.2

Set 1.9.2 as the default

rvm use 1.9.2 --default


Install passenger as instructed in rvm documentation

rvm 1.9.2 --passenger
rvm 1.9.2
gem install passenger
rvmsudo passenger-install-nginx-module

Let passenger downland and install nginx for you.

Modify /opt/nginx/conf/nginx.conf (thats the default location).

‘For Nginx users, replace the passenger_ruby line with:’

passenger_ruby /home/wayne/.rvm/bin/passenger_ruby;

Add a block like this to host your RoR site

server {
      listen 80; #the server will be running on this port
      root /home/deployer/your_rails_project/public;   # <--- be sure to point to 'public'!
      passenger_enabled on;

Nginx init script


git clone git://
sudo mv rails-nginx-passenger-ubuntu/nginx/nginx /etc/init.d/nginx
sudo chown root:root /etc/init.d/nginx

More information on


sudo apt-get install mysql-client mysql-server

Get the source for your rails app. unzip it in your home folder (or where ever you want to. But be sure to edit the nginx config as appropriate).

cd to-your-rails-app-folder
bundle install
rake db:setup RAILS_ENV=production

sudo /etc/init.d/nginx restart

Thats it!

January 22, 2010

Thoughts about HP 2133 Mini-Note

Filed under: Uncategorized — Tags: , , — yasi8h @ 4:24 pm

On My Bed, Looking Smart 🙂

Slim and Looking Good

More Pictures on flickr

My dad got a HP 2133 Mini-Note as a gift (!!!, seriously, its me who should have got a gift like this 😛 ). He don’t really use it and i am the only one to spend some time with it. This is the first ever net book that i got my hands on. I expected a lot more from a netbook than what i got from 2133. I think this is due to the fact that the model i got was some  what a economic edition, it had Linux and thats good. But i think HP made my model as a low end one so needless to say it degraded the net book’s performance. Why do everybody have to us Linux users less RAM anyways?!#!!. It didn’t have a SSD, the cpu is a via and its not as powerful (i don’t want it to be as fast as my desktop cpu or even come close to it. but its still too slow for doing some web browsing and playing some music. it lags at times…etc) as i want it to be. And the battery don’t last that long. Plus it gets really hot!.

Any how now this model is suspended and is replaced by the newer 2140.

Following specs were obtained from the HP’s web site (

Model number KX872AA (This is what i got) FF009AA
Operating system installed SUSE Linux Enterprise Desktop Genuine Windows Vista® Business
Processor Via C7-M (1.2G) Via C7-M (1.2G)
Memory 1024MB DDR RAM 2048MB DDR RAM
Network Support 56K Modem, 802.11b/g,Bluetooth 56K Modem, 802.11a/b/g,Bluetooth
Disk 120GB HDD 120GB HDD
Battery 3-Cell LiIon Battery 6-Cell LiIon Battery
Warranty 1 year 1 year
OS Linux VB OFC07 Ready

Simple breakdown of pros and cons as i see it.


  • Looks nice
  • Solid build
  • OK Keyboard
  • Small size
  • Came with Suse Linux pre installed! (i uninstalled it and installed Ubuntu straight away ;))
  • No Drivers-Missing problems with Linux. Almost (dynamic CPU frequency setting was not working on stock Ubuntu. I am sure this contributed to the cons about low battery life and too much heat) everything works with a default Ubuntu installation.


  • Processor is too slow
  • Didn’t come with a SSD
  • Gets really hot
  • Battery life is too short for a netbook
  • Heavier than it looks 🙂

I am sure i can make this useful in many ways, but its not the ideal net book i had in mind.

November 7, 2009

Installing uTorrent on Ubuntu – “It seems like utorrent is already running but not responding” Bug Fix/Workaround

Filed under: Uncategorized — Tags: , — yasi8h @ 10:20 am

I got the above mentioned error when i tried to install uTorrent 1.8.4 on Ubuntu Karmic Kola i386, though wine. But this error does not come if you try to install utorrent 1.8.2 or a older version. Hence i installed 1.8.2 and then updated it to 1.8.4 and it works fine. i think the latest versions have some bug in the installer part. installing a old version that doesn’t have this bug and upgrading seems to be a good work around. Note that if you installed 1.8.4 or something newer you will have to uninstall it from wine and then install 1.8.2. even then if you are getting the same error try killing wine and restarting it (wineboot should do the trick according to If that doesn’t work for you just kill the two processes that belong to wine and restart it).

February 16, 2009

Reawakening of my inner linux ‘freak’ – Moving into Arch Linux

Filed under: Uncategorized — Tags: , , , — yasi8h @ 6:13 pm
arch linux - kde - yakuake

arch linux - kde - yakuake


I’ve been using linux for like 4 years now. in the beginning i was just trying it out. back then i used almost any thing i could find. redhat/knoppix/suse/debian…etc but back then i was only trying them out. but for the last one/two year(s) I’ve been with ubuntu. the reasons were simple. it just worked! but recently i felt so bored with my system. so last weekend i download a Arch iso and started installing the distro.

Why Arch Linux

  • simple
  • packages are build for i686, thus they will be more optimized(good for my ‘old’ laptop)
  • pacman is good(I’m a huge fan of apt, so a good package manager was a must)
  • good documentation/support/community
  • i can choose what i want to install, i have control over what’s getting into my system. ie: the system is really ‘mine’ when its done.
arch linux kde desktop

arch linux kde desktop


i read a bit of the beginners guide available in the Arch Wiki. but soon got bored 😛 so i followed along the installation script. it was pretty straight forward. but i wanted to use ext4 as my root file system. as i was trying out a new distro. i figured this is the best time to try out the new file system. after all there was a lot of talk going around about ext4 been much better than ext3(naturally…). i was installing the system on my laptop. which is a bit old. so i thought ext4 would help me with the speed. and after all one of the reasons i choose to go with arch was that all it’s packages were build for i686 platform. which will usually make em run faster.

Arch and Ext4

as of now(16/feb/2009) official arch installing media doesn’t support ext4. meaning you wouldn’t be able to just make a ext4 partition the way you would have made a ext3… because the tools needed for it are not included in the installation media. but its not that hard to get it working. the best way to do is(ASFAIK) installing the system in to a ext3 partition. and then converting the partition(s) ext4. when you need to convert your root partition you have to use a live cd to do it. its pretty straight forward. please refer to the arch wiki for more info.

btw i tried to upgrade the live cd(arch installation media) before installing the system so i could get all the ext4 supported tools..etc but that was too good to be true. it broke the system. and when i tried to get around the broken stuff it eventually lead to a kernel panic! 😛 but its ok. its nice to have experiences right? 🙂


i am so amazed with the latest release of KDE! it rocks. i have been a gnome(default in ubuntu) user for a while now. never had much time to look at kde. even when i got a chance to work with it. it felt a bit uncomfortable so i never really wanted to try it out. but lately i’ve been more and more curious about KDE. so this time i choose to go with it. wow. it was really nice. its visually appealing. but wait its not the main thing. its rock solid! i have only 512MB ram. but still it works grate. no slow downs or what so ever. i feel good about the way it looks and works. but there are somethings that i am still a bit alien to. but its ok. i am getting used to KDE. its grate. i suggest you give it a try too. you never know, you might like it too.

archlinux - kde - firefox - KFirefox theme

archlinux - kde - firefox - KFirefox theme

Where is Firefox?

i found it a bit hard to believe that firefox is not the default browser in KDE at first when i installed it. but then again konqueror is a decent browser too. anyways i switched to firefox. when you start up firefox you would notice something. that is it looks damn UGLY! i think this is because it is not a kde application. but no worries you can get it to look better by installing KFirefox theme. it gives a nice look. and FF would look much more like a kde app.

kde 4.2 - kickoff application luncher

kde 4.2 - kickoff application launcher

Getting Stuff to Work

unlike ubuntu arch expects you to read stuff and install what you need by your self. its not hard. but it will need some of your time. you will need do some googling at some point or other and find out about things that you need and install them by your self. for example when i tried to connect to my gmail/gtalk account using kopete. it just didn’t work. reading around a bit reviled that it need a SSL library installed in order to work with gtalk. i had to install these libraries by my self. but of course its just a ‘pacman -S package’ away! 🙂

Arch WiKi Rocks!

arch wiki is a very rich source of information when you trying to solve your problems about arch. it will really teach you a lot of things about your system. whenever you want install some package or whenever you want to learn about how to do something in arch. its best to check out the wiki. as it have answers/articles for most your common problems. it will save you a lot of time.

Final Thoughts

i’m kinda happy that i choose to go ahead and install this new distro. i now have a good system running in my laptop. arch linux is a grate distro. you might want to give it a try. its not for everyone. if you don’t won’t to mess with your system and just wants something that just works. go for ubuntu/fedora/mint…etc. but if you want a system that is pretty simple and configurable to your liking. arch is a good choice. you can make a lot of choices when you choose arch. unlike in ubuntu where a lot things are already decided for you(this is good if you just want everything to work…).

December 7, 2008

Netbeans, NX server/client and Ubuntu

Filed under: Uncategorized — Tags: , , — yasi8h @ 5:13 pm

when i am using Netbeans to code i usually run it in my desktop because it is a bit resource hoggy(well i am saying this while jugging it by my standard’s. i only have 512 in my lap). i do this using NX. i have a NX server running in my desktop while my client has NX client. both machines are running Ubuntu(what else ;)). desktop is running 8.04 and the lap is running 8.10. so what am i writing all these in my blog? well i came across some problems while using the above setup. so i thought of noting them here.

Keyboard gone nuts: pressing the Arrow(↑) on the client(while logged in to the host via NX) brings up “Take Screenshot”

this is apparently a common issue. you would find plenty of materials on this if you google about it. for me the fix was setting the Keyboard model to Evdev Managed Keyboard in the Desktop(Host). you can go there through Preferences -> Keyboard preferences…

Screen fails to update/refresh it self as needed while on Netbeans, making it confusing to read the source code

this issue was a show stopper for me. i needed to code and with this i cannot. basically the issue is like this. when you are in netbeans writing some code, if you try to scroll an already opened text file, down and up again. the text get scrambled. basically some lines of code gets duplicated. for this to happen you should scroll the document down and then scroll it up again. this is only a display issue. so if you some how managed to refresh that ‘area of the screen’ you can see the code as it is.

after trying different options in the NX client. it seems that disabling the shared memory option in NX client’s display options do the trick. at least it works for me(in the login dialog click configure -> display setting tab -> display options -> disable shared memory).

i love netbeans. its pretty neat stuff. and NX is much better than VNC and stuff. so right now i can code using netbeans which is running in my desktop with a lot of resources, through my lap, which is in a very ‘physicaly’ reachable and comfortable place for me. in case if you are wondering why i can’t just use the desktop it self. well i can. but its not very comfortable due to bad furniture…. it hurts my hands. so that’s the reason i am using my lap.

How to switch from the full screen mode in NX client

simply take your mouse to the top right corner of your screen and click(the pixel in the top most right corner). cool ha? i found it through… google of course! 🙂

alright now i’m goning to sleep…

November 27, 2008

Configuring a Static IP Address in Ubuntu 8.10

Filed under: Uncategorized — Tags: , — yasi8h @ 4:36 pm

i recently wanted to give my lap a static ip for some n/w administration purposes. i am running ubuntu 8.10 on it. the network manager was the usual way to go about when getting this done so i tried setting a static ip from the network manager. but it doesn’t work as expected. my configuration gets replaced my the default auto detected one when i restart the machine. when i googled it, i found out that its a know bug(its a very simple thing IMHO it should have been detected and fixed!).

so i followed what appeared to be a good blog post on fixing this issue. it was very straight forward and i followed the given instructions in that post. but it was not working for me. basically i couldn’t even ping my gateway. so i restarted the lap. then i could ping my gateway. and everything seems to be ok. but the dns was not working as expected. in my /etc/reslov.conf file i have specified two nameserver. my localhost and my router(which runs a dns server). but when i try to lookup a dns address the system seems to be only seeing my localhost as the available dns server. btw because of my GRATE ISP, and the SUPER FAST dns server which have a 100% UPTIME! i am using dnsmasq for caching(so that would speed up my internet browsing). dnsmasq it self supports some DHCP capabilities. so i don’t know whether they are messing things up for my system. anyways, all i had to do to get things up and going was to change the /etc/dnsmasq.conf file and add the line

server= is my dns server’s(dns server running in my router) address. now when ever dnsmasq gets a dns request he will look in his cache and if its not there he will ask my dns server running in the router(he will ask from my isp’s … so on…).

this sloved my problem. atleast for now. i don’t know what really caused the first behavior i noticed. but i am too lazy to find about that. so this should fix it for now.

April 8, 2007

Convertion WindowsXP –> Ubuntu

Filed under: Uncategorized — Tags: , — yasi8h @ 3:06 pm

My Desktop Now days… 😉

My Desktop Some Time Back

Songbird In Action!

You know what? changing your OS for real is not that easy. mainly because of the fact that as a human you get used o everything that you use in your daily life. for me when i was in XP i had some favorite apps as everyone does. utorrent for torrents, 7zip for unzipping stuff, firefox for web broswing… etc hey now do you notice anything in them? well yeah i was already using some grate open source projects/apps… so if i make the switch it won’t be a lot different for me to use the apps.. as firefox, 7zip… are there for linux. and most of the open source apps are cross platform so you can have a good faith that your favorite open source app will be there for linux. but this is not always true. i use emule… that was when i used xp… but emule does not run on linux. well yeah it may run through WINE.. or any other emulator.. like utorrent does. but it does not run natively on linux. so i had to find a altanative. and the altanative was amule witch is like emule+ for windows(and for linux too i guess)… it was cool…. i mean when you are using linux you have so many choices to be made! isn’t that just wonderful?

when i want to fond a good music player i have a dozen of em! i mean good ones!!! hehe…. well i am currently using Songbird it is still in testing though.. but it is so wonderful. now some of you may say that it is a exact copy of iTunes. but i strongly disagree with you all… it is soooo much more than iTunes…

well the change was not all free of problems. i have some problems with sound(sound tend to crash at random intervals and it seems that the only way to get it back is to restart the OS… which is pretty annoying! :), and some othe minor issues….

I installed and checked out the cool 3D desktop with a lot of other graphical magic! i just could not believe it! see this is open source! this is the power of the community!

all in all i am so happy that i made the right choice after all this time… i am benefiting from it. I can’t delete windows off because i can’t control my screen brightness with out it…. and i say fuck you toshiba and all the manufactures who don’t care enough to support linux! yeah fuck you!

long live open source! you all who contribute to the community, you rock! i am so thnakful to all of you!

I love linux! 😉 cause it gave me freedom…. and it tastes sooooo sweet.

Older Posts »

Blog at