zoukankan      html  css  js  c++  java
  • 各种软件加速源

    平常开发、装软件,难免会遇到翻墙、下载速度慢各种问题,现在统一整理出各种场景的加速方法,欢迎使用

    1.kubernetes源

    ubuntu

    apt-get update && apt-get install -y apt-transport-https curl
    curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
    
    tee /etc/apt/sources.list.d/kubernetes.list <<-'EOF'
    deb https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial main
    EOF
    
    apt-get update
    

    centos

    cat <<EOF > /etc/yum.repos.d/kubernetes.repo
    [kubernetes]
    name=Kubernetes
    baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
    enabled=1
    gpgcheck=0
    repo_gpgcheck=0
    gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
           http://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
    EOF
    
    

    2.ubuntu源

    /etc/apt/sources.list

    ubuntu 18.04

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    

    ubuntu 16.04

    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse  
    deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse  
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse  
    

    3.centos源

    centos6

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
    

    centos7

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    

    4.alpine源

    alpine 3.8

    echo "https://mirrors.aliyun.com/alpine/v3.8/main/" > /etc/apk/repositories
    echo "https://mirrors.aliyun.com/alpine/v3.8/community/" >> /etc/apk/repositories
    apk update
    

    alpine 3.9

    echo "https://mirrors.aliyun.com/alpine/v3.9/main/" > /etc/apk/repositories
    echo "https://mirrors.aliyun.com/alpine/v3.9/community/" >> /etc/apk/repositories
    apk update
    

    5.docker源

    make -p /etc/docker
    echo '{"registry-mirrors":["https://pee6w651.mirror.aliyuncs.com"]}' > /etc/docker/daemon.json
    

    6.go mod加速

    # Enable the go modules feature
    export GO111MODULE=on
    # qiniuyun 
    export GOPROXY=https://goproxy.cn
    # Set the GOPROXY environment variable
    export GOPROXY=https://goproxy.io
    # aliyun云
    export GOPROXY=https://mirrors.aliyun.com/goproxy/
    

    7.php composer源

    #使用阿里云镜像源加速
    composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
    #取消配置
    composer config -g --unset repos.packagist
    

    8.node.js npm源

    # 永久
    npm config set registry https://registry.npm.taobao.org
    # 临时
    npm --registry https://registry.npm.taobao.org install express
    

    9.python pip源

    mkdir -p /root/.pip
    echo -e "[global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host=mirrors.aliyun.com
    " > /root/.pip/pip.conf
    

    10.maven源

    /usr/local/apache-maven-3.3.9/conf/settings.xml

    <mirrors>
      <mirror>
        <id>alimaven</id>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <mirrorOf>central</mirrorOf>
      </mirror>
    </mirrors>
    
  • 相关阅读:
    FlowPortal:流程节点定义有误,合流节点"合流"没有对应的聚焦节点
    FlowPortal 6.00c 使用xFormDesigner复制粘贴中文总是乱码
    SharePoint 2019 里安装FlowPortal6.00c报错
    与用户xxx一起提供的密码不正确。请确认输入的密码正确并重试
    SharePoint 2010 安装错误:请重新启动计算机,然后运行安装程序以继续
    SharePoint 2013: Workflow Manager Backend 服务意外地终止
    用户管理
    Linux及工具网站
    基于c开发的全命令行音频播放器
    Linux 下清空或删除大文件内容的 5 种方法
  • 原文地址:https://www.cnblogs.com/chenqionghe/p/11475328.html
Copyright © 2011-2022 走看看