I want to install php5.3.29 with nginx and mysql-server from command line on Ubuntu 14.04 64 bit. Please give some step by step guideline to install php5.3.29.
Essentially, you're asking how to set up a LEMP stack -
Here's a good guide on how to install everything. Essentially, just run this command:
sudo apt-get install nginx nginx-full php5-fpm php5-mysql mysql-server
This installs all the relevant servers and software. With one exception from your initial question.
I mentinoed an exception. This will install PHP version
5.5.9+dfsg-1ubuntu4.11. This is PHP 5.5.9, not PHP 5.3.x. There is a good reason for this: PHP 5.3 is an old, obsolete, and security-holed software. There are no more security updates, and there are unpatched exploits in the older software of 5.3 at times. To that end, though, even though the security team tries to provide patches, you should be using the more updated, more often patched 5.5.x and newer versions.
Unless you have a VERY specific reason to have PHP 5.3.x, you should not install it, and use 5.5.x or newer (basically, what's in the repositories for your version of Ubuntu).
The answer suggested by animo is a good one to get the older PHP version, but with the second answer there. The only problem is, you lose the benefit of security updates put in place by the Ubuntu Security Team on a regular basis for PHP5 by deviating from the repositories and manually installing the older version, so for security reasons you should not do that.