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:2222
或 172.16.10.10:22
执行SSH连接
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/25/vagrant-starts-centos/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论