[关闭]
@zslzxc 2018-03-14T06:14:28.000000Z 字数 2505 阅读 1496

Deepin 安装使用 Vagrant

deepin vagrant


安装

  1. 安装virtualbox 点击鼠标右键,选择打开方式:深度软件包管理工具
    image_1c7u4j6a4l9013ufv2t1c69ea9.png-178.1kB
  2. 安装vagrant 点击鼠标右键,选择打开方式:深度软件包管理工具
    image_1c7u4t7cj1bgs1kds1v8r18tq1gfrm.png-112.1kB
    # 使用
  3. 创建目录
  4. 执行vagrant init centos/7
  5. 执行vagrant up
  6. Vagrant命令
  1. amor@amor-PC:/data/vagrant/centos$ vagrant --help
  2. Usage: vagrant [options] <command> [<args>]
  3. -v, --version Print the version and exit.
  4. -h, --help Print this help.
  5. Common commands:
  6. box manages boxes: installation, removal, etc.
  7. destroy stops and deletes all traces of the vagrant machine
  8. global-status outputs status Vagrant environments for this user
  9. halt stops the vagrant machine
  10. help shows the help for a subcommand
  11. init initializes a new Vagrant environment by creating a Vagrantfile
  12. login log in to HashiCorp's Vagrant Cloud
  13. package packages a running vagrant environment into a box
  14. plugin manages plugins: install, uninstall, update, etc.
  15. port displays information about guest port mappings
  16. powershell connects to machine via powershell remoting
  17. provision provisions the vagrant machine
  18. push deploys code in this environment to a configured destination
  19. rdp connects to machine via RDP
  20. reload restarts vagrant machine, loads new Vagrantfile configuration
  21. resume resume a suspended vagrant machine
  22. snapshot manages snapshots: saving, restoring, etc.
  23. ssh connects to machine via SSH
  24. ssh-config outputs OpenSSH valid configuration to connect to the machine
  25. status outputs status of the vagrant machine
  26. suspend suspends the machine
  27. up starts and provisions the vagrant environment
  28. validate validates the Vagrantfile
  29. version prints current and latest Vagrant version
  30. For help on any individual command run `vagrant COMMAND -h`
  31. Additional subcommands are available, but are either more advanced
  32. or not commonly used. To see all subcommands, run the command
  33. `vagrant list-commands`.

安装Docker

  1. sudo yum remove docker \
  2. docker-client \
  3. docker-client-latest \
  4. docker-common \
  5. docker-latest \
  6. docker-latest-logrotate \
  7. docker-logrotate \
  8. docker-selinux \
  9. docker-engine-selinux \
  10. docker-engine
  1. sudo yum install -y yum-utils \
  2. device-mapper-persistent-data \
  3. lvm2
  1. sudo yum-config-manager \
  2. --add-repo \
  3. https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
  1. sudo yum install docker-ce
  1. sudo systemctl start docker

文件挂载问题

  1. Vagrant was unable to mount VirtualBox shared folders. This is usually
  2. because the filesystem "vboxsf" is not available. This filesystem is
  3. made available via the VirtualBox Guest Additions and kernel module.
  4. Please verify that these guest additions are properly installed in the
  5. guest. This is not a bug in Vagrant and is usually caused by a faulty
  6. Vagrant box. For context, the command attempted was:
  7. mount -t vboxsf -o uid=1000,gid=1000 vagrant_data /vagrant_data
  8. The error output from the command was:
  9. mount: unknown filesystem type 'vboxsf'
  10. 解决方法:
  11. vagrant plugin install vagrant-vbguest
  12. vagrant reload
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注