my fav handy-tools for bash

Here I go to share my favorite handy tools with you all. I basically lazy and wish to be always.So here goes my tools make your life too.


I miss my favorite commands/shortcuts :

kesavan@kesavan-Ideapad-Z460:~$ lsn
bash: lsn: command not found
kesavan@kesavan-Ideapad-Z460:~$ LS
bash: LS: command not found


Download latest & .vimrc from kesavanm – handytool – GitHub

kesavan@kesavan-Ideapad-Z460:~$ wget
--2015-03-06 18:34:08--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11796 (12K) [text/plain]
Saving to: ‘’
100%[==============================================================================================================================>] 11,796      --.-K/s   in 0.01s   
2015-03-06 18:34:08 (1.01 MB/s) - ‘’ saved [11796/11796]
kesavan@kesavan-Ideapad-Z460:~$ wget
--2015-03-06 18:40:32--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 776 [text/plain]
Saving to: ‘.vimrc’
100%[==============================================================================================================================>]  776         --.-K/s   in 0s      
2015-03-06 18:40:32 (23.6 MB/s) - ‘.vimrc’ saved [776/776]

Move to your bin

kesavan@kesavan-Ideapad-Z460:~$ cd bin/  

Download latest .todo & .todo_list under your bin  from kesavanm – handytool – GitHub

kesavan@kesavan-Ideapad-Z460:~$ wget
--2015-03-06 18:44:48--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1595 (1.6K) [text/plain]
Saving to: ‘.todo’
100%[==============================================================================================================================>]  1,595       --.-K/s   in 0s      
2015-03-06 18:44:48 (35.3 MB/s) - ‘.todo’ saved [1595/1595]
kesavan@kesavan-Ideapad-Z460:~/bin$ wget
--2015-03-06 18:45:01--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43 [text/plain]
Saving to: ‘.todo_list’
100%[==============================================================================================================================>]  43          --.-K/s   in 0s      
2015-03-06 18:45:01 (1.99 MB/s) - ‘.todo_list’ saved [43/43]

Edit .profile to include

kesavan@kesavan-Ideapad-Z460:~$ vim .profile

Give permissions too :

kesavan@kesavan-Ideapad-Z460:~$ chmod +wx ~/bin/.todo

You’re done! Just start action.

kesavan@kesavan-Ideapad-Z460:~$ source .profile
Be lazy
Be always double lazy
Your #TODO action(s)
1: watch movie
2: have dinner

WOW ! I got it.

kesavan@kesavan-Ideapad-Z460:~$ lsn
total 404
775 drwxrwxr-x 2 kesavan kesavan   4096 Jan 25 20:46 bin
755 drwxr-xr-x 3 kesavan kesavan   4096 Mar  3 07:55 Desktop
755 drwxr-xr-x 3 kesavan kesavan   4096 Feb 22 22:59 Documents
755 drwxr-xr-x 8 kesavan kesavan  20480 Mar  6 15:10 Downloads
755 drwxr-xr-x 9 kesavan kesavan   4096 Jan 27 19:26 firefox
755 drwxr-xr-x 2 kesavan kesavan   4096 Jan 25 15:55 fontconfig
664 -rw-rw-r-- 1 kesavan kesavan 329502 Dec 14 18:45 indexer.htm
755 drwxr-xr-x 2 kesavan kesavan   4096 Apr  1  2014 Music
775 drwxrwxr-x 3 kesavan kesavan   4096 Dec 27 16:41 OpenELEC-RPi.arm-5.0.0
777 lrwxrwxrwx 1 kesavan kesavan     40 Jan 25 19:37 ownCloud -> /media/kesavan/Home-Old/kesavan/ownCloud
755 drwxr-xr-x 2 kesavan kesavan  12288 Mar  5 13:31 Pictures
755 drwxr-xr-x 2 kesavan kesavan   4096 Apr  1  2014 Public
755 drwxr-xr-x 2 kesavan kesavan   4096 Apr  1  2014 Templates
775 drwxrwxr-x 6 kesavan kesavan   4096 Dec 31 16:19 tmp
755 drwxr-xr-x 2 kesavan kesavan   4096 Aug 27  2014 Videos    
kesavan@kesavan-Ideapad-Z460:~$ LS Desktop
93M        Desktop
kesavan@kesavan-Ideapad-Z460:~$ LS Documents/
128K        Documents/
kesavan@kesavan-Ideapad-Z460:~$ LS Pictures
52M        Pictures

