# PVE-Server **Repository Path**: seanlocke/pve-server ## Basic Information - **Project Name**: PVE-Server - **Description**: PVE 家用服务器搭建指南 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-03-25 - **Last Updated**: 2025-09-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PVE ## 初始化 去pve节点的更新里把企业源给禁用 LXC 换源 ```Shell cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm_back sed -i 's|http://download.proxmox.com|https://mirrors.tuna.tsinghua.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm systemctl restart pvedaemon.service apt update && apt dist-upgrade -y ``` 更新pve内核 ```Shell apt install pve-kernel-6.2 ``` ## 硬件直通 ### 核显 检查PVE下915 guc huc dmc固件是否齐全(正常情况下系统自带) ```Shell cd /lib/firmware/i915 && ls ehl_guc*.bin && ls ehl_huc*.bin && ls icl_dmc*.bin ``` ## 宿主机挂载 NFS/SMB 在PVE节点shell下运行 ```Shell pct set 101 -mp0 /mnt/pve/share_nfs,mp=/mnt/share_nfs ``` # LXC ## 硬件直通(低压CPU) 特权容器 ### 核显 在pve节点中设置显卡映射 ```Shell nano /etc/pve/lxc/[CT_ID].conf ``` 输入 ``` lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 29:0 rwm lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file lxc.apparmor.profile: unconfined ``` 修改 i915配置 ```Shell nano /etc/modprobe.d/i915.conf ``` 输入 ``` options i915 enable_guc=3 ``` 重启 ```Shell update-grub reboot ``` 验证验证低功耗编码HuC和GuC是否开启 ```Shell journalctl -b -o short-monotonic -k | egrep -i "i915|dmr|dmc|guc|huc" ``` # Debian ## 初始化 ### 1、安装配置git ```Shell apt-get -y install git git config --global pull.rebase false git config --global user.name "Sean" git config --global user.email "ssbxiaoge@163.com" mkdir .setup cd .setup git clone https://gitee.com/seanlocke/pve-server.git ``` ### 2、换源 ```Shell bash replace-debian-registry.sh ``` ### 2、SSH配置 ```Shell bash ssh_config.sh ``` ### 3、安装必要软件 ```Shell apt-get update && apt-get -y upgrade apt-get -f -y install apt-transport-https ca-certificates curl software-properties-common gnupg rsync ``` ### 4、安装Docker ```Shell bash docker_setup.sh ``` ## 额外配置 ### 网络存储挂载 安装软件 ```Shell apt-get -f -y install cifs-utils unzip fuse3 ``` 自动挂载 ```Shell nano /etc/fstab ``` 挂载命令 ```Shell mount -a ``` #### SMB 配置smb用户名和密码 ```Shell nano ~/.smbcredentials ``` ``` username=smb_share password=share_password ``` 自动挂载格式 ``` //192.168.7.9/Content /mnt/nas/Content cifs credentials=/root/.smbcredentials,iocharset=utf8,auto,nobrl,noperm 0 0 //192.168.7.9/Data /mnt/nas/Data cifs credentials=/root/.smbcredentials,iocharset=utf8,auto,nobrl,noperm 0 0 ``` #### Webdav Rclone 安装 ```Shell curl https://rclone.org/install.sh | bash ``` 配置 ```Shell rclone config ``` 配置位置 ``` /root/.config/rclone/rclone.conf ``` 设置服务 ```Shell bash rclone.sh ``` # OpenWRT ## Tailscale ```Shell bash tailscale.sh ```