From 1461f3ccad8989597884fbea17b7f0a3100d548a Mon Sep 17 00:00:00 2001 From: Smirk <35244986+SmirkCao@users.noreply.github.com> Date: Mon, 17 Dec 2018 14:08:54 +0800 Subject: [PATCH] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - pythone - > python - 分级, 将操作部分整理了 - 配置部分增加了Operation操作的说明, 常用操作可能是Upload, 默认参数是Copy, 容易忽略这里。 - Update标题级别, 开源社区地址级别更新 --- README.md | 147 +++++++++++++++++++++++------------------------------- 1 file changed, 63 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index b7ed4d5..338829b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ This tool is a client tool for Huawei, OBS running in shell or cmd, for processing data download and upload. --- UPDATES: +## UPDATES: + 2018.11.27 - v4.6.7.1 1. Added - add copy concurrent function. @@ -114,96 +115,74 @@ Initial features: 9. Upload to a specific directory in a bucket. 10. Download a single object, download a specific directory in a bucket and download the entire bucket. -how to use: - -step 1: install python,the version is more than 2.7.9; +## HOW TO USE: - apt install gcc // ubuntu 操作系统 - - yum install gcc //RedHat ,CentOs类操作系统 - +### step 1: install python,the version is more than 2.7.9; +```sh +apt install gcc // ubuntu 操作系统 +yum install gcc // RedHat ,CentOS类操作系统 wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz - -tar -xvf Python-2.7.14.tgz //解压到本地 - -cd Python-2.7.14 //进入解压后的目录 - -./configure //进行配置 - -make // 进行编译 - -make install // 进行安装 - -rm /usr/bin/python //删除之前版本链接 - -ln -s /usr/local/bin/python2.7 /usr/bin/python //创建新版本python链接 - -python -v //查看 python版本是不是已经变为安装的版本 - -step 2: install openssl, the version is morthan 1.0.2n; - +tar -xvf Python-2.7.14.tgz // 解压到本地 +cd Python-2.7.14 // 进入解压后的目录 +./configure // 进行配置 +make // 进行编译 +make install // 进行安装 +rm /usr/bin/python // 删除之前版本链接 +ln -s /usr/local/bin/python2.7 /usr/bin/python // 创建新版本python链接 +python -v // 查看 python版本是不是已经变为安装的版本 +``` +### step 2: install openssl, the version is morthan 1.0.2n; +```sh wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz - - tar -xvf openssl-1.0.2n.tar.gz // 解压到当前目录 - -cd openssl-1.0.2n // 进入解压后的目录 - -./config -fPIC // 进行配置 - +tar -xvf openssl-1.0.2n.tar.gz // 解压到当前目录 +cd openssl-1.0.2n // 进入解压后的目录 +./config -fPIC // 进行配置 make && make install - -rm /usr/bin/opensll // 删除之前的openssl PATH变量 - -ln -s /usr/local/ssl/bin/openssl /usr/bin/opensll //创建新的openssl版本路径; - -step3. +rm /usr/bin/opensll // 删除之前的openssl PATH变量 +ln -s /usr/local/ssl/bin/openssl /usr/bin/opensll // 创建新的openssl版本路径; +``` +### step3. vi config.dat input the neccessnary data; -public config: - -AK //Access Key ID 接入键标识 - -SK //Secret Access Key安全接入键 - -MultipartObjectSize //进行分段操作的对象大小分界值(Byte) - -PartSize //段大小(Byte) - -Concurrency //并发数 - -BucketNameFixed //桶名 - -Region //区域 - -VirtualHost //是否使用虚拟主机方式请求的开关 - -DomainName //域名 - -IsHTTPs //Https开关 - -sslVersion //ssl协议版本 - -upload config: - -LocalPath //待上传目录 - -IgnoreExist //忽略上传到桶内的文件对象的开关 - -RemoteDir 上//传到桶内的目录 - -PutWithACL //Access Control Policy 对象的权限控制策略 - -download config: - -DownloadTarget //待下载的OBS桶内目标 - -SavePath //本地保存路径 - -step4. - pythone run.py or ./run.py to do the task +#### Operation +``` +# 指定对本地文件的操作类型 +# 可选:Upload、Download、Copy +Operation =Upload +``` +#### Common Configuration + +``` +AK // Access Key ID 接入键标识 +SK // Secret Access Key安全接入键 +MultipartObjectSize // 进行分段操作的对象大小分界值(Byte) +PartSize // 段大小(Byte) +Concurrency // 并发数 +BucketNameFixed // 桶名 +Region // 区域 +VirtualHost // 是否使用虚拟主机方式请求的开关 +DomainName // 域名 +IsHTTPs // Https开关 +sslVersion // ssl协议版本 +``` + +#### Upload Configuration +``` +LocalPath // 待上传目录 +IgnoreExist // 忽略上传到桶内的文件对象的开关 +RemoteDir // 上传到桶内的目录 +PutWithACL // Access Control Policy 对象的权限控制策略 +``` +#### Download Configuration +``` +DownloadTarget // 待下载的OBS桶内目标 +SavePath // 本地保存路径 +``` +### step4. +python run.py or ./run.py to do the task -step5. +### step5.  go to dir results and see the detail task process results. -# 开源社区地址 +## 开源社区地址 https://github.com/huaweicloud-obs