zoukankan      html  css  js  c++  java
  • OSX 优化配置

    修改用户名

    sudo hostname macbookpro
    sudo scutil --set HostName macbookpro
    sudo scutil --set LocalHostName macbookpro
    

    MacPort

    安装 MacPort Index

    修改更新源

    1. 进入你安装macports的资料夹,比如官方的dmg装出来的是/opt/local/etc/macports
    2. 编辑sources.conf在最底下加入,注释掉其他的源rsync://mirrors.tuna.tsinghua.edu.cn/macports/release/tarballs/ports.tar [default]
    3. 还需要在macports.conf中,修改rsync_server为mirrors.tuna.tsinghua.edu.cn
    4. 还需要在macports.conf中,修改rsync_dir为macports/release/tarballs/base.tar

    HomeBrew

    安装

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    修改更新源

    Homebrew的更新源由三部分组成:

    1. 本体(brew.git)
    2. 核心(homebrew-core.git)
    3. 二进制预编译包(homebrew-bottles)
    4. 需要对这个三个部分,分别进行设置。

    清华大学

    # 替换brew.git:
    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
    
    # 替换homebrew-core.git:
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
    
    # 替换homebrew-bottles:
    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
    source ~/.bash_profile
    
    # 应用生效:
    brew update
    

    中国科大

    # 替换brew.git:
    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    
    # 替换homebrew-core.git:
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
    
    # 替换homebrew-bottles:
    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
    source ~/.bash_profile
    
    # 应用生效:
    brew update
    

    取消Brew更新

    export HOMEBREW_NO_AUTO_UPDATE=true
    
    魏美龍|DevOps Engineer|will_wei_devops@163.com
  • 相关阅读:
    unity, 调节图片导入尺寸
    photoshop, 钢笔上色
    maxscript, 批量导出物体
    unity, readOnly varible
    通过Maven找java source源码方法
    Nginx技巧:灵活的server_name,Nginx配置一个服务器多个站点 和 一个站点多个二级域名
    设置局域网共享文件不需要用户名密码
    SELECT INTO 和 INSERT INTO SELECT 两种表复制语句
    利用nginx泛域名解析配置二级域名和多域名
    三分钟了解Activity工作流
  • 原文地址:https://www.cnblogs.com/meilong/p/10584456.html
Copyright © 2011-2022 走看看