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
  • 相关阅读:
    redis-LinkedList
    Jedis(java操作redis数据库技术)
    jquery判断表单内容是否为空
    jQuery单选框的回显
    使用jQuery重置(reset)表单的方法
    BootstrapValidator 解决多属性被同时校验问题
    模态框被遮罩层遮挡
    python 高阶函数
    python 函数式编程
    python 生成器
  • 原文地址:https://www.cnblogs.com/meilong/p/10584456.html
Copyright © 2011-2022 走看看