Share me if you’ve any questions.

Posted in gnu, linux, technology | Tagged , , , , , | Leave a comment

EtherPadLite in WebFaction (or at your GNU/Linux)

Setup NodeJS

[kesavan@web322:~/webapps]$ ls nodejs/bin/
 node  npm  start  stop
    • Export the PATH
      export PATH=$PATH:~/webapps/nodejs/bin

Setup Etherpad lite

Setup listening application

  • Goto
  • Create a custom application with listening to port
  • Here’s mine – app_talk2_kesavan Custom app (listening on port) (port 23040 – open1) Web322
  • Map it with a Website and domain.Here’s mine:

 talk2_kesavan                        Domains                           Apps
Web322 – †  app_talk2_kesavan (Custom on /)

Change Settings:

vim ~webapps/app_k7_etherpadlite/settings.json # edit for the Port# 23040

Start  EtherPadLite

  1. Run etherpad lite [Make sure about export PATH=$PATH:~/webapps/nodejs/bin ]
[kesavan@web322:~/webapps/app_k7_etherpadlite]$ bin/

Enjoy your etherpadlite now at the domain you mapped

This note is written in etherpadlite running on [ Public: ]

Bonus (update)

#1 run the etherpadlite process continuously 
[kesavan@web322:~]$ screen ~/webapps/app_k7_etherpadlite/bin/ &

#2 list the screen process(es)
[kesavan@web322:~]$ screen -list  
There is a screen on:
    16269.pts-0.web322    (Detached)
1 Socket in /var/run/screen/S-kesavan.

#3 back to the detached screen session
screen -r 16269.pts-0.web322

#4 quit the running process , detach by above command
CTRL+A then :quit
Posted in gnu, linux, technology | Tagged , , , , , | 1 Comment

Nilavu(2010) – A Malayalam Movie – Review

Merry Christmas everyone! After done with my breakfast today, I just thinking what todo and browsing across my old laptop , I come into the song of ‘Ariyathe, onnum parayaathe’ and immediately I searched for the metadata of the movie. I’m lucky, the movie available online.

I thought of spending time with Nilavu and it’s really worth. Almost all the characters did their best.It’s a good malayalam movie. I don’t want to go for srt/sub titles. I wish to go with native language , even though I might hard to understand and enjoy emotions expressing trhough words.At most situation , the scene itself enough to judge ‘A picture worth thousand words’.

As I just watched only the song, I thought Sreelekha might occpy the full space. Instead it is Sunitha Nedungadi. She did her best in the role Lakshmi, a nature loving artisitc mature woman married to a high class business man, who is always busy flying across the globe for money leaving wife lonely in the dry Gulf.

The story begins with Hari , the young man getting prepared for Gulf with his wife , and everyone in the home pack his needs at Gulf incuding Pickle. Her mother takes care of everything , including the ‘Nelica saru’ [Aamla extract]. As it happens,his father’s friend seeks his recommendation for his son for a job in Gulf.It happens once you done with your settlement.

When he landed Gulf, he lie to her wife going to Office but to seashore , waiting for someone.The story starts here.He recalls his first arrival to Gulf for the Job of interior design. Everything appears new to him & his room mates teach him from How to cross the signal to how to tie.As a part time job, Hari wish to work as photo lab techinician where he retouch the old photos bringing new colorful life. One of such client impressed with his work gift him a statue of Nataraja , leaving a note with her number. Their relationship starts to develop in a new platform , leaving all monetery consumerism left behind.

Lakshimi then invites him to her home showing her loneliness with her collections of arts and paints feeling that it’s a museum to him.She love to spend time with him. And he too have some untold stories of his own. One fine day she take him to her native, where she grows and how she feel there. Back to Gulf, it’s all how people missing everything in their native , just for money, dinar including mother’s death.

The film moves in a way that a feather of birds falls from the tree without no prediction of direction. It’s all about emotion of Human , touching life. Situational dialogue such ‘raathri maatrum mathi’ [a night itself enough ] takes the audience, to feeling to lonely woman missing the life she wish to be.

