标签:
1. Create a storage account in Azure, copy the storage account endpoint URL (with postfix of "file.core.chinacloudapi.cn") and storage access key to a temp file.
2. Download and install Azure CLI: https://www.azure.cn/documentation/articles/xplat-cli-install (REBOOT PC after installation).
3. Download and install latest Node.JS: https://nodejs.org/en/#download (Optional, in some case, Azure CLI may encounter problem)
4. Connect to the storage account and create sub-folders by Azure CLI.: https://www.azure.cn/documentation/articles/xplat-cli-connect
4.1 open Azure CLI (CMD or PowerShell on Windows, Shell on Linux).
4.2 for US Azure - Connect to Azure: azure login, then follow the instruction to login.
for China Azure - Connect to Azure: azure login -e AzureChinaCloud -u username -p password
4.3 Create share first: azure storage share create <nameofshare> -a <storage Accountname> -k <storage account access Key>
4.4 Create folder for share: azure storage directory create --share <nameofshare> -p <nameofsharefolder> -a <storageAccountname> -k <storage account access Key>
4.5 (optional for test), upload local file to the folder just created: azure storage file upload ‘c:\a.a‘ <nameofshare> <nameofsharefolder>
5. Mount to Linux server: https://www.azure.cn/documentation/articles/storage-how-to-use-files-linux (note: on that page, there are instruction for different Linux versions).
command for reference: host~$ sudo mount -t cifs //ACCOUNTNAME.file.core.windows.net/myshare /mnt/mountpoint -o vers=3.0,user=<StorageAccountName>,password=<StorageaccountAccessKey>,dir_mode=0777,file_mode=0777
5. Using utility like WinSCP connect to the linux server and check the mountpoint to verify the folder and file is there.
标签:
原文地址:http://www.cnblogs.com/markgao/p/5532064.html