本文介绍如何为GTX1060显卡开启vGPU功能。消费级显卡不支持nvidia GRID vGPU功能。在2021年初,疫情激发了黑客的创作热情,给出了一个vgpu_unlock的补丁,可以让消费级显卡支持vGPU。但是vgpu_unlock 和 Proxmox 配合起来有好多坑。

首先,Proxmox 不在nvida vGPU的官方支持支持的hypervisor内,不是每个Proxmox 版本都能稳定的支持nvidia vgpu。我的上一篇文章《DoraCloud for Proxmox桌面云上启用NVIDIA Tesla P4的vGPU功能》讲到了在Proxmox 5.4 上为 Tesla P4 启动vGPU功能。 为啥是Proxmox 5.4,主要是这个版本的内核和nvidia vgpu配合起来比较稳定。 PVE 6.4,PVE7.x貌似都无法和nvida vgpu稳定的工作。

其次,Proxmox降低到 5.4后,5.4是源于Debian 9的。Debian 9 自带 Python 3.5。 但是Python 3.5 和 vgpu_unlock的python部分的代码不兼容。需要升级python3.6 或者 3.7。但是在PVE 5.4上安装Python 3.6/3.7,特别费劲。 虽然也成功的让 vgpu_unlock 成功启用过。但是总有说不清的混乱出现。 另外为了运行 mdevctl,还需要加载 rust 的工具链和cargo包管理工具。感觉一个小补丁牵出了一头牛。

经过探索,vgpu_unlock已经衍生出C和语言版本,以及 RUST语言版本。 于是选择RUST版本的vgpu_unlock,替代vgpu_unlock的Python配置vgpu服务的部分。

整体的安装过程与之前的Proxmox 5.4上支持P4 vGPU的过程相似。

与P4的安装过程相比,unlock的过程增加了如下环节:

1、下载vgpu_unlock项目,执行对nvidia  DKMS驱动打补丁的部分。 而对于vgpu service修改部分的不要执行,由 vgpu_unlock-rs 部分完成。

国内位置:https://gitee.com/deskpool/vgpu_unlock.git

2、下载安装 RUST工具链和cargo包管理器,并切换 USTC的源。

3、下载vgpu_unlock-rs项目,编译配置使用vgpu_unlock-rs来启用 unlock的服务。

国内位置:https://gitee.com/deskpool/vgpu_unlock-rs

1、下载安装Proxmox 5.4.1

 
推荐中科大( USTC)的源下载 ISO,然后使用 rufus 制作 启动U盘。 
 

2、修改中科大源,更新

替换中科大的源,更新升级系统。

  1. cp /etc/apt/sources.list /etc/apt/sources.list.backup
  2. sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
  3. sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
  4.  
  5. mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
  6. CODENAME=`cat /etc/os-release |grep PRETTY_NAME |cut -f 2 -d "(" |cut -f 1 -d ")"`
  7. echo "deb https://mirrors.ustc.edu.cn/proxmox/debian $CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
  8.  
  9. #更新
  10. apt update && apt dist-upgrade -y

安装DKMS 依赖包

  1. #安装 DKMS 依赖包
  2. apt install pve-headers dkms git pve-headers-4.15.18-12-pve -y

3、启用 IOMMU

服务器为Intel 处理器,通过如下脚本启用IOMMU,如果是AMD处理器,配置有差异。

  1. # 复制如下脚本,启用IO-MMU
  2.  
  3. # /etc/default/grub 的GRUB_CMDLINE_LINUX_DEFAULT,增加 intel_iommu=on iommu=pt
  4. sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"/g' /etc/default/grub
  5.  
  6. update-grub
  7.  
  8. # 加载 vfio vfio_iommu_type1 vfio_pci vfio_virqfd 4个Modules
  9. echo vfio >> /etc/modules
  10. echo vfio_iommu_type1 >> /etc/modules
  11. echo vfio_pci >> /etc/modules
  12. echo vfio_virqfd >> /etc/modules
  13.  
  14. echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
  15. echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf
  16. echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
  17.  
  18. update-initramfs -u
  19. reboot 

