open the following file:
/root/etc/apt/apt.conf (if it is not there, then create it)
and then write following into it:
Acquire::http::proxy "http://your_user_name:Your_password@ip_address_of proxy:8080/";Acquire::ftp::proxy "ftp://your_user_name:Your_password@ip_address_of proxy:8080/";
Acquire::https::proxy "https://your_user_name:Your_password@ip_address_of proxy:8080/";