Here’s my best scene:


  • Lakshmi serving wine for Hari in her home and lights off the candle taking him to shadow of Nilavu [Moon light]
  • Throwing away  the Jasmine on roadside ,lakshimi decorated herself after her husband Shankar’s praising on her showing her feeling .
  • Narrating about her fancy on Kumkum (Shindhor pottu) on every bath to Hari
  • Sensing the leaves of plant touch-me-not [ Mimosa pudica], recalling her childhood.
  • Cutting the phone call once Hari informed about his marriage and leaving a gift for her upcoming wife.
  • Dialling his number , not picking from the phone-book , [Director AjithNair , here shows how real people memorizes numbers of loving ones ] and cancelling the same leaving Hari to go with his new life.


  • Sreelekha – Expressing her emotions throught the song ‘Ariyathee , onum paraythee’
  • Where she can’t intake the juice of Betel leaves she had in everyone’s absence and spit somewhere on walk side where Hari coming
  • Her smiling face , while the Panikar [Horoscope matching pro] expressing non-match of their stars for marriage, hiding the tears.
  • Gowri – Did her role in right way as receptionist , junk food eating lady.”Working hard or Harding work” kind of dialogues her boss and her reaction , a timing joke.

Everyone else, including Hari did their best. Thanks director Ajith Nair!

Some shots from the Movie:

Posted in movie, photography | Tagged , , | Leave a comment

Ten weeks in Ten minutes

May you know or not , it’s done. Yeah. My trip to United States.Most of my friends ask me about my experience there & the life style they’ve. And this post may serve on that purpose.

Week 1 :

The trip initially starts from Chennai on May 31st and my itinerary about to go to Doha then Newyork and finally Saltlake City. The air hostess starts to serve the breakfast by 6:30 am , which I never expect.But I’ve too.After four hours I was at Doha for two hours.Hot and dusty atmosphere.Then comes the thirteen hours of journey on board.The Qatar airlines features movieplex on board and I starts to watch ‘Life of Pi’.

A young couple nearby me in their romantic mood as the flight approaching the Newyork JFK port.Once checkin’s and other formatlites done, my first $20 spent for Pizza & Coke.It comes around $13 something and I was provided with some Dime and Cents.As I’m unaware of the value of Dime at that time, I’m not sure about the exact change. Trusting the Pizza girl, I don’t count it again, but keep it separate for future investigation.

Pizza with Coke

First $20

As time ticks around 3pm, I rush to BlueJet flight to Saltlake City SLC port. There an old couple near by.They are telling about the sites nearby Saltlake city and confirms the 10 cents equals one Dime.

The guys Mathi/Seetha/Abhi welcomes me in to their room. Enjoyed five Chapathi’s with egg kuruma in that mid-night. Next day, we had done with some groceries in nearby Harmon’s and Wal-Mart.

In that night , I’d an issue with my Linux edition on Lenovo Z460 and I work with console mode only.

Next day starts with Kellogg’s and Strawberries which I’m okay with.

Josh welcomes me to the Office on the very first day.Everything appears new and different.Here is some snaps from first day.

The time runs too fast and it was Friday. I plan for outing that week end and TripAdvisor advice me to go for Liberty Park and Gilgal Garden.

Week 2:

One thing I love at Onshore is , they meet only on Wednesday, that too for meeting and other misc purposes. So I’d chance to meet people only on Wednesday. But for my case Josh comes to Office to give company for me 2-3 days per week. Jeff Compas promised me to meet the next Wednesday. Casey [my boss, there] and no one excepts his visit to Office after very looOng time [twice in a year]. He took me to Thai restaurant nearby with Josh and Travis.

The guys at room nowadays feels that I was odd man in their circle as I was too sticky with Indian mentality.We’d some arguments and quarrels over that.Next day it was decided to goto WalMart with Dhoti/Lungi. Why not? To their surprise , I feel more comfort with Lungi on US roads.

That week end I went for Natural History Museum in Utah University.The museum shows exhibits of natural history subjects, specifically about Utah’s natural history.They illuminate the natural world and the place of humans within it. The Museum’s collections emphasize the natural history of Utah and are accessible to researchers from around the world.

Week 3: Silver Lake

Silver Lake is one of those destinations we tend to hit up a few times every summer.Silver Lake is a great place to visit for a quick bit of escape from the valley, and a good place to find some cooler temperatures for a nice relaxing walk in the height of summer, or indeed in the fall.The scenery is beautiful, the temps are cooler than down in the valley, they allow fishing, and there are picnic tables. It’s a great place to come and just slow down a bit. Just a tip–keep an eye open for moose.The hike is through a fairly treeless area, with little shade, so bring plenty of water and try not to hike in the middle of the day during the hot summer months.

Week 4: Ganesha Temple

