vagrant + virtual box + rhel7 + ssh 登录

1、程序下载

vc++

https://download.visualstudio.microsoft.com/download/pr/1754ea58-11a6-44ab-a262-696e194ce543/3642E3F95D50CC193E4B5A0B0FFBF7FE2C08801517758B4C8AEB7105A091208A/VC_redist.x64.exe

virtualbox

https://download.virtualbox.org/virtualbox/7.0.18/VirtualBox-7.0.18-162988-Win.exe

vagrant

https://releases.hashicorp.com/vagrant/2.4.1/vagrant_2.4.1_windows_amd64.msi

Vagrant box generic/rhel7 - Vagrant Cloud (vagrantup.com)

2、新建文件夹并启动rhel7

powershell管理员身份运行

可以在D盘新建文件夹

mkdir d:/vm/rhel7/

cd D:/vm/rhel7/

vagrant init generic/rhel7
vagrant up

3、修改私有地址为192.168.56.10

修改配置文件D:/vm/rhel/Vagrantfile

Create a private network, which allows host-only access to the machine

using a specific IP.

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

改完配置reload

vagrant reload#(需要在D:/vm/rhel7/目录下运行)

4、修改ssh配置远程登陆

sudo su切换至root

vi /etc/ssh/sshd_config

PasswordAuthentication yes#(允许密码登录)

PermitRootLogin yes#(允许root登录)

保存后service sshd restart

xshell远程用192.168.56.10登录

用户名:vagrant 密码: vagrant

相关推荐
龙龙博客2 小时前
LVS+Keepalived 实现高可用负载均衡
运维·负载均衡·lvs
职略2 小时前
负载均衡类型和算法解析
java·运维·分布式·算法·负载均衡
Iᴛ's ᴅᴇsᴛɪɴʏ²⁸.3 小时前
Nginx反向代理和负载均衡
运维·nginx·负载均衡
cui_win5 小时前
nginx-限制客户端并发数
运维·nginx·限流·limit_conn·限制并发
King's King6 小时前
自动化立体仓库出入库能力及堆垛机节拍
运维·自动化
一颗星的征途6 小时前
宝塔-Linux模板常用命令-centos7
linux·运维·服务器
yumuing blog7 小时前
【论文解读】AGENTLESS:揭开基于LLM的软件工程代理的神秘面纱,重塑软件工程自动化新基线
运维·自动化·软件工程·llama
Elastic 中国社区官方博客7 小时前
Elasticsearch:Painless scripting 语言(一)
大数据·运维·elasticsearch·搜索引擎·全文检索
hay_lee8 小时前
一台docker机器如何实现构建多平台镜像
运维·docker·云原生·容器
AllenLeungX8 小时前
Linux 安装 sftp
linux·运维·服务器