http://technoblog.org/2009/07/configure-apt-get-to-use-a-proxy-ubuntu/

Open the following configuration file: /etc/apt/apt.conf.d/70debconf

And add:
Acquire::http::proxy “http://<IP_TO_PROXY>:<Proxy_Port_WEB>”;
Acquire::ftp::proxy “ftp://<IP_TO_PROXY>:<Proxy_Port_FTP>”;

If authentication is required, add this instead

Acquire::http::proxy “http://<username>:<password>@<IP_TO_PROXY>:<Proxy_Port_WEB>”;
Acquire::ftp::proxy “ftp://<username>:<password>@<IP_TO_PROXY>:<Proxy_Port_FTP>”;

<IP_TO_PROXY> = The IP address of the proxy, e.g.: 192.168.1.10
<Proxy_Port_WEB> = The proxy web port, e.g.: 8080
<Proxy_Port_FTP> = The proxy ftp port, e.g.: 2121

If authentication:
<username> and <password> (doh, no need to explain).

Done!

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

http://cms-sw.github.io/tutorial-proxy.html

git config --global http.proxy socks5://proxy.jf.intel.com:1080

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

set curl proxy

man curl

curl --proxy socks://proxy.jf.intel.com:1080/ -sSL https://golang.org/dl/go1.3.3.src.tar.gz | tar -v -xz

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

set go proxy

$ export http_proxy=127.0.0.1:8118

$ go get -v github.com/nf/stat
github.com/nf/stat (download)
github.com/nf/stat

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

gem proxy

gem install --http-proxy http://proxy.cd.intel.com:911/ json

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Configure apt-get / git/ curl to use a proxy (Ubuntu)的更多相关文章

  1. bash下自动重新运行git/curl等工具

    在使用诸如git/curl等工具的时候,如果网络状况不佳,经常会产生出错中断的情况,于是我们就会发现晚上挂机的下载一些代码和工具包,早上再看已经中断. 为应对这种情况我们需要判断下载工具的运行结果,如 ...

  2. Git操作GitHub时的Proxy配置

    无论是使用Android Studio中,VCS >> Git >> Clone, 还是直接Git Clone命令,clone GitHub项目时,出现错误提示:LibreSS ...

  3. git clone 设置临时的 proxy

    export ALL_PROXY=socks5://127.0.0.1:1086 git clone --depth 1 https://github.com/xxx/xxx.git unset AL ...

  4. 简单备忘一下Linux下的wget和curl如何使用http proxy

    简单备忘一下Linux下的wget和curl如何使用http proxywget -e "http_proxy=porxyhost:port" www.baidu.comcurl ...

  5. git和命令行 配置proxy请求

    GIT中的操作 设置全局代理 git config --global http.proxy socks5://127.0.0.1:8088 git config --global http.proxy ...

  6. How To Configure Logging And Log Rotation In Apache On An Ubuntu VPS

    Introduction The Apache web server can be configured to give the server administrator important info ...

  7. Ubuntu上配置SQL Server Always On Availability Group(Configure Always On Availability Group for SQL Server on Ubuntu)

    下面简单介绍一下如何在Ubuntu上一步一步创建一个SQL Server AG(Always On Availability Group),以及配置过程中遇到的坑的填充方法. 目前在Linux上可以搭 ...

  8. Git学习系列之Debian或Ubuntu上安装Git详细步骤(图文详解)

    前言 最早Git是在Linux上开发的,很长一段时间内,Git也只能在Linux和Unix系统上跑.不过,慢慢地有人把它移植到了Windows上.现在,Git可以在Linux.Unix.Mac和Win ...

  9. Configure Always On Availability Group for SQL Server on Ubuntu——Ubuntu上配置SQL Server Always On Availability Group

    下面简单介绍一下如何在Ubuntu上一步一步创建一个SQL Server AG(Always On Availability Group),以及配置过程中遇到的坑的填充方法. 目前在Linux上可以搭 ...

随机推荐

  1. Python try/except/finally应用

    1.通过if和else处理异常 import os if os.path.exists('sketch.txt'): data = open ('sketch.txt') for each_line ...

  2. Configure Puppet Master with Passenger and Apache on Centos

    What is Passenger? Passenger (AKA mod_rails or mod_rack) is an Apache 2.x module which lets you run ...

  3. SQL Server 2012 数据库备份

    既能备份到网络中的共享文件夹中,也能备份到本地 USE [AdventureWorks2012] GO /****** Object: StoredProcedure [dbo].[pr_BatchB ...

  4. Platform Invoke

    PInvoke 允许managed code 来调用在DLL中实施的unmanged function. Platform invoke relies on metadata to locate ex ...

  5. [Java Web – 3A] – Spring MVC开发注意事项

    1.使用Maven构建项目 2.SpringMVC 绝对路径的问题 首先要明确一点,在html中,资源文件也是有自己的URL,即href中是支持绝对路径.如下代码: <link href=&qu ...

  6. PLSQL_性能优化系列15_Oracle Explain Plan解析计划解读

    2014-12-19 Created By BaoXinjian

  7. cf380D Sereja and Cinema 组合数学

              time limit per test 1 second memory limit per test 256 megabytes input standard input outp ...

  8. c语言中的二分法

    \\\题外:对于printf引号中的内容一定要细心书写 ; 数组由a[0]开始计数,切记:尤其是与for循环中i=1 搞混 运用a[i+1]等超前数据时 需先用 for(i=0;i<=n-1;i ...

  9. SAR命令

    前面已经介绍了 vmstat和top命令的解析及使用,下面我们来学习一个更重要的命令sarsar命令可以通过参数单独查看系统某个局部的使用情况 sar 命令行的常用格式: sar [options] ...

  10. NoSQL分类及ehcache memcache redis 三大缓存的对比

    NoSQL分类 由于NoSQL中没有像传统数据库那样定义数据的组织方式为关系型的,所以只要内部的数据组织采用了非关系型的方式,就可以称之为NoSQL数据库.目前,可以将众多的NoSQL数据库按照内部的 ...