Seetha in the room wish to visit nearby Ganesha temple & we plan to go that week end. It’s nearly 40 miles from our location & that is the only temple in Utah , [the priest said so].Here’s some snaps from Ganesha temple. The pooja archanai costs around $11 and I we offer prayer to them.Week 5: Independence day Celebrations

Josh invites me to his Dad’s home for July 4 Independence day Celebrations.Really enjoyed that Dinner and Fireworks.He picks me from my Home. There I’d a great time discussing with his wife Jenny who revealed more secrets about Josh.Here’s Josh second son William.

Myself with William , Josh's second son

Myself with William , Josh’s second son

And Josh originally shared his album to me with a note “Independence Day Celebration. Thanks for coming, we had a blast!”

Here’s more from Josh side:Week 6 

I spent my weekend at a Hot spa nearby. I love to swim & swimming is good there as expected but cost me $14.99. But it’s worth.You may find some private snaps in my Google+ / twitter @kesavan200oin

Week 7

It’s full rest and some shopping. On Sunday , we went for a movie at Valley Mall nearby. It was LONE RANGER , The Legend Returns. The Popcorn with Coke seems little expensive but no other choice left for us.

Week 8

The seventh week end is really a good one. We’d some Indian style Biriyani [the guys at restaurant is from Chennai & Trichy]. We try to cover some important sites in and around of Downtown.

  • Various historic important Churches
  • Temple Square
  • The Church of Jesus Christ of Latter Day Saints
  •  Utah State Capitol
  • TRAX Service

You may find some good snaps in this slide show on the above sites here.

Week 9

And my brother order me to visit Las Vegas before I leave the states. And so I booked tickets for me & team to/fro Las Vegas & two nights stay. And it is not worth we’re the first group to visit LasVegas with cooked food.

  • Lemon rice
  • Curd rice
  • Tomato rice

It’s hardly 8 Hr journey from Saltlake city to LasVegas. The way to LV is mixed with dry,hot,dusty atmosphere. The bus is only half-filled. We’d our Tomato rice for lunch inside the bus. It was 6:30 pm, when we reached LV. After finding our Hotel 1.5 miles apart of the station , we took a refreshment.

LV is different city. Life at LV starts only at 7 Pm and shuts at morning 6 Am. Full of colorful lights , casinos, arts, beers and everything you need. We’re hard to find water but beer is just a meter away .There’s lot of bus service running in night to cover major sites and we got such one. After that it comes to know that it was prepaid kind and we’re travelling without-ticket category. Immediately in the next stop we get down and buy one ticket in the vending machine.

Everywhere I find Gambling and Entertainment stuff. Clearly I understood why the City is called as Sin City & Capital of Second Chances. Dan earlier informed me that it is not Las Vegas it’s Lost Wages. That’s true to realize there.

Most important we cover the following spots.

  • The Stratosphere
  • Downtown Casinos
  •  Las Vegas Strip

The big shot I experienced at the stratosphere is the one, I never forget in my life time. The overview of the city from 108 floor level is amazing one.We explored various casinos and roaming around the strip clubs.You may love the city snaps.

Week 10

And my last week this time to states and my boss and team wish to have farewell treat to me.Casey took me to Mexican restaurant [my choice] and we’d a great time there.The team is happy to pose me for snaps.Josh took me fine snaps with Travis,Randy,Dan and Casey.Philip left the office early that day.

Finally the day come. August 10. I’ve to fly to Chicago and then to Doha finally Chennai.When I reach Chicago , I failed to find water fountain inside port and the half-litre water cost me around $4.

FIJI Water

FIJI Water

My tweet that time says that “500mlல ஒரு சொட்டு கூட விடாம குடிக்கலாம்னா 20ml
@Fujiwater கீழ போயிருச்சே! பின்னே ரூ.237.85 சும்மாவா?” . But I’ve to digest that.

At the customs duty free shop, to fulfill the request of friends and relatives satisfying their demands over US items, Marlboro, Chivas Regal and Black label are added to my duty free list.

US Items

US Items

Everything done and it’s time to say Good Bye, America. OMG! on the flight I noticed I missed my Sun Glass somewhere in Chicago port. Too late.

That’s all folks.

Posted in photography, travel | Tagged , , , | Leave a comment

Android OS | Changing Country settings