执行完毕脚本,会自动重启服务器,然后查看日志,确认 IOMMU已经启用。

  1. root@pveserver:~# dmesg | grep -e DMAR -e IOMMU
  2. [ 0.000000] ACPI: DMAR 0x0000000079A48648 0000A8 (v01 INTEL EDK2 00000002 01000013)
  3. [ 0.000000] DMAR: IOMMU enabled
  4. [ 0.004000] DMAR: Host address width 39
  5. [ 0.004000] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
  6. [ 0.004000] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
  7. [ 0.004000] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
  8. [ 0.004000] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da

  

4、安装DKMS 和 NVIDIA 内核驱动程序

  1. #下载nvidia 驱动
  2. wget http://www1.deskpool.com:9000/software/NVIDIA-Linux-x86_64-460.32.03-grid.run
  3. wget http://www1.deskpool.com:9000/software/NVIDIA-Linux-x86_64-460.32.04-vgpu-kvm.run
  4.  
  5. chmod +x NVIDIA-Linux-x86_64-460.32.04-vgpu-kvm.run
  6.  
  7. #安装驱动
  8. ./NVIDIA-Linux-x86_64-460.32.04-vgpu-kvm.run -dkms 

为了让DoraCloud桌面云系统能够使用nvidia 的GPU资源,需要对Proxmox 5.4 打一个补丁。 该补丁对Proxmox的 API进行了增强。

  1. wget http://www1.deskpool.com:9000/software/patch.tar.gz
  2. tar -zxvf patch.tar.gz -C /

NVIDIA 驱动安装成功后,运行如下命令,重启Proxmox 服务器。

  1. systemctl daemon-reload
  2. reboot

如果GPU是支持NVIDA GRID的专业GPU,那么vGPU的驱动已经安装好了。由于GPU是消费级GPU,需要执行vgpu_unlock。

5、安装vgpu_unlock,对nvida 驱动源代码打补丁

  1. git clone https://gitee.com/deskpool/vgpu_unlock.git
  2. chmod -R +x vgpu_unlock
  3. sed -i 's/#include "nv-time.h"/#include "nv-time.h"\n\n#include "\/root\/vgpu_unlock\/vgpu_unlock_hooks.c"/g' /usr/src/nvidia-460.32.04/nvidia/os-interface.c
  4.  
  5. echo "ldflags-y += -T /root/vgpu_unlock/kern.ld" >>/usr/src/nvidia-460.32.04/nvidia/nvidia.Kbuild
  6. dkms remove -m nvidia -v 460.32.04 --all
  7. dkms install -m nvidia -v 460.32.04

6、安装rust工具链和cargo包管理器

Proxmox 5.4 自带的cargo版本太旧,会有问题。需要从rust官网安装。以下为从中科大(USTC)源安装 rust 和 cargo

执行如下脚本,并选择 Y,通过 rustup 方式安装 rust 和 cargo

  1. #设置rustup的source为 USTC
  2. export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
  3. export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
  4. wget -qO- https://cdn.jsdelivr.net/gh/rust-lang-nursery/rustup.rs/rustup-init.sh |sh

设置cargo的镜像为 USTC

  1. │#加载cargo的环境变量
  2. source ~/.cargo/env
  3.  
  4. #设置cargo的源镜像为 USTC
  5. cat >>~/.cargo/config <<EOF
  6. [source.crates-io]
  7. replace-with = 'ustc'
  8.  
  9. [source.ustc]
  10. registry = "git://mirrors.ustc.edu.cn/crates.io-index"
  11. EOF

