分类 安装教程 下的文章

golang提示

github.com/google/gopacket/pcap
../../../go/pkg/mod/github.com/google/gopacket@v1.1.19/pcap/pcap_unix.go:34:10: fatal error: pcap.h: No such file or directory
 #include <pcap.h>

尝试通过yum安装,提示没有找到libpcap-devel

Package 14:libpcap-1.5.3-11.el7.x86_64 already installed and latest version
No package libpcap-devel available.
Nothing to do

下载对应版本的rpm包

wget http://vault.centos.org/7.6.1810/os/x86_64/Packages/libpcap-devel-1.5.3-11.el7.x86_64.rpm

安装

rpm -ivh libpcap-devel-1.5.3-11.el7.x86_64.rpm

1、以管理员身份打开 PowerShell 控制台。

2、创建内部交换机。

PS C:\> New-VMSwitch -SwitchName "HyperVNet" -SwitchType Internal

3、查找刚创建的虚拟交换机的接口索引。

PS C:\> Get-NetAdapter

4、使用 New-NetIPAddress 配置 NAT 网关。

PS C:\> New-NetIPAddress -IPAddress 192.168.9.2 -PrefixLength 24 -InterfaceIndex 71

5、使用 New-NetNat 配置 NAT 网络。

New-NetNat -Name HyperVNet -InternalIPInterfaceAddressPrefix 192.168.9.0/24

Get-NetNat可以看到刚才创建的NAT网络

在虚拟机中配置静态IP为192.168.9.0段,网关为192.168.9.2即可。DNS按自己情况配置

参考:https://learn.microsoft.com/zh-cn/virtualization/hyper-v-on-windows/user-guide/setup-nat-network

将img文件(2022101-Ipv4-Bypass-5.15-x86-64-generic-squashfs-combined-efi.img)解压出来,使用VBoxManage.exe进行转换,cmd语句如下:

D:\vbox\openwrt>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw -format VDI 2022101-Ipv4-Bypass-5.15-x86-64-generic-squashfs-combined-efi.img 2022101-Ipv4-Bypass-5.15-x86-64-generic-squashfs-combined-efi.vdi

新建虚拟机使用转换出来的vdi虚拟硬盘文件,首次启动前先扩大虚拟磁盘空间,否则磁盘空间满,配置文件修改后重启会恢复默认值。

KVM安装完所有驱动后还是有未知设备。

参考微软文章

Hyper-V integration components update for Windows virtual machines (microsoft.com)

https://support.microsoft.com/en-us/topic/hyper-v-integration-components-update-for-windows-virtual-machines-8a74ffad-576e-d5a0-5a2f-d6fb2594f990

下载对应版本补丁,然后用cmd管理员方式执行,然后重启即可。

dism /online /Add-Package /PackagePath:C:\Users\neo\Desktop\windows6.x-hypervintegrationservices-x64.cab

frps安装命令

mv frps /usr/bin
chmod +x /usr/bin/frps

mv frps.service /etc/systemd/system/

mkdir /etc/frp/
mv frps.ini /etc/frp/
systemctl start frps
systemctl enable frps
systemctl status frps

frpc安装命令

mv frpc /usr/bin/
chmod 777 /usr/bin/frpc

mv frpc.service /etc/systemd/system/

mkdir /etc/frp/
mv frpc.ini /etc/frp/
systemctl stop frpc
systemctl start frpc
systemctl enable frpc
systemctl status frpc