Wow! It’s really awesome to have Android 4.2.X  on Nexus 4 in hands , but sometimes I annoyed with the message , “This service/application not available at your country”. Yeah, coming to the point I try to install “Google Shopper” application on my Nexus 4, but as expected I’m warned it , that application is not available to my country.

The funny part here is, I’m this time in United States and my service provider is T-Mobile, but still Google feels my mobile is in India , where I initially operated.

I tried in Googling, research online forums but no luck.Finally decided to call the Help desk of Nexus 4.

Finally I decide to contact Google itself directly. Google Nexus 4 support team attend my call and re-direct it to PlayStore team. Sarah attend my call on behalf of Google Play store. And she cleared my problem and finally here is the solution. Hope this helps someone.

  • Google always look into your Google Wallet Contact for identify your device’s current location , wherever physically you’re.

To do these steps to make the desired country as your default in the device you’re running android.

  1. Sign into your Google Wallet account to manage your payment methods (
  2. Add a new card or change your default payment instrument to one with a billing address located inside your desired country
  3. Open the Play Store and navigate to any item available for download
  4. Click to begin a download until you reach the “Accept and buy” screen (no need to complete the purchase)
  5. Close the Play Store and clear data for the Google Play Store application (Settings > Apps > Google Play Store > Clear Data) or clear your browser cache
  6. Re-open the Play Store. You should now see the Play Store that matches your default payment instrument’s billing country.

Here’s her Phone Call Follow-up mail:

Google's Support mail instruction for Android to Change Country setting

Google’s Support mail instruction for Android to Change Country setting

Posted in technology, travel | Tagged , , , , , , , | Leave a comment

Welcome New Flickr!

And it’s a great moment to celebrate the Flickr’s new layout/design and changes.

There’s no more 200 photo limit & 1 Terabyte of photo,video storage to all free users !  Unable to belive what you just read now? Me too. Go head reading the offical news release on Flickr Blog.
Here’s some snapshot on new Flickr!

flickr-home flickr-setflickr-fav flickr-collections

 As mentioned, a truly

A better Flickr is here.

And not a moment too soon. With all of the power that you love, Flickr is now in its most beautiful form, and available to everyone.

Here’s how new Flickr limits reads:

What’s the difference between a Free, Ad Free, and Doublr account?

There are three kinds of accounts to choose from at Flickr, and all of them are awesome in their own way.


  • 1 Terabyte of photo and video storage
  • Upload photos of up to 200MB per photo
  • Upload 1080p HD videos of up to 1GB each
  • Video playback of up to 3 minutes each
  • Upload and download in full original quality

Ad Free:

  • $49.99 per year
  • All the benefits of a free account
  • No ads in your browsing experience


  • $499.99 per year
  • 2 Terabytes of photo and video space
  • All the benefits of a free account

Nothing else! What’s a basic user needs more? Thanks Flickr and Yahoo! team. You again prove how much bigger and smarter.

Here’s my comments to the [Official topic] Feedback on today’s site changes
“I love you Flickr. Awesome changes “
So what you wait for? Shoot & Share. A bigger and Better Flickr is here

Posted in Uncategorized | Leave a comment

Thanks BharatMatrimony for enhancing your security

This is to say thanks to Team BharatMatrimony! Here’s why? Actually this Part II of the story, while the Part I is at

“Don’t see my password! Please… “

If you didn’t read the blog earlier, read that first. So that you can understand. In that I mention how the Passwords are under attack and how it can be protected.

After three months, I again to check the status of their protection. To surprise, everything changed now.

Forgot Password Mail

Forgot Password Mail

Wow! It’s a great step towards better protection. Clicking on the link took me directly to set new password instead of showing it in screen.

Reset the password

Reset the password

Thanks Team at Consim & BharatMatrimony for your effort protecting user’s privacy ! I hope you done with Hashing the user’s password.

And a great thanks for listening my voice on the same!

Kudoos for your team!

Update 1:

Here’s what my twitter card saying at

Tweet on BharatMatrimony

Tweet on BharatMatrimony

Posted in technology | Tagged , , , , , | Leave a comment

Reliance NetConnect+ on Ubuntu 12.04

After I shift to new area , [Future Homes at Kurunji Nagar] , I network connection becomes completely void.

  • BSNL Broadband and Airtel Broadband are completely not feasible as they clearly informed.
  • Vodafone IN shows coverage on my Mobile device , but it doesn’t actually.

I brother after a long quarrel comes down with a Reliance NetConnect+ . It works well with the stupid Windows7 in my VirtualBox but failed in Native Ubuntu 12.04.1 LTS.

After did a long analysis on Google , it seems I need to install “gnome-ppp” but I have some other issues with “apt-get install -f “. So decided to ignore  “gnome-ppp” . And here is the final artifact on How to connect Reliance NetConnect+ on Ubuntu 12.04

  • Verify your MODEM detected in Ubuntu :

First command in ‘lsusb’ and make sure you find WCDMA device as in my case “Bus 002 Device 017: ID 19d2:fff1 ZTE WCDMA Technologies MSM”

priya@localhost:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 017: ID 19d2:fff1 ZTE WCDMA Technologies MSM 
Bus 002 Device 004: ID 5986:0190 Acer, Inc 

Modify the /etc/wvdial.conf

Then proceed to modify the contents of /etc/wvdial.conf as shown below. The Modem might be

Modem = /dev/ttyUSB0


Modem = /dev/ttyUSB1

depends on your case. Here’s my complete contents of /etc/wvdial.conf

priya@localhost:~$ cat /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB  Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Phone = #777
Username = 93*0*9*2*4
Password = 93*0*9*2*4
Stupid Mode = 1                             
  • Connect with wvdial
priya@localhost:~$ sudo wvdial
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
CONNECT 2400000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Tue Mar 12 09:04:20 2013
--> Pid of pppd: 6176
--> Using interface ppp0
--> pppd: ���[08]���[08]
--> pppd: ���[08]���[08]
--> pppd: ���[08]���[08]
--> local  IP address**
--> pppd: ���[08]���[08]
--> remote IP address**
--> pppd: ���[08]���[08]
--> primary   DNS address 220.226.6.**
--> pppd: ���[08]���[08]
--> secondary DNS address 220.226.100.***
--> pppd: ���[08]���[08]

If you’re able to see the primary DNS address 220.226.6.** and secondary DNS address 220.226.100.*** , success then say congrats to yourself.

If you face something weird , comment me. I try to look into it.


Posted in linux, technology | Tagged , , , , , | 1 Comment

Protected: சோழவந்தானும் முருகதேவனும்

This content is password protected. To view it please enter your password below:

Posted in Uncategorized | Enter your password to view comments.

Installing Apache/MySQL/PHP on ELCOT provided BOSS Linux

Today one of home town’s job seekers come home directly seeking advice on LAMP development.He said , he tried with XAMPP on his Windows7 , but it refuses to start the web server the Apache.

The laptop he own is a decent one, brought to him by the Government of Tamilnadu for Students in College/Higher education.

I tried to uninsatll the exisiting XAMPP package and re-install the same.Still no luck. The problem is with Windows Socket server and it is not listening at port 80 and others.

Whenever I try to start the Apache, I received the message:

Syntax error on line ## of :path/to/apache/conf/httpd.conf:
Listen setup failed
alloc_listener: failed to get a socket

As the laptop comes with Dual-OS pre-installed with C-DAC ‘s version of Debian/Linux OS, the BOSS, I go for LAMP and not XAMPP and/or WAMP.

1) Get your root password : I don’t have the root privilege and need it now.

elcot@boss:~$ sudo -i
You can now choose the new password or passphrase.

A valid password should be a mix of upper and lower case letters,digits, and other characters.  You can use an 8 character long password with characters from at least 3 of these 4 classes, or a 7 character long password containing characters from all the classes.  An upper case letter that begins the password and a digit that ends it do not count towards the number of character classes used.

A passphrase should be of at least 3 words, 11 to 40 characters
long, and contain enough different characters.

Alternatively, if no one else can see your terminal now, you can pick this as your password: "Canvas$assure3victim".

Enter new password:
Re-type new password:
passwd: password updated successfully

2) Install the Apache web server

root@boss[~]#apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-worker apache2-utils apache2.2-common
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-mpm-worker apache2-utils apache2.2-common
0 upgraded, 4 newly installed, 0 to remove and 44 not upgraded.
Need to get 474 kB of archives.
After this operation, 2,675 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 savir/main apache2-utils i386 2.2.16-3 [164 kB]
Get:2 savir/main apache2.2-common i386 2.2.16-3 [307 kB]
Get:3 savir/main apache2-mpm-worker i386 2.2.16-3 [2,224 B]
Get:4 savir/main apache2 i386 2.2.16-3 [1,386 B]
Fetched 474 kB in 32s (14.7 kB/s)
Selecting previously deselected package apache2-utils.
(Reading database ... 160490 files and directories currently installed.)
Unpacking apache2-utils (from .../apache2-utils_2.2.16-3_i386.deb) ...
Selecting previously deselected package apache2.2-common.
Unpacking apache2.2-common (from .../apache2.2-common_2.2.16-3_i386.deb) ...
Selecting previously deselected package apache2-mpm-worker.
Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.2.16-3_i386.deb) ...
Selecting previously deselected package apache2.
Unpacking apache2 (from .../apache2_2.2.16-3_i386.deb) ...
Processing triggers for man-db ...
Setting up apache2-utils (2.2.16-3) ...
Setting up apache2.2-common (2.2.16-3) ...
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Setting up apache2-mpm-worker (2.2.16-3) ...
Starting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
Setting up apache2 (2.2.16-3) ...

