搜索本产品文档关键词
安装BOSCLI
所有文档
menu

BOS 对象存储

安装BOSCLI

前提条件

BOS CLI命令行工具(即BCE CLI)基于Python 2.7开发,根据操作系统安装相应Python 2.7,目前支持Windows 和Linux。

操作步骤

1.准备Python环境。

  • Windows环境

    Python官网下载python27.msi后,双击安装。

  • Linux环境

    以Ubuntu和Redhat为例:

    Plain Text
    1# Ubuntu
    2$ sudo apt-get install python python-dev python-setuptools python-pip
    3
    4# Redhat
    5$ sudo yum install python python-dev python-setuptools python-pip

说明: 安装完python后请先执行python -V查看python版本信息,确保python版本为2.7或之后的版本。对于使用百度智能云BCC Centos6.5系统的用户请按照后面的用百度智能云BCC Centos6.5系统的用户安装方法安装

2.安装BOS CLI工具。下载地址

  • Windows环境

    (1)解压CLI工具包。

    (2)在cmd中执行如下命令:

    Plain Text
    1cd $ BCE_PATH
    2$ python setup.py install

    (3)将bce拷贝到用户需要执行程序的目录下方便使用。

    Plain Text
    1$ python $YOUR_DIR/bce
  • Linux环境

    (1)解压CLI工具包。

    Plain Text
    1$ unzip bce-cli-0.10.8.zip

    (2)将bcecli的库安装到系统的python目录下。

    Plain Text
    1$ python setup.py install

用百度智能云BCC Centos6.5系统的用户安装方法:

  1. 首先下载BCC Centos6.5镜像专用版CLI
  2. 解压CLI工具包。

    Plain Text
    1$ unzip bce-cli-0.10.8-centos6.5.zip
  3. 将bce-cli-0.10.8-centos6.5的安装目录加入环境变量中。

    Plain Text
    1export PATH=bce-cli-path:$PATH 

    说明: 比如bce-cli-0.10.8-centos6.5.zip 解压后的路径为 /home/user1/bce-cli-0.10.8-centos6.5,您需要将路径/home/user1/bce-cli-0.10.8-centos6.5/加入环境变量中。

上一篇
概述
下一篇
配置BOSCLI