Install Drush and Drupal 7 using SSH

 Drupal experts love the command line. The only thing better than Unix commands are Drupal command line macros, a.k.a. Drush.
Drush is a library of command line scripts that automate an array of Drupal administrative functions. Even if you are not a command line junkie, you might find helpful the elegance of administration via Drush.
This tutorial is a two-fer. You will learn how to install Drupal 7 using SSH and get a taste of Drush by seeing it in action. The first step is to install Drush. Then we use it to install Drupal...all using the command line. Look ma, no GUI!

If you are familiar with the command line, but not Drush, this tutorial is ideal for you. Even if you are not a Unix command expert, it is still good to know what Drush can do.

Commands:  
Creating the database:
mysqladmin –u [db_user] –p create [db_name]
Download drush:
wget http://ftp.drupal.org/files/projects/drush-7.x-5.7.tar.gz
Extract archive in you home directory or any place where you want:
tar -xzf drush-7.x-5.7.tar.gz

after that just create alise for you drush
go to home directory by terminal or UI
open your .bashrc file in you choice Editor and set alias for it,
insert this line in /home/<user>/.bashrc
alias drush='/[path_to_drush_from_root]/drush/drush'

now restrt terminal
Verify Drush is working just type command: drush

Change directories to web files:
cd ../www
Download Drupal:
drush dl drupal-7.0
Move Drupal files to web directory:
mv drupal-7.0/* .
mv drupal-7.0/.htaccess .
rm –r drupal-7.0
Execute Drupal install:
drush site-install standard --account-name=admin --account-pass=[useruser_pass] --db-url=mysql://[db_user]:[db_pass]@localhost/[db_name]

fore more info and alies goto  http://drush.ws/help/5

X