Now pointing the browser at http://locahost/ must reports that “It works” kind of message.

Open the Web root located at

root@boss[~]#cd /var/www

3) Install the MySQL DB server

root@boss[~]#apt-get install mysql-server
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following extra packages will be installed:
 libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-server-5.1 mysql-server-core-5.1
Suggested packages:
 libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
 libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-server mysql-server-5.1 mysql-server-core-5.1
0 upgraded, 9 newly installed, 0 to remove and 44 not upgraded.
Need to get 21.3 MB of archives.
After this operation, 50.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 savir/main libnet-daemon-perl all 0.43-1 [46.6 kB]
Get:2 savir/main libplrpc-perl all 0.2020-2 [36.0 kB]
Get:3 savir/main libdbi-perl i386 1.612-1 [879 kB]
Get:4 savir/main libdbd-mysql-perl i386 4.016-1 [138 kB] 
Get:5 savir/main mysql-client-5.1 i386 5.1.49-1 [8,301 kB] 
Get:6 savir/main mysql-server-core-5.1 i386 5.1.49-1 [3,933 kB] 
Get:7 savir/main mysql-server-5.1 i386 5.1.49-1 [7,814 kB] 
Get:8 savir/main libhtml-template-perl all 2.9-2 [65.9 kB] 
Get:9 savir/main mysql-server all 5.1.49-1 [64.4 kB] 
Fetched 21.3 MB in 6min 36s (53.7 kB/s) 
Preconfiguring packages ...
Selecting previously deselected package libnet-daemon-perl.
(Reading database ... 160956 files and directories currently installed.)
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.43-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.612-1_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.016-1_i386.deb) ...
Selecting previously deselected package mysql-client-5.1.
Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.49-1_i386.deb) ...
Selecting previously deselected package mysql-server-core-5.1.
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.49-1_i386.deb) ...
Selecting previously deselected package mysql-server-5.1.
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.49-1_i386.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-2_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.49-1_all.deb) ...
Processing triggers for man-db ...
Setting up libnet-daemon-perl (0.43-1) ...
Setting up libplrpc-perl (0.2020-2) ...
Setting up libdbi-perl (1.612-1) ...
Setting up libdbd-mysql-perl (4.016-1) ...
Setting up mysql-client-5.1 (5.1.49-1) ...
Setting up mysql-server-core-5.1 (5.1.49-1) ...
Setting up mysql-server-5.1 (5.1.49-1) ...
Stopping MySQL database server: mysqld.
130118 13:07:42 [Note] Plugin 'FEDERATED' is disabled.
130118 13:07:42 InnoDB: Started; log sequence number 0 44233
130118 13:07:42 InnoDB: Starting shutdown...
130118 13:07:47 InnoDB: Shutdown completed; log sequence number 0 44233
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
Setting up libhtml-template-perl (2.9-2) ...
Setting up mysql-server (5.1.49-1) ...

4) Verify that MySQL is up and running

root@boss[~]#mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 41
Server version: 5.1.49-1 (Debian)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> Bye

5) Install the stable PHP5

