初始化
注册 hyper.sh 帐号
生成 credential,获取 Access Key, Secret Key
$ wget https://hyper-install.s3.amazonaws.com/hyper-linux-x86_64.tar.gz
$ tar zxvf hyper-linux-x86_64.tar.gz
$ chmod +x hyper
$ mv hyper /usr/bin/
$ hyper config
#输入 Access Key, Secret Key
$ hyper pull debian:latest
$ hyper run --size s2 --name mydebian -p 22 -i -t debian:latest bash
root@88888888ca80:~# apt-get update
root@88888888ca80:~# apt-get install vim ssh net-tools wget
root@88888888ca80:~# /etc/init.d/ssh start
root@88888888ca80:~# passwd
#修改密码
root@88888888ca80:~# exit
分配公网IP
$ hyper fip allocate 1
209.177.90.77
$ hyper fip attach 209.177.90.77 mydebian
远程ssh登录镜像
ssh root@209.177.90.77
用hyper远程登录
hyper start mydebian
hyper exec -it mydebian bash
hyper stop mydebian
删除container
hyper rm mydebian
删除image
hyper rmi debian:testing
没有评论:
发表评论