zoukankan      html  css  js  c++  java
  • 安装homebrew

    安装homebrew:

    转自 http://blog.jjgod.org/2009/12/21/homebrew-package-management/

    主要指令为:

    获得/usr/local权限:

    sudo chown -R `user_name` /usr/local
    

    然后用 git 安装:

    cd /usr/local
    git init
    git remote add origin git://github.com/mxcl/homebrew.git
    git pull origin master

    等待安装完毕后,就可以试试:

    brew search
    

    可以搜索出所有可以通过 homebrew 安装的软件,不带任何参数的时候就是列出所有的。可以看到数量已经不少了。

     搜索特定目标
    $ brew search
    mongodb
    mongodb 
    安装 $ brew install
    mongodb

    列出已装
    $ brew list
     

    更新

    如果用了一段时间,需要更新同步上游的 Formula,可以简单地:

    $ brew update
    $ brew upgrade mongodb
     
    以及设置开机启动的命令:
    http://ruby-china.org/topics/160

    在命令brew install mongodb之后,
    If this is your first install, automatically load on login with (这段就是用来设置 MongoDB for Mac 的服务的,会开机自启动):
        mkdir -p ~/Library/LaunchAgents
        cp /usr/local/Cellar/mongodb/2.0.0-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents/
        launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
    
    If this is an upgrade and you already have the org.mongodb.mongod.plist loaded:
        launchctl unload -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
        cp /usr/local/Cellar/mongodb/2.0.0-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents/
        launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist



     
     
  • 相关阅读:
    HTML 页面的 批量删除的按钮
    HTML 选择器
    ....
    java 反射机制
    插件库
    向上滚动
    浮动元素定位float
    中文字体对应的英文名称
    echarts入门教程
    ie9浏览器window.openbug
  • 原文地址:https://www.cnblogs.com/edgarli/p/2936532.html
Copyright © 2011-2022 走看看