root@boss[~]#apt-get install php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-common php5-suhosin
Suggested packages:
The following packages will be REMOVED:
The following NEW packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 libonig2 libqdbm14 php5 php5-cli php5-common php5-suhosin
0 upgraded, 8 newly installed, 1 to remove and 44 not upgraded.
Need to get 6,391 kB of archives.
After this operation, 16.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 savir/main apache2-mpm-prefork i386 2.2.16-3 [2,284 B]
Get:2 savir/main libonig2 i386 5.9.1-1 [134 kB]
Get:3 savir/main libqdbm14 i386 1.8.77-3.1 [147 kB]
Get:4 savir/main php5-common i386 5.3.2-2 [518 kB]
Get:5 savir/main libapache2-mod-php5 i386 5.3.2-2 [2,768 kB]   Get:6 savir/main php5 all 5.3.2-2 [1,072 B]                    Get:7 savir/main php5-cli i386 5.3.2-2 [2,741 kB]              Get:8 savir/main php5-suhosin i386 [80.8 kB]                            
Fetched 6,391 kB in 2min 15s (47.2 kB/s)                             
dpkg: apache2-mpm-worker: dependency problems, but removing anyway as you requested:
 apache2 depends on apache2-mpm-worker (= 2.2.16-3) | apache2-mpm-prefork (= 2.2.16-3) | apache2-mpm-event (= 2.2.16-3) | apache2-mpm-itk (= 2.2.16-3); however:
  Package apache2-mpm-worker is to be removed.
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-event is not installed.
  Package apache2-mpm-itk is not installed.
(Reading database ... 161407 files and directories currently installed.)
Removing apache2-mpm-worker ...
Stopping web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
 ... waiting ..
Selecting previously deselected package apache2-mpm-prefork.
(Reading database ... 161403 files and directories currently installed.)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.16-3_i386.deb) ...
Setting up apache2-mpm-prefork (2.2.16-3) ...
Starting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
Selecting previously deselected package libonig2.
(Reading database ... 161408 files and directories currently installed.)
Unpacking libonig2 (from .../libonig2_5.9.1-1_i386.deb) ...
Selecting previously deselected package libqdbm14.
Unpacking libqdbm14 (from .../libqdbm14_1.8.77-3.1_i386.deb) ...
Selecting previously deselected package php5-common.
Unpacking php5-common (from .../php5-common_5.3.2-2_i386.deb) ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.3.2-2_i386.deb) ...
Selecting previously deselected package php5.
Unpacking php5 (from .../archives/php5_5.3.2-2_all.deb) ...
Selecting previously deselected package php5-cli.
Unpacking php5-cli (from .../php5-cli_5.3.2-2_i386.deb) ...
Selecting previously deselected package php5-suhosin.
Unpacking php5-suhosin (from .../php5-suhosin_0.9.32.1-1_i386.deb) ...
Processing triggers for man-db ...
Setting up libonig2 (5.9.1-1) ...
Setting up libqdbm14 (1.8.77-3.1) ...
Setting up php5-common (5.3.2-2) ...
Setting up libapache2-mod-php5 (5.3.2-2) ...

Creating config file /etc/php5/apache2/php.ini with new version
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
Setting up php5 (5.3.2-2) ...
Setting up php5-cli (5.3.2-2) ...

Creating config file /etc/php5/cli/php.ini with new version
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode.
Setting up php5-suhosin ( ...

Now say a Hello, to php!

echo "Hello \n";

6) Configure Apache with PHP

Then I wrote some sample PHP scripts and try to load via the browser. OMG! The source PHP is delivered to client directly without getting phrased by the PHP Interpreter.

Find the httpd.conf located inside /etc/apache2/ and the following few lines to it.

<FilesMatch \.php$>
    SetHandler application/x-httpd-php

Try to load it now! Works good…

7) Finally link PHP5-MySQL

Before leaving the spot, that LAMP is successfully installed and I just do a small task on reading contents from DB.

root@boss[elcot]#php /var/www/friends.php 
HiPHP Fatal error: Call to undefined function mysql_connect() in /var/www/friends.php on line 7

Opps! PHP is not talking with MySQL. Here’s how to make them.

root@boss[elcot]#apt-get install php5-mysql
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.
Need to get 64.2 kB of archives.
After this operation, 242 kB of additional disk space will be used.
Get:1 savir/main php5-mysql i386 5.3.2-2 [64.2 kB]
Fetched 64.2 kB in 0s (70.8 kB/s) 
Selecting previously deselected package php5-mysql.
(Reading database ... 161480 files and directories currently installed.)
Unpacking php5-mysql (from .../php5-mysql_5.3.2-2_i386.deb) ...
Processing triggers for libapache2-mod-php5 ...
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
Setting up php5-mysql (5.3.2-2) ...
root@boss[elcot]#service apache2 restart
Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

That’s all. Job Done.

Happy LAMP’ing…

Posted in linux, technology | Tagged , , , , , , , , , | 12 Comments