1、准备一台假造机,安装CentOS7
常用的假造化软件有两种:
这里我们使用VirtualBox来安装假造机,下载所在:Downloads – Oracle VM VirtualBox
001 点击安装
002 报错:he installer has detected an unsupported architecture. VirtualBox only runs on the amd64 architecture.
003 办理报错方法:
a. 点击这个文件:
b. 在设置--安全与隐私--通用---仍要打开
c.乐成打开
004 这时间,返来点击step1,发现还是报错,之前的利用都白费了
005 找了干系文档,发现还不支持m1,m2,arm架构
a.文档查找:
Best Virtual Machine For Mac of 2023 (inc. M1, M2 & M3 Macs)
b.去官网下载test版本
链接:Testbuilds – Oracle VM VirtualBox
安装乐成截图:
2、下载vagrant
2.1 下载
Install | Vagrant | HashiCorp Developer
2.2 安装vagrant
a. 点击下一步,下一步,知道安装乐成
b.测试是否安装乐成
vagrant安装乐成以后,并没有gui客户端,须要通过打开终端, 测试是否安装乐成,运行下令:
3、使用vagrant给virtualbox创建linux假造机
3.1 只须要一个下令,即可初始化centOS7体系
3.2 运行vagrant up,即可启动假造机
体系root用户的暗码是:vagrant
3.3 vagrant官方镜像堆栈(相识)
vagrant镜像堆栈所在:Discover Vagrant Boxes - Vagrant Cloud
vagrant中有很多做好的镜像堆栈,然后使用cmd下令利用用下令举行下载。
3.4 下载cenos/7镜像
a. 运行 vagrant init centos/7
b.运行 vagrant up 启动假造机
c.运行 vagrant ssh即可登录上假造机VM
报错及办理
题目:macOS M1芯片,运行vagrant up后,报错如下:
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.
办理:
----临时没找到办理方案----
-----直接举行步调4--------
4、使用vmware
下载链接:Download VMware Fusion | VMware
4.1 新建
4.2 点击继续
拖动文件,点击继续
坑:!!!留意选择arm架构的iso镜像包,否则在m1芯片上面无法安装!!!不能选x86_64的镜像文件!!!(忽略我下面这个图是x86的,我现实用的是arm架构的)
4.3 点击处理处罚器和内存
4.4 设置40gb(20gb,30gb都可以)
4.5 设置网络
4.6 启动
4.7 选择中文
4.8 选择安装目的地
4.9 软件选择
4.10 网络和主机名
4.11 用户和根暗码
4.12 点击开始安装
4.13 重启体系
设置登录mac的用户名和暗码
4.14 乐成
4.15 远程登录
格式:ssh username@ip
001 输入ip address来检察ip
002 登录(使用以下下令,回车)
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!qidao123.com:ToB企服之家,中国第一个企服评测及软件市场,开放入驻,技术点评得现金 |