Proxy configuration for common programs under linux--

Source: Internet
Author: User
Tags git commands

There are many programs under Linux that have only command-line interfaces, and for such programs, they can access the network through a proxy server in different ways. In this paper, Easwy summarizes some common Linux programs to configure Proxy server methods.

[General Proxy Server Configuration]

For most Linux console programs, such as apt-get and aptitude commands in Debian or Ubuntu, git commands, wget commands, these programs use http _proxy and ftp_proxy environment variables to get the configuration of the proxy service.

The method is to add something like the following to your ~/.BASHRC:

If your proxy server requires a user name and password to access, you need to fill in the username and passwd sections above, otherwise, omit these two parts.

For example, suppose your proxy server is 192.168.1.1, the port is 8080, the user name is easwy, the password is 123456, Then you should set these two environment variables:

After this configuration, exit and log in again, or use the following command directly to source. BASHRC:

SOURCE ~/.BASHRC

The above program can now access the network through a proxy server.

[Proxy server configuration for subversion]

To configure the proxy server for subversion, you need to modify the $HOME/.subversion/servers file in the [Global] section of this file plus:

Now SVN can use the proxy server to access the repository.

[Configuration of the proxy server for Yum]

If you want Yum in CentOS to be able to update the program through a proxy server, you need to modify the file /etc/yum.conf, which is added in this file:

Proxy=http://easwy:[email protected]:8080

Now you can update your software with yum .

original article, please read the footer of the licensing method, reproduced Please specify: reproduced from the Easy Water Blog [http://easwy.com/blog/]

This article link address: http://easwy.com/blog/archives/proxy-setting-on-linux-console/

Proxy configuration for common programs under linux--

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.