Fabric installation and configuration

Source: Internet
Author: User
Tags socket error

You can install Fabric Using Pip or easy_install of Python. Under xubuntu, I
Sudo apt-Get install fabric is used for installation.

After the installation, go to the console and import the improt fabric module. If no error is reported, the module is successfully installed.

If you are 2.5, you need to write a statement:

From _ future _ import with_statement

2.6 + is not needed.

The following demonstrates a simpleProgram.

#! /Usr/bin/Python

From fabric. API import run

Def host_ OS ():
Run ('uname-S ')
Save it as the test. py module.

At the beginning, my xubuntu does not install the SSH service, causing an error in script running:
Fatal error: Low Level socket error connecting to host localhost: Connection refused

Then, use the FAB command to call the FAB-H host name-F file name method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.