7、安装rust工具链和cargo包管理器

  1. #下载 vgpu_unlock-rs 项目
    git clone https://gitee.com/deskpool/vgpu_unlock-rs
  2. cd vgpu_unlock-rs/
  3. cargo build --release
  1. #nvidia-vgpud 的unlock 服务
  2. mkdir /etc/systemd/system/nvidia-vgpud.service.d
  3. cat >>/etc/systemd/system/nvidia-vgpud.service.d/vgpu_unlock.conf <<EOF
  4. [Service]
  5. Environment=LD_PRELOAD=/root/vgpu_unlock-rs/target/release/libvgpu_unlock_rs.so
  6. EOF
  7.  
  8. #nvidia-vgpu-mgr 的unlock服务
  9. mkdir /etc/systemd/system/nvidia-vgpu-mgr.service.d
  10. cat >>/etc/systemd/system/nvidia-vgpu-mgr.service.d/vgpu_unlock.conf <<EOF
  11. [Service]
  12. Environment=LD_PRELOAD=/root/vgpu_unlock-rs/target/release/libvgpu_unlock_rs.so
  13. EOF
  14.  
  15. #描述文件,控制GPU的显示配置,以及cuda
  16. mkdir /etc/vgpu_unlock
  17. cat >>/etc/vgpu_unlock/profile_override.toml <<EOF
  18. [profile.nvidia-55]
  19. num_displays = 1
  20. display_width = 1920
  21. display_height = 1080
  22. max_pixels = 2073600
  23. cuda_enabled = 1
  24. frl_enabled = 0
  25. EOF

重启动完毕后,观察syslog日志,确定vgpu unlock 是否启动

  1. 1 root@pveserver:~# cat /var/log/syslog |grep unlock
  2. 2 Dec 17 15:28:22 pveserver nvidia-vgpud: PID file unlocked.
  3. 3 Dec 17 15:41:36 pveserver nvidia-vgpud: PID file unlocked.

再观察一下识别的vGPU类型,可以看到 GTX-1060已经被模拟成了P40

  1. 1 root@pveserver:~# cat /var/log/syslog |grep VGPU |grep GRID
  2. 2 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x3e: GRID P40-1B Class: NVS
  3. 3 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x2e: GRID P40-1Q Class: Quadro
  4. 4 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x2f: GRID P40-2Q Class: Quadro
  5. 5 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x30: GRID P40-3Q Class: Quadro
  6. 6 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x31: GRID P40-4Q Class: Quadro
  7. 7 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x32: GRID P40-6Q Class: Quadro
  8. 8 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x33: GRID P40-8Q Class: Quadro
  9. 9 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x34: GRID P40-12Q Class: Quadro
  10. 10 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x35: GRID P40-24Q Class: Quadro
  11. 11 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x36: GRID P40-1A Class: NVS
  12. 12 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x37: GRID P40-2A Class: NVS
  13. 13 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x38: GRID P40-3A Class: NVS
  14. 14 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x39: GRID P40-4A Class: NVS
  15. 15 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x3a: GRID P40-6A Class: NVS
  16. 16 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x3b: GRID P40-8A Class: NVS
  17. 17 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x3c: GRID P40-12A Class: NVS
  18. 18 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x3d: GRID P40-24A Class: NVS
  19. 19 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x9c: GRID P40-2B Class: NVS
  20. 20 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0xd7: GRID P40-2B4 Class: NVS
  21. 21 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0xf1: GRID P40-1B4 Class: NVS
  22. 22 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x11f: GRID P40-24C Class: Compute
  23. 23 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x11b: GRID P40-4C Class: Compute
  24. 24 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x11c: GRID P40-6C Class: Compute
  25. 25 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x11d: GRID P40-8C Class: Compute
  26. 26 Dec 17 15:41:36 pveserver nvidia-vgpud: VGPU Type 0x11e: GRID P40-12C Class: Compute

