zoukankan      html  css  js  c++  java
  • How to install packages with aptget on a system connected via proxy?

    Abstract :
    The apt-get work via proxy.
     
    Introduce :
    Proxy is widespread using in network. Ubuntu is base on Linux and it can use proxy too. However the apt-get is not working if u only set proxy on OS.
     
    Recently, I got Ubuntu 10.04 system connected via a proxy to the internet and I found apt-get can't work. So next is the solution.
     
    1. Check the file /etc/apt/apt.conf.
    2. if it is not here, create it.
    3. Add these contents :
     
    Acquire::http::proxy "http://<proxy>:<port>/"; 
    
    Acquire::ftp::proxy "ftp://<proxy>:<port>/";
    
    Acquire::https::proxy "https://<proxy>:<port>/";
    
     
    4. If ur proxy has password, u should add these :
     
    Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";    
    Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/"; 
    Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";
     
     
    5. Save the file and it will work. 
     
     
    Reporter : Nick Chan
     
     
  • 相关阅读:
    查看文件方法、vim末行操作
    目录结构、文件管理命令
    计算机快捷键、常用命令、别名、
    Redis 使用与优化
    Redis-Sentinel
    Redis主从复制
    Redis持久化
    API的使用
    Redis安装和配置
    集群搭建(脑裂)
  • 原文地址:https://www.cnblogs.com/nickchan/p/3104383.html
Copyright © 2011-2022 走看看