• 常用源&配置


    ubuntu16.04

    阿里

    cp /etc/apt/sources.list /etc/apt/sources.list.orgin && 
    echo "
    deb http://mirrors.aliyun.com/ubuntu/ xenial main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
    deb http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe">/etc/apt/sources.list
    

    清华源

    cp /etc/apt/sources.list /etc/apt/sources.list.orgin && 
    echo "
    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
    
    # 预发布软件源,不建议启用
    # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse">/etc/apt/sources.list
    

    pip

    mkdir $HOME/.pip && 
    echo "
    [global]
    index-url = https://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host=mirrors.aliyun.com">$HOME/.pip/pip.conf
    

    npm

    npm config set registry https://registry.npm.taobao.org
    

    docker

    echo "
    {
    "registry-mirrors": [
    "https://kfwkfulq.mirror.aliyuncs.com",
    "https://2lqq34jg.mirror.aliyuncs.com",
    "https://pee6w651.mirror.aliyuncs.com",
    "https://registry.docker-cn.com",
    "http://hub-mirror.c.163.com"
    ],
    "dns": [
    "8.8.8.8",
    "8.8.4.4"
    ]
    }" > /etc/docker/daemon.json && /etc/init.d/docker restart
    

    maven

    echo "
    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <mirrors>
            <!-- 阿里云仓库 -->
            <mirror>
                <id>alimaven</id>
                <mirrorOf>central</mirrorOf>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
            </mirror>
        
            <!-- 中央仓库1 -->
            <mirror>
                <id>repo1</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://repo1.maven.org/maven2/</url>
            </mirror>
        
            <!-- 中央仓库2 -->
            <mirror>
                <id>repo2</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://repo2.maven.org/maven2/</url>
            </mirror>
        </mirrors> 
    </settings>">/etc/maven/settings.xml
    

    Flutter

    maven { url 'https://maven.aliyun.com/repository/google' }
    maven { url 'https://maven.aliyun.com/repository/jcenter' }
    maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
    

    git 保存密码

    git config --global credential.helper store

  • 相关阅读:
    linux异常文件下载
    spring boot项目发布到tomcat端口问题
    jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units
    Job for jenkins.service failed because the control process exited with error code
    安装配置jenkins rpm方式
    Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed w
    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environ
    Cannot find class: org.mybatis.caches.ehcache.LoggingEhcache
    java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String
    Error:(12, 8) java: 无法访问javax.servlet.ServletException 找不到javax.servlet.ServletException的类文件
  • 原文地址:https://www.cnblogs.com/steinven/p/12018299.html
Copyright © 2020-2023  润新知