- 打通虚拟机网络
https://www.cnblogs.com/OliverQin/p/9758516.html
虚拟机网络设置为NAT,用于共享主机的IP地址
win10:控制面板\网络和 Internet\网络连接,设置wifi共享网络
配置VMNet8
下一步,还是上图进行NAT设置
此处的网关IP地址需要与虚拟机在同一网段,保持ping通
配置虚拟机ip地址
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno16777736
DEVICE=eno16777736
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.137.10
GATEWAY=192.168.137.2
NETMASK=255.255.255.0
[root@localhost /]# systemctl restart network
设置DNS
[root@localhost ~]# cat /etc/resolv.conf
nameserver 114.114.114.114
nameserver 192.168.1.1
nameserver 8.8.8.8
- 打通虚拟机yum源
https://blog.csdn.net/kangvcar/article/details/73477730
[root@localhost /]# mkdir /opt/centos
[root@localhost /]# mount /dev/sr0 /opt/centos
[root@vm1 ~]# cat /etc/yum.repos.d/local.repo
[local]
name=local
baseurl=file:///opt/centos
enabled=1
gpgcheck=0
# priority=1, 值越小,优先级越高
priority=1
centos官方yum源补充
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/epel-release-7-11.noarch.rpm
yum install -y epel-release-7-11.noarch.rpm
yum clean all
yum makecache
yum list|wc -l
pip源加速,临时
pip3 install requests -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip源加速,永久
mkdir ~/.pip
打开配置文件 ~/.pip/pip.conf,修改如下:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
# 查看pip源
pip3 config list
win下指定pip源:
Windows下,你需要在当前对用户目录下(C:\Users\xx\pip,xx 表示当前使用对用户,比如张三)创建一个 pip.ini在pip.ini文件中输入以下内容:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn
- win10访问虚拟机web网站
虚拟机关掉防火墙,或者防火墙添加ip策略,那么测试的话,直接关掉咯
[root@localhost Desktop]# systemctl stop firewalld.service
[root@localhost Desktop]# systemctl disable firewalld.service
-
xshell安装
https://www.cmsky.com/xshell-registered-version/
-
win与虚拟机文件传输
常见问题
1、睡眠或重启windows后,主机ping不通wmware虚拟机