通过nvidia-smi看一下GPU卡的原始信息

  1. 1 root@pveserver:~# nvidia-smi
  2. 2 Fri Dec 17 16:28:13 2021
  3. 3 +-----------------------------------------------------------------------------+
  4. 4 | NVIDIA-SMI 460.32.04 Driver Version: 460.32.04 CUDA Version: N/A |
  5. 5 |-------------------------------+----------------------+----------------------+
  6. 6 | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
  7. 7 | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
  8. 8 | | | MIG M. |
  9. 9 |===============================+======================+======================|
  10. 10 | 0 GeForce GTX 106... On | 00000000:01:00.0 Off | N/A |
  11. 11 | 21% 29C P8 7W / 130W | 19MiB / 6143MiB | 0% Default |
  12. 12 | | | N/A |
  13. 13 +-------------------------------+----------------------+----------------------+
  14. 14
  15. 15 +-----------------------------------------------------------------------------+
  16. 16 | Processes: |
  17. 17 | GPU GI CI PID Type Process name GPU Memory |
  18. 18 | ID ID Usage |
  19. 19 |=============================================================================|
  20. 20 | No running processes found |
  21. 21 +-----------------------------------------------------------------------------+

验证一下 Proxmox的API。是否支持vGPU。其中的 name 字段,是上面的补丁(patch.tar.gz)安装后的增强。便于DoraCloud的API使用。

  1. 1 root@pveserver:~# pvesh get /nodes/pveserver/hardware/pci/01:00.0/mdev
  2. 2 ┌───────────┬──────────────────────────────────────────────────────────────────────────────────────────┬──────────────┬────────────┐
  3. 3 available description name type
  4. 4 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  5. 5 1 num_heads=1, frl_config=60, framebuffer=24576M, max_resolution=4096x2160, max_instance=1 GRID P40-24C nvidia-287
  6. 6 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  7. 7 1 num_heads=4, frl_config=60, framebuffer=24576M, max_resolution=7680x4320, max_instance=1 GRID P40-24Q nvidia-53
  8. 8 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  9. 9 1 num_heads=1, frl_config=60, framebuffer=24576M, max_resolution=1280x1024, max_instance=1 GRID P40-24A nvidia-61
  10. 10 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  11. 11 2 num_heads=1, frl_config=60, framebuffer=12288M, max_resolution=4096x2160, max_instance=2 GRID P40-12C nvidia-286
  12. 12 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  13. 13 2 num_heads=4, frl_config=60, framebuffer=12288M, max_resolution=7680x4320, max_instance=2 GRID P40-12Q nvidia-52
  14. 14 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  15. 15 2 num_heads=1, frl_config=60, framebuffer=12288M, max_resolution=1280x1024, max_instance=2 GRID P40-12A nvidia-60
  16. 16 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  17. 17 3 num_heads=1, frl_config=60, framebuffer=8192M, max_resolution=1280x1024, max_instance=3 GRID P40-8A nvidia-59
  18. 18 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  19. 19 3 num_heads=1, frl_config=60, framebuffer=8192M, max_resolution=4096x2160, max_instance=3 GRID P40-8C nvidia-285
  20. 20 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  21. 21 3 num_heads=4, frl_config=60, framebuffer=8192M, max_resolution=7680x4320, max_instance=3 GRID P40-8Q nvidia-51
  22. 22 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  23. 23 4 num_heads=1, frl_config=60, framebuffer=6144M, max_resolution=1280x1024, max_instance=4 GRID P40-6A nvidia-58
  24. 24 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  25. 25 4 num_heads=1, frl_config=60, framebuffer=6144M, max_resolution=4096x2160, max_instance=4 GRID P40-6C nvidia-284
  26. 26 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  27. 27 4 num_heads=4, frl_config=60, framebuffer=6144M, max_resolution=7680x4320, max_instance=4 GRID P40-6Q nvidia-50
  28. 28 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  29. 29 6 num_heads=4, frl_config=60, framebuffer=4096M, max_resolution=7680x4320, max_instance=6 GRID P40-4Q nvidia-49
  30. 30 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  31. 31 6 num_heads=1, frl_config=60, framebuffer=4096M, max_resolution=1280x1024, max_instance=6 GRID P40-4A nvidia-57
  32. 32 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  33. 33 6 num_heads=1, frl_config=60, framebuffer=4096M, max_resolution=4096x2160, max_instance=6 GRID P40-4C nvidia-283
  34. 34 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  35. 35 8 num_heads=4, frl_config=60, framebuffer=3072M, max_resolution=7680x4320, max_instance=8 GRID P40-3Q nvidia-48
  36. 36 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  37. 37 8 num_heads=1, frl_config=60, framebuffer=3072M, max_resolution=1280x1024, max_instance=8 GRID P40-3A nvidia-56
  38. 38 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  39. 39 12 num_heads=4, frl_config=45, framebuffer=2048M, max_resolution=5120x2880, max_instance=12 GRID P40-2B nvidia-156
  40. 40 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  41. 41 12 num_heads=4, frl_config=60, framebuffer=2048M, max_resolution=7680x4320, max_instance=12 GRID P40-2Q nvidia-47
  42. 42 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  43. 43 12 num_heads=1, frl_config=60, framebuffer=2048M, max_resolution=1280x1024, max_instance=12 GRID P40-2A nvidia-55
  44. 44 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  45. 45 12 num_heads=4, frl_config=45, framebuffer=2048M, max_resolution=5120x2880, max_instance=12 GRID P40-2B4 nvidia-215
  46. 46 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  47. 47 24 num_heads=4, frl_config=45, framebuffer=1024M, max_resolution=5120x2880, max_instance=24 GRID P40-1B4 nvidia-241
  48. 48 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  49. 49 24 num_heads=4, frl_config=60, framebuffer=1024M, max_resolution=5120x2880, max_instance=24 GRID P40-1Q nvidia-46
  50. 50 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  51. 51 24 num_heads=1, frl_config=60, framebuffer=1024M, max_resolution=1280x1024, max_instance=24 GRID P40-1A nvidia-54
  52. 52 ├───────────┼──────────────────────────────────────────────────────────────────────────────────────────┼──────────────┼────────────┤
  53. 53 24 num_heads=4, frl_config=45, framebuffer=1024M, max_resolution=5120x2880, max_instance=24 GRID P40-1B nvidia-62
  54. 54 └───────────┴──────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────┘

