Substitute the user name/password used to log into the proxy (if required), the server ip or fully-resolved name, and the proxy port # to use when adding this line.
@Lairsdragon is correct (set /etc/environment), but there are more nuances.
An application will typically need to be run with this environment in place, for instance, from a login shell. That said, it's even more complex than that:
Many applications, especially servers are smart enough to consult /etc/environment.
Many don't consult /etc/enironment.
Some applications don't support proxies at all.
Others are configured with their own configuration files.
Still others will read from a different global file (like the gconf registry).
To really set something, you need to read the documentation on a particular application you are interested in to make sure you have set the correct file. Chances are, it will talk about how to set up a http_proxy somewhere in it's docs if it supports this.
This is similar on all operating systems. Setting network proxies is a confusing mess with many different and varied approaches to solving this problem.
Depending on your needs you could add
to
/etc/environment
to have them set by the login-process.cheerio
To proxy updates, add a new file called
01proxy
to your /etc/apt/apt.conf.d/ directory with the following line:Substitute the user name/password used to log into the proxy (if required), the server ip or fully-resolved name, and the proxy port # to use when adding this line.
@Lairsdragon is correct (set /etc/environment), but there are more nuances.
An application will typically need to be run with this environment in place, for instance, from a login shell. That said, it's even more complex than that:
To really set something, you need to read the documentation on a particular application you are interested in to make sure you have set the correct file. Chances are, it will talk about how to set up a http_proxy somewhere in it's docs if it supports this.
This is similar on all operating systems. Setting network proxies is a confusing mess with many different and varied approaches to solving this problem.
Some References:
http://studyhat.blogspot.com/2010/01/squid-proxt-server.html
in place of yum install you can use sudo apt-get install squid then follow the blog!!!