mirror of
https://github.com/oneclickvirt/oneclickvirt.github.io.git
synced 2026-06-09 08:19:16 +08:00
update
This commit is contained in:
@@ -2,33 +2,33 @@
|
||||
outline: deep
|
||||
---
|
||||
|
||||
# PVE主体安装
|
||||
# PVE Body Installation
|
||||
|
||||
安装过程中遇到选项不会选的可无脑按回车
|
||||
If you don't know how to choose an option during installation, just press enter.
|
||||
|
||||
## 一键安装PVE
|
||||
## One-click PVE installation
|
||||
|
||||
:::tip
|
||||
建议debian11而不是debian12,因为后者虽然是stable版本但不知道是否有未发现的BUG,debian11安装的目前稳定点
|
||||
:::
|
||||
I recommend debian11 instead of debian12, because the latter is a stable version but I don't know if there are any undiscovered bugs, and the debian11 installation is currently more stable.
|
||||
:::.
|
||||
|
||||
- 安装的是当下apt源最新的PVE
|
||||
- 比如debian10则是pve6.4,debian11则是pve7.x,debian12则是pve8.x
|
||||
- ```/etc/hosts```文件修改(修正商家hostname设置错误以及新增PVE所需的内容)
|
||||
- ```/etc/cloud/cloud.cfg```文件修改(避免覆写已修改的hostname等配置)
|
||||
- ```/etc/network/interfaces```文件修改(修复auto、dhcp类型为static、增加vmbr0网关)
|
||||
- 检测是否为中国IP,如果为中国IP使用清华镜像源,否则使用官方源,同时处理apt的源和对应的nameserver,避免断网
|
||||
- 创建vmbr0(独立IP网关),宿主机允许addr和gateway为内网IP或外网IP,已自动识别
|
||||
- vmbr0创建支持开设纯IPV4、纯IPV6、双栈虚拟机,自动识别IPV4地址和IPV6地址,自动识别对应的IP区间
|
||||
- 安装PVE开虚拟机需要的必备工具包
|
||||
- x86_64的替换apt源中的企业订阅为社区源,arm的使用第三方修复的补丁构建的源
|
||||
- 打印查询Linux系统内核和PVE内核是否已安装
|
||||
- 设置DNS检测```8.8.8.8```的开机自启添加DNS的systemd服务
|
||||
- 新增PVE的APT源链接后,下载PVE并打印输出登陆信息
|
||||
- The installation is the latest PVE from the apt source at the moment.
|
||||
- For example, debian10 is pve6.4, debian11 is pve7.x, debian12 is pve8.x
|
||||
- Changes to the ``/etc/hosts`` file (to fix the wrong hostname setting for merchants and to add the required content for PVE)
|
||||
- ``/etc/cloud/cloud.cfg`` file modification (to avoid overwriting modified hostname etc.)
|
||||
- ``/etc/network/interfaces`` file modification (fix auto, dhcp type to static, add vmbr0 gateway)
|
||||
- Detect whether it is China IP, if it is China IP use Tsinghua mirror source, otherwise use the official source, and at the same time deal with the source of apt and the corresponding nameserver, to avoid disconnections
|
||||
- Create vmbr0 (independent IP gateway), the host allows addr and gateway for intranet IP or extranet IP, has been automatically recognized
|
||||
- vmbr0 creation support to open pure IPV4, pure IPV6, dual-stack virtual machine, automatic identification of IPV4 address and IPV6 address, automatic identification of the corresponding IP interval
|
||||
- Installation of the necessary toolkit for PVE to open a virtual machine
|
||||
- x86_64 replace enterprise subscriptions in apt sources with community sources, arm sources built using third-party patches for fixes
|
||||
- Print query Linux system kernel and PVE kernel installed or not
|
||||
- Setting up DNS detection ``8.8.8.8.8`` for boot add DNS systemd service
|
||||
- Download PVE and printout of login information after adding APT source link for PVE
|
||||
|
||||
所有修改过的文件均已设置为只读模式,避免重启后文件被覆写
|
||||
All modified files have been set to read-only mode to avoid overwriting after reboot.
|
||||
|
||||
如需修改请使用```chattr -i 文件路径```取消只读锁定,修改完毕请执行```chattr +i 文件路径```进行只读锁定
|
||||
If you want to modify the file, please use ``chattr -i file path`` to cancel the read-only lock, and run ``chattr +i file path`` to lock the read-only lock when you finish modifying the file.
|
||||
|
||||
Command:
|
||||
|
||||
@@ -36,26 +36,26 @@ Command:
|
||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh
|
||||
```
|
||||
|
||||
或
|
||||
or
|
||||
|
||||
```shell
|
||||
bash install_pve.sh
|
||||
```
|
||||
|
||||
:::tip
|
||||
安装成功后打开网页可能提示不安全,点击高级或更多选项,坚持访问即可
|
||||
:::
|
||||
After successful installation, the web page may not be safe to open, click on Advanced or More Options and insist on accessing it!
|
||||
:::.
|
||||
|
||||
登录的信息是你SSH的账户和密码
|
||||
The login information is your SSH account and password.
|
||||
|
||||
## 预配置环境
|
||||
## Pre-configure the environment
|
||||
|
||||
- 创建资源池mypool
|
||||
- 移除订阅弹窗
|
||||
- 尝试开启硬件直通
|
||||
- 对AppArmor模块检测和自动安装
|
||||
- 重启系统前推荐挂上[nezha探针](https://github.com/naiba/nezha)方便在后台不通过SSH使用命令行,避免SSH可能因为商家奇葩的预设可能导致重启后root密码丢失
|
||||
- 执行```reboot```前需要等待后台任务执行完毕,一些宿主机的系统apt命令执行很慢,得等一会才能执行完毕,当然大部分的机器没这么烂
|
||||
- Creating a resource pool mypool
|
||||
- Remove the subscription popup
|
||||
- Attempt to enable hardware passthrough
|
||||
- Detect and auto-install AppArmor modules.
|
||||
- Before rebooting the system, it is recommended to hook up [nezha probe](https://github.com/naiba/nezha) to facilitate the use of the command line in the background without SSH, to avoid the possibility that SSH may lead to the loss of the root password after the reboot due to the merchant's strange presets.
|
||||
- Before executing ``reboot``, you need to wait for the background task to finish executing, some host system apt command execution is very slow, you have to wait for a while to finish executing, of course, most of the machines are not so bad!
|
||||
|
||||
Command:
|
||||
|
||||
@@ -63,26 +63,25 @@ Command:
|
||||
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/build_backend.sh)
|
||||
```
|
||||
|
||||
## 自动配置宿主机的网关
|
||||
## Automatically configure the host's gateway
|
||||
|
||||
:::warning
|
||||
使用前请保证重启过服务器且此时PVE能正常使用WEB端再执行,重启机器后不要立即执行此命令,待WEB端启动成功后至少等1分钟再执行本命令
|
||||
Before using this command, please make sure that you have restarted the server and that PVE can use the WEB terminal normally before executing this command. Do not execute this command immediately after restarting the machine, wait for at least 1 minute after the WEB terminal is successfully started before executing this command.
|
||||
:::
|
||||
|
||||
:::tip
|
||||
这一步是最容易造成SSH断开的,原因是未等待PVE内核启动就修改网络会造成设置冲突,所以至少等几分钟待内核启动也就是WEB端启动成功后再执行
|
||||
This step is most likely to cause SSH disconnections, the reason is to modify the network without waiting for the PVE kernel to start, which will result in setting conflicts, so wait at least a few minutes until the kernel is started, that is, the WEB side is started successfully before execution.
|
||||
:::
|
||||
|
||||
- 创建vmbr1(NAT网关),暂不支持开设带独立IPV6地址的NAT的IPV4虚拟机
|
||||
- 想查看完整设置可以执行```cat /etc/network/interfaces```查看,如需修改网关需要修改该文件,web端已经无法修改
|
||||
- 加载iptables并设置回源且允许NAT端口转发
|
||||
- Creating vmbr1 (NAT gateway), not supporting IPV4 VMs with separate IPV6 addresses for NAT.
|
||||
- If you want to see the complete settings, you can execute ``cat /etc/network/interfaces`` to see, if you need to modify the gateway you need to modify the file, the web site can not be modified!
|
||||
- Load iptables and set back to source and allow NAT port forwarding.
|
||||
|
||||
简单的说,```vmbr0```负责v4/v6的独立IP,```vmbr1```复杂v4/v6的NAT
|
||||
In short, ``vmbr0`` is responsible for v4/v6 standalone IPs, and ``vmbr1`` is responsible for complex v4/v6 NATs.
|
||||
|
||||
开独立IPV4的虚拟机时使用的vmbr0,gateway同宿主机,IPV4/CIDR使用同一网段的地址和相同的子网掩码,使用宿主机未绑定的IPV4地址做IPV4/CIDR,当然如果后续使用本套脚本无需关注这点细枝末节的东西
|
||||
|
||||
开NAT的IPV4的虚拟机时使用vmbr1,gateway使用```172.16.1.1```,IPV4/CIDR使用```172.16.1.x/24```,这里的x不能是1,当然如果后续使用本套脚本无需关注这点细枝末节的东西
|
||||
Open independent IPV4 virtual machine using vmbr0, gateway with the host, IPV4/CIDR using the same network segment address and the same subnet mask, using the host's unbound IPV4 address for IPV4/CIDR, of course, if the subsequent use of this script does not need to pay attention to this point of the nuances of the thing
|
||||
|
||||
Use vmbr1 for IPV4 VM with NAT, ``172.16.1.1`` for gateway, ``172.16.1.x/24`` for IPV4/CIDR, where x can't be 1, but of course you don't need to pay attention to this minutia if you use this script later.
|
||||
Command:
|
||||
|
||||
```shell
|
||||
@@ -90,5 +89,5 @@ bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spirit
|
||||
```
|
||||
|
||||
:::tip
|
||||
这一步是可能需要你执行成功几分钟后重启系统,详见脚本最后执行完毕的提示
|
||||
:::
|
||||
This step may require you to reboot your system after a few minutes of successful execution, see the final execution of the script at the end of the tip
|
||||
:::
|
||||
Reference in New Issue
Block a user