You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
# install aliyun-cli
set -x
cd ~ && mkdir -p download && cd download
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzvf aliyun-cli-linux-latest-amd64.tgz
cp -f aliyun /usr/local/bin
rm -f aliyun aliyun-cli-linux-latest-amd64.tgz
aliyun configure help
aliyun configure set --profile default --region cn-beijing --language zh --mode EcsRamRole --ram-role-name ECS-ONDEMAND-MACHINE
输出:
查看日志: less /var/log/cloud-init-output.log,输出结果如下:
...
2022-10-23 11:23:44 (35.0 MB/s) - ‘aliyun-cli-linux-latest-amd64.tgz’ saved [7220799/7220799]
+ tar xzvf aliyun-cli-linux-latest-amd64.tgz
aliyun
+ cp -f aliyun /usr/local/bin
+ rm -f aliyun aliyun-cli-linux-latest-amd64.tgz
+ export DEBUG=sdk
+ DEBUG=sdk
+ aliyun configure help
configure credential and settings
Usage:
aliyun configure --mode {AK|StsToken|RamRoleArn|EcsRamRole|RsaKeyPair|RamRoleArnWithRoleName|ChainableRamRoleArn} --profile <profileName>
Commands:
get print configuration values
set set config in non interactive mode
list list all config profile
delete delete the specified profile
Use `configure --help` for more information.
+ aliyun configure set --profile default --region cn-beijing --language zh --mode EcsRamRole --ram-role-name ECS-ONDEMAND-MACHINE
+ ls -al /root/.aliyun
ls: cannot access '/root/.aliyun': No such file or directory
Cloud-init v. 19.1.17-1.0.1.al8 running 'modules:final' at Sun, 23 Oct 2022 03:23:43 +0000. Up 20.89 seconds.
Alibaba Cloud Linux 3.2104 LTS 64位
或3.2104 LTS 64位 快速启动版
查看日志:
less /var/log/cloud-init-output.log
,输出结果如下:当cloud-init执行完后,用root用户再次执行
aliyun configure set
:可以请问一下应该怎么排查吗,可能是哪里的问题���?
谢谢!
The text was updated successfully, but these errors were encountered: