December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Add Proxy Server on Linux and Unix Server

When you need to have proxy connection available to whole system, so dont bother with settings for firefox, yum proxy and similar, its simple as just plain file 😉

just copy & paste following code to terminal window. if you need other shell , like csh , just add another file with csh extension.
This should work for every user on system.

/bin/cat < /etc/profile.d/proxy.sh
export http_proxy=http://host.name:port/
export ftp_proxy=http://host.name:port/
export HTTP_PROXY=http://host.name:port/
export FTP_PROXY=http://host.name:port/
export no_proxy=.localdomain.com
EOF
In case , that you want enable proxy access to only specific user, just add lines to his bash-profile file
echo “export http_proxy=http://hostname.or.ip:port” >> /user_home/.bash_profile
just change hostname/ip to your hostname/ip of proxy server eg. myproxy.company.sk:8080

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>