zoukankan      html  css  js  c++  java
  • 常用软件、软件源设置

    ubuntu 软件源使用阿里镜像通用命令

    • 修改前使用命令sudo /etc/apt/sources.list /etc/apt/sources.list.backup保存备份。
    sudo cat <<EOF >/etc/apt/sources.list
    deb http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-proposed main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ $(lsb_release -cs)-backports main restricted universe multiverse
    EOF
    
    • 修改完之后使用下面命令更新缓存。
    sudo apt update
    

    docker 镜像设置

    cat > /etc/docker/daemon.json <<EOF
    {
      "registry-mirrors": ["https://hub-mirror.c.163.com/","https://reg-mirror.qiniu.com","https://registry.docker-cn.com/"],
      "log-driver": "json-file",
      "log-opts": {
        "max-size": "100m"
      },
      "storage-driver": "overlay2"
    }
    EOF
    

    安装k8s、镜像设置

    apt-get update && apt-get install -y apt-transport-https
    curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add - 
    cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
    deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
    EOF  
    apt-get update
    apt-get install -y kubelet kubeadm kubectl
    
    • CentOS / RHEL / Fedora
    cat <<EOF > /etc/yum.repos.d/kubernetes.repo
    [kubernetes]
    name=Kubernetes
    baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
    enabled=1
    gpgcheck=1
    repo_gpgcheck=1
    gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
    EOF
    setenforce 0
    yum install -y kubelet kubeadm kubectl
    systemctl enable kubelet && systemctl start kubelet
    

    npm 软件源

    npm config set registry https://registry.npm.taobao.org
    
  • 相关阅读:
    【bzoj4066】 简单题
    【bzoj1941】 Sdoi2010—Hide and Seek
    【bzoj2648】 SJY摆棋子
    【poj2154】 Color
    【poj2409】 Let it Bead
    【codevs1106】 篝火晚会
    【poj3270】 Cow Sorting
    【bzoj1004】 HNOI2008—Cards
    【bzoj3143】 Hnoi2013—游走
    【codeforces 749E】 Inversions After Shuffle
  • 原文地址:https://www.cnblogs.com/xxred/p/13258134.html
Copyright © 2011-2022 走看看