8、使用vGPU

到这里,Proxmox虚拟化平台下,vGPU功能已经成功开启。 接下来,还需要创建 VM,并安装 nvidia grid 的guest 驱动。另外还涉及到 nvidia grid license 的申请。具体请参考Proxmox 以及nvidia vgpu的文档。

如果您使用DoraCloud管理桌面,可以直接部署DoraCloud,通过DoraCloud下载桌面模板。桌面模板已经集成了nvidia vgpu驱动。

请参考我上一篇文章,第4部分部署 DoraCloud

https://www.cnblogs.com/doracloud/p/proxmox_doracloud_telsa_p4.html

DoraCloud for Proxmox的安装

https://www.doracloud.cn/downloads/2-cn.html

版权所有,转载请注明

Proxmox 5.4使用vgpu_unlock,为GTX1060开启vGPU支持的更多相关文章

  1. Tomcat7开启CGI支持的方法

    tomcat默认没有开启cgi支持,因此有了tomat开启cgi的探索.因为原本对tomcat没多了解,所以中间或多或少走了点弯路.还好最终配置成功了,现在jy也用上这个方法了.    该方法在apa ...

  2. Java SpringBoot注解方式开启异步支持

    package task.demo.controller; import org.springframework.beans.factory.annotation.Autowired; import ...

  3. datax开启hana支持以及dolphinscheduler开启datax任务

    datax开启hana支持以及dolphinscheduler开启datax任务 前面(@,@) 前段时间因为要做异构数据导入导出,所以搜了下,发现这类工具收费的居多,使用起来未必趁手~ 于是我找了下 ...

  4. Nginx 开启PATHINFO支持ThinkPHP框架实例

    ThinkPHP支持通过PATHINFO和URL rewrite的方式来提供友好的URL,只需要在配置文件中设置 'URL_MODEL' => 2 即可.在Apache下只需要开启mod_rew ...

  5. android webview开启html5支持

    最近做的一个小项目需要用到webview.虽然只是一个简单的网页,但是由于以前用的都只是显示本地文件,没有显示网页文件.现在需要显示网页文件,发现许多网站的webapp做的挺不错的,无论是显示还是用户 ...

  6. Web Api Session开启会话支持

        1.WebApi中默认是没有开启Session会话支持的.需要在Global中重写Init方法来指定会话需要支持的类型           //代码如下 public override voi ...

  7. springboot开启事务支持时报代理错误

    问题:The bean 'xxx' could not be injected as a 'com.github.service.xx' because it is a JDK dynamic pro ...

  8. 关于在 java 8 下开启 TLS_RSA_WITH_3DES_EDE_CBC_SHA 支持 xp ie8 tls1.0 的正常访问

    最近为 aioserver 增加了ssl支持. 在 myssl.com 上测试了一下,关于[客户端握手模拟]发现 ie8 xp tls1.0  这一项提示:握手失败 (服务器断开连接) 我又试了一下 ...

  9. WebApi开启CORS支持跨域POST

    概念:CORS是一个W3C标准,全称是"跨域资源共享"(Cross-origin resource sharing).它允许浏览器向跨源服务器,发出XMLHttpRequest请求 ...

