Centos proxy Internet access settings

Source: Internet
Author: User

Centos proxy Internet access settings
1. Set proxy on the built-in centos Interface1. interface settings


The default proxy port of squid is 3128.

2. firefox settings

Settings> LAN Settings> ip: port/username: passwd

Ii. Set proxies for terminal1. Temporary proxy

If you only use a proxy temporarilyRun the following command on the command line:

export http_proxy="http://210.45.72.XX:808"
  • In addition:/root/.bashrcAdd:export http_proxy="http://username:password@210.45.72.XX:808" If you are using an ip address or the computer's NIC address authentication, you can ignore all usernames and passwords. Note: When you stop using the proxy, you must change the changed file to the original one. Especially if you use export

  • Note: When you stop using the proxy, you must change the modified file to the original one.export http_proxy="http://210.45.72.XX:808"Command, enter:unset http_proxy ,Remove environment variables. Because the export http_proxy = "http://210.45.72.XX: 808" command is essentially to write the settings after the export into the environment settings file.

  • Enter env to view all environment variable settings. env> env.txt to output the environment variable to env.txt, and then open the variable. unset to cancel the environment variable.

2. Global proxy
  • File directory
vim /etc/profile
  • Add the following
http_proxy = http://username:password@yourproxy:8080/ftp_proxy = http://username:password@yourproxy:8080/export http_proxyexport ftp_proxy
  • Environment Variable
source /etc/profile
3. yum proxy
  • File directory
vim /etc/yum.conf
  • Add the following
proxy = http://username:password@yourproxy:8080/
  • Environment Variable
source /etc/profile
4. wget proxy
  • File directory
vim /etc/wgetrc
  • The last line is added as follows:
http_proxy = http://username:password@yourproxy:8080/ftp_proxy = http://username:password@yourproxy:8080/
  • Environment Variable
source /etc/profile
  • Update source 163
If you use yum to install software in CentOS6.5 installed by yourself, the Error 404 is always prompted. Baidu then finds that you have to set the yum source. After CentOS is installed, you generally need to modify the yum source to achieve an ideal speed when installing and updating the rpm package. There are 163 sources and sohu sources that are relatively fast in China. Here we use the 163 source as an example. 1. cd/etc/yum. repos. d2. mv CentOS-Base.repo CentOS-Base.repo.backup3. wget http://mirrors.163.com/.help/CentOS6-Base-163.repo4. mv CentOS6-Base-163.repo CentOS-Base.repo5. yum clean all
  • Faster update

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.