Vagrant启动CentOS

CentOS 7

官网: https://app.vagrantup.com/centos/boxes/7
box: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/virtualbox.box

CentOS 8

官网: https://app.vagrantup.com/centos/boxes/8
box: https://vagrantcloud.com/centos/boxes/8/versions/1905.1/providers/virtualbox.box

CentOS启动

(1)Vagrantfile启动(在线)

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
end
> vagrant up
> vagrant ssh

(2)命令行启动(在线)

> vagrant init centos/7
> vagrant up
> vagrant ssh

(3)box启动(离线)

> vagrant box add CentOS7 E:/VagrantBox/vagrant-centos-7.box
> vagrant init CentOS7
> vagrant up
> vagrant ssh

网络配置

编辑Vagrantfile

config.vm.network "private_network", ip: "172.16.10.10"

使用 127.0.0.1:2222172.16.10.10:22 执行SSH连接

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/25/vagrant-starts-centos/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Vagrant启动CentOS
CentOS 7 官网: https://app.vagrantup.com/centos/boxes/7 box: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/virtualbox.box CentOS……
<<上一篇
下一篇>>
文章目录
关闭
目 录