Redbattle
踩坑
环境
项目
配置
知识点
踩坑
环境
项目
配置
知识点
  • Docker常用命令
  • 镜像
    • MySQL 笔记
    • Homebrew 使用
    • 通过 Docker 搭建树莓派 Web 环境
    • PHP开发环境
    • Laravel 笔记
    • 前端开发环境
    • env
    2021-09-22

    镜像

    # 镜像替换

    • 中科院镜像 (opens new window)
    • 阿里云镜像 (opens new window)

    # Mac brew镜像

    • 替换 Homebrew
      git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
      
    • 替换 Homebrew Core
      git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
      
    • 替换 Homebrew Cask
      git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
      
    • 替换 Homebrew-bottles
      # 对于 bash 用户:
      echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
      source ~/.bash_profile
      # 对于 zsh 用户:
      echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
      source ~/.zshrc
      

    # Mac终端走代理方式

    • 方法1 在终端中直接运行命令,这个办法的好处是简单直接,并且影响面很小(只对当前终端有效)
      export http_proxy=http://proxyAddress:port
      
    • 方法2 把代理服务器地址写入shell配置文件.bashrc或者.zshrc直接在.bashrc或者.zshrc添加下面内容
      export http_proxy="http://localhost:port"
      export https_proxy="http://localhost:port"
      

    # Composer 镜像

    • 阿里镜像 (opens new window)

    # Yarn更换为淘宝镜像

    • 安装cnpm
      npm install -g cnpm --registry=https://registry.npm.taobao.org
      cnpm install yarn -g
      
    • 查看下载源
      yarn config get registry
      
    • 更换为淘宝源
      yarn config set registry https://registry.npm.taobao.org
      
    #镜像#Homebrew#Composer#Yarn#cnpm#代理
    最近更新
    01
    烧虾球
    05-13
    02
    二次开发
    12-20
    03
    文字展开收起
    10-17
    更多文章>
    Theme by Vdoing
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式