QEMU-Windows 联网

在 Windows 上使用 qemu 虚拟机,通过此配置,可以使 qemu 中的虚拟机能连接互联网,并且也可以和 Windows 主机通信。
此方式类似于 Vmware 和 VitrualBox 中的桥接网卡。配置方法如下:

在 Windows 主机上安装 TAP 网卡驱动: 可下载 openvpn 客户端软件,只安装其中的 TAP 驱动;在网络连接中,会看到一个新的网卡,属性类似于 TAP-Win32 Adapter…,将其名称修改为 tap0。
将 tap0 虚拟网卡和 Windows 上连接互联网的真实网卡桥接: 选中这两块网卡,右键,桥接。此时,Windows 主机将不能连接互联网,需要在网桥上配置 IP 地址和域名等信息,才能使 Windows 主机连接互联网。
qemu 配置: 在虚拟机启动命令行添加以下参数:–net nic -net tap,ifname=tap0;启动虚拟机,并配置虚拟机中的网卡,则虚拟机也可以和 Windows 主机一样,连接互联网和 Windows 主机。

========
https://my.oschina.net/Czl6BQ6SEmYt/blog/164308

AI相关

EliteQuant_Matlab
https://gitee.com/EliteQuant/EliteQuant_Matlab.git

文本到视频
https://github.com/THUDM/CogVideo

https://github.com/Picsart-AI-Research/Text2Video-Zero

https://research.nvidia.com/labs/toronto-ai/VideoLDM/
https://github.com/openatx/uiautomator2
============
文本到语音,口型视频
https://huggingface.co/spaces/JavaFXpert/Chat-GPT-LangChain

 

安卓自动化测试
https://github.com/openatx/uiautomator2

============
临时的
C#连VNC
https://gitee.com/zhc341272/HCVNC.git
远程链接RDC管理
https://github.com/xunki/RemoteDesktopManage

WinIO
https://github.com/starofrainnight/winio.git

======
微同商城
https://gitee.com/fuyang_lipengjun/platform.git

ssh-agent-证书登录

# ssh-agent bash
ssh-add -l
ssh-add /root/.ssh/xyzn_api
git pull origin master

===================
A机配置
1. 生成 CA 的密钥
# ssh-keygen -t rsa           (连续三次回车,即在本地生成了公钥和私钥,不设置密码)

2. 将公钥拷到B端
# scp  root@B的iP:root/.ssh/id_rsa.pub  ./.ssh/id_rsa.pub  (需要输入密码)
===================
B机配置
创建authorized_keys2文件
# more /etc/ssh/sshd_config | grep authorized
# touch /root/.ssh/authorized_keys2 (如果已经存在这个文件, 跳过这条)

②追加公钥到authorized_keys2中
# cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2 (将id_rsa.pub的内容追加到 authorized_keys2 中)

3.SSH证书登陆验证
# ssh root@B的iP (因为没有设置私钥密码, 所以不需要密码, 登录成功)

复制SSH到服务器
ssh-copy-id -i ~/.ssh/id_rsa.pub username@server -p 22
注意权限:
chmod 600 ~/.ssh/config
chattr -i ~/.ssh/config
常用的SSH配置项

Host 别名
HostName 主机名
Port 端口
User 用户名
IdentityFile 密钥文件的路径
IdentitiesOnly 只接受SSH key 登录
PreferredAuthentications 强制使用Public Key验证

参考

# vim ~/.ssh/config
Host test
    HostName 192.168.0.2
    User root
    Port 22
    IdentityFile ~/.ssh/id_rsa

Host muji
    HostName 172.17.0.1
    User root
    Port 22
    IdentityFile ~/.ssh/id_rsa

centos,debian 离线安装包命令示例Sample

#centos setup local package
yum -y install  epel-release
yum install --downloadonly --downloaddir=./ htop
rpm -ivh ./htop*.rpm
#debian setup local package
apt-get download  htop
dpkg -i ./htop*.deb
#alpine setup local package
apk fetch htop
apk add --allow-untrusted ./htop*.apk

apk fetch --recursive htop zip unzip p7zip netcat-openbsd openjdk8 dropbear-scp dropbear-ssh dropbear-dbclient dropbear-convert
apk add  --no-network --allow-untrusted  ./htop*.apk