2013-10-04 51 views

回答

2

這是我將如何使用面料和fabtools做一個Ubuntu服務器上:

from fabric.api import task 
from fabtools import require 

@task 
def setup_mongodb(): 

    # Install latest official MongoDB package 
    require.deb.key('7F0CEB10', keyserver='keyserver.ubuntu.com') 
    require.deb.source('mongodb', 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart', 'dist', '10gen') 
    require.deb.package('mongodb-10gen') 

    # Make sure the server is started 
    require.service.started('mongodb') 
+0

這可能是在MacOS上工作嗎?我看到MacOS並沒有被fab工具明確支持? – nickponline