随机推荐

  1. Creating a File Mapping Object

    创建一个文件映射对象 映射一个文件的第一步是通过调用CreateFile函数来打开一个文件.为了确保其他的进程不能对文件已经被映射的那一部分进行写操作,你应该以唯一访问(exclusive acces ...

  2. Azure DevOps 中 Dapr项目自动部署流程实践

    注:本文中主要讨论 .NET6.0项目在 k8s 中运行的 Dapr 的持续集成流程, 但实际上不是Dapr的项目部署到K8s也是相同流程,只是k8s的yaml配置文件有所不同 流程选择 基于 Dap ...

  3. 【Android开发】用WebView访问证书有问题的SSL网页

    Android系统的碎片化很严重,并且手机日期不正确.手机根证书异常.com.google.android.webview BUG等各种原因,都会导致WebViewClient无法访问HTTPS站点. ...

  4. ubantu之Git使用

    本文讲述在Ubuntu 14.04 x64环境下,如何安装Git,配置连接GitHub,并且上传本地代码到github. 一. 注册Git账户以及创建仓库 要想使用github第一步当然是注册gith ...

  5. SQL语句总结---数据库操作

    https://blog.csdn.net/hallomrzhang/article/details/85010014 数据库操作 查看所有数据库 show databases; 1 查看当前使用的数 ...

  6. vue中Promise对象用法

    Promise.all([ 需要异步一起执行的方法---------先做的事 ]).then(res=>{ 后做的事(先做的事已经做好了) }) 举栗子: Promise.all([ this. ...

  7. EMS邮箱数据库常用命令(二)

    1.查询邮箱数据库的使用空间 查询Exchange环境中所有邮箱数据库. 键入以下命令 Get-MailboxDatabase -Status | FL name,DatabaseSize 命令执行后 ...

  8. Spring Boot-@EnableWebMvc注解

    作用:当配置类中添加了该注解了之后,就表示某个模块的自动配置就都失效了,全部都要自己配置 例如下面这个MVC模块的配置类 /** * @author:抱着鱼睡觉的喵喵 * @date:2020/12/ ...

  9. SpringMVC获取请求参数-基本类型

    1.Controller中的业务方法的参数名称要与请求参数的name一致,参数值会自动映射匹配 (json形式) <dependency> <groupId>com.faste ...

  10. spring原始注解(value)-03

    本博客依据是是spring原始注解-02的代码 注入普通数据类型:@Value注解的使用 1.添加driver属性,使用value注解 @Service("userService" ...