Thursday, December 23, 2010

Configure openSuse to manage software behind a proxy server

The first thing to do is to configure proxy server. To do this, go to Yast utility select "proxy" and configure your settings according to the proxy you are behind (remember to include the port for example "http://proxyserver.example:port").

If the proxy requires authentication this settings will not work when managing software. In order to correct this, it is necessary to edit the file /etc/sysconfig/proxy. There will be a line like this HTTP_PROXY="http://proxyserver.example:port". This line needs to be changed to HTTP_PROXY="http://username:password@proxyserver.example:port"; it is also necessary to change the lines that correspond to HTTPS_PROXY, FTP_PROXY and GOPHER_PROXY using the same format.

zypper by default makes use of the aria2 program to handle the download process. Unfortunately it does not work well behind a proxy server. Because of this, it is necessary to disable it by using the environment variable ZYPP_ARIA2C=0. This can be achieved by exporting it in a terminal when it is needed. Alternatively, it can be placed under /etc/profile.local so it is changed every time the system is started.

After this, the system needs to be restarted so the changes are applied. Now the software management should be functional behind the proxy server.

No comments:

Post a Comment