mirror of
https://github.com/oneclickvirt/pve.git
synced 2024-09-20 06:55:56 +08:00
update
This commit is contained in:
parent
c14df34613
commit
e553d1c12c
|
@ -1,5 +1,10 @@
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
2024.02.21
|
||||||
|
|
||||||
|
- 增加LXC容器开设的自修补镜像源:https://github.com/oneclickvirt/lxc_amd64_images
|
||||||
|
- LXC容器开设的源优先级:自修补 > 手动修补 > 官方源
|
||||||
|
|
||||||
2024.02.20
|
2024.02.20
|
||||||
|
|
||||||
- 优化环境检测脚本,IPV6不可用时不检测SLAAC配置
|
- 优化环境检测脚本,IPV6不可用时不检测SLAAC配置
|
||||||
|
|
|
@ -12,10 +12,9 @@
|
||||||
|
|
||||||
## 更新
|
## 更新
|
||||||
|
|
||||||
2024.02.21
|
2024.03.12
|
||||||
|
|
||||||
- 增加LXC容器开设的自修补镜像源:https://github.com/oneclickvirt/lxc_amd64_images
|
- 迁移仓库至于组织仓库,方便协同维护
|
||||||
- LXC容器开设的源优先级:自修补 > 手动修补 > 官方源
|
|
||||||
|
|
||||||
[更新日志](CHANGELOG.md)
|
[更新日志](CHANGELOG.md)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
自测中,勿要使用,未完成
|
自测中,勿要使用,未完成
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/pve6_to_pve7.sh -o pve6_to_pve7.sh && chmod +x pve6_to_pve7.sh && bash pve6_to_pve7.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/pve6_to_pve7.sh -o pve6_to_pve7.sh && chmod +x pve6_to_pve7.sh && bash pve6_to_pve7.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 加载系统模板
|
### 加载系统模板
|
||||||
|
@ -15,13 +15,13 @@ curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/pve6_to_pve7.sh -o
|
||||||
- 加载完成后请web端查看 pve > local(pve) > ISO Images/CT Templates 刷新一下记录,直接去创建虚拟机是可能看不到已加载的
|
- 加载完成后请web端查看 pve > local(pve) > ISO Images/CT Templates 刷新一下记录,直接去创建虚拟机是可能看不到已加载的
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/install_iso.sh -o install_iso.sh && chmod +x install_iso.sh && bash install_iso.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/install_iso.sh -o install_iso.sh && chmod +x install_iso.sh && bash install_iso.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 替换qcow2
|
### 替换qcow2
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/back/rebuild.sh -o rebuild.sh && chmod +x rebuild.sh && bash rebuild.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/back/rebuild.sh -o rebuild.sh && chmod +x rebuild.sh && bash rebuild.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -63,7 +63,7 @@ rm -rf vm*
|
||||||
尝试失败,因为已自动替换过为PVE的内核,如需卸载需要先替换为原生内核
|
尝试失败,因为已自动替换过为PVE的内核,如需卸载需要先替换为原生内核
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/back/uninstallpve.sh -o uninstallpve.sh && chmod +x uninstallpve.sh && bash uninstallpve.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/back/uninstallpve.sh -o uninstallpve.sh && chmod +x uninstallpve.sh && bash uninstallpve.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### PVE基础安装说明
|
### PVE基础安装说明
|
||||||
|
@ -128,13 +128,13 @@ curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/back/uninstallpve.
|
||||||
- 不可嵌套虚拟化KVM类型的服务器也可以开LXC虚拟化的服务器,但不推荐安装PVE,不如使用[LXD](https://github.com/spiritLHLS/lxc)
|
- 不可嵌套虚拟化KVM类型的服务器也可以开LXC虚拟化的服务器,但不推荐安装PVE,不如使用[LXD](https://github.com/spiritLHLS/lxc)
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/check_kernal.sh)
|
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
国内:
|
国内:
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/check_kernal.sh)
|
bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### PVE基础安装说明
|
#### PVE基础安装说明
|
||||||
|
@ -154,13 +154,13 @@ bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubus
|
||||||
#### 一键安装PVE
|
#### 一键安装PVE
|
||||||
|
|
||||||
```
|
```
|
||||||
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
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
国内:
|
国内:
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh
|
curl -L https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 预配置环境
|
### 预配置环境
|
||||||
|
@ -173,13 +173,13 @@ curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/mai
|
||||||
- **执行完毕建议等待几分钟后再重启服务器**,执行```reboot```前需要等待后台任务执行完毕,一些宿主机的系统apt命令执行很慢,得等一会才能执行完毕
|
- **执行完毕建议等待几分钟后再重启服务器**,执行```reboot```前需要等待后台任务执行完毕,一些宿主机的系统apt命令执行很慢,得等一会才能执行完毕
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/build_backend.sh)
|
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
国内
|
国内
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/build_backend.sh)
|
bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
### 自动配置宿主机的网关
|
### 自动配置宿主机的网关
|
||||||
|
@ -194,13 +194,13 @@ bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubus
|
||||||
- 加载iptables并设置回源且允许NAT端口转发
|
- 加载iptables并设置回源且允许NAT端口转发
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/build_nat_network.sh)
|
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
国内
|
国内
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/build_nat_network.sh)
|
bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 一键生成KVM虚拟化的NAT服务器
|
## 一键生成KVM虚拟化的NAT服务器
|
||||||
|
@ -232,13 +232,13 @@ bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubus
|
||||||
- 虚拟机的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看
|
- 虚拟机的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
国内
|
国内
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
curl -L https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 单个生成的使用方法
|
#### 单个生成的使用方法
|
||||||
|
@ -307,13 +307,13 @@ https://github.com/spiritLHLS/Images/releases/tag/v1.0
|
||||||
#### 使用方法
|
#### 使用方法
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
国内
|
国内
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh
|
curl -L https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
开设完毕可执行
|
开设完毕可执行
|
||||||
|
@ -355,13 +355,13 @@ PVE修改虚拟机配置前都得停机先,再修改配置,修改完再启
|
||||||
下载脚本
|
下载脚本
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildvm_extraip.sh -o buildvm_extraip.sh && chmod +x buildvm_extraip.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_extraip.sh -o buildvm_extraip.sh && chmod +x buildvm_extraip.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
国内下载
|
国内下载
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildvm_extraip.sh -o buildvm_extraip.sh && chmod +x buildvm_extraip.sh
|
curl -L https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_extraip.sh -o buildvm_extraip.sh && chmod +x buildvm_extraip.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
示例创建
|
示例创建
|
||||||
|
@ -402,13 +402,13 @@ LXC虚拟化的容器-自带内外网映射
|
||||||
- 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
|
- 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
国内
|
国内
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh
|
curl -L https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 如何使用
|
#### 如何使用
|
||||||
|
@ -472,13 +472,13 @@ systemctl restart networking.service
|
||||||
- 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
|
- 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
国内
|
国内
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh
|
curl -L https://ghproxy.com/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
开设完毕可执行
|
开设完毕可执行
|
||||||
|
|
|
@ -37,7 +37,7 @@ Hardware requirements to open KVM: VM-X or AMD-V support - (part of the VPS and
|
||||||
- Non-nestable virtualized KVM type servers can also run LXC virtualized servers
|
- Non-nestable virtualized KVM type servers can also run LXC virtualized servers
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/check_kernal.sh)
|
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
### PVE base installation (one-click PVE installation)
|
### PVE base installation (one-click PVE installation)
|
||||||
|
@ -56,7 +56,7 @@ bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spirit
|
||||||
- After configuration, you need to reboot the system to load the new kernel
|
- After configuration, you need to reboot the system to load the new kernel
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- The installation process may exit the installation, you need to repair the apt source manually, as shown in the following figure after the repair is completed, execute this script again
|
- The installation process may exit the installation, you need to repair the apt source manually, as shown in the following figure after the repair is completed, execute this script again
|
||||||
|
@ -73,7 +73,7 @@ curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/scripts/in
|
||||||
- Detect AppArmor module and attempt to install
|
- Detect AppArmor module and attempt to install
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/build_backend.sh)
|
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Auto-configure NAT gateway for IPV4
|
### Auto-configure NAT gateway for IPV4
|
||||||
|
@ -87,7 +87,7 @@ bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spirit
|
||||||
- Load iptables and set back to source and allow NAT port forwarding
|
- Load iptables and set back to source and allow NAT port forwarding
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/build_nat_network.sh)
|
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Generate a NAT server for KVM virtualization with one click
|
## Generate a NAT server for KVM virtualization with one click
|
||||||
|
@ -115,7 +115,7 @@ First stop the virtual machine and then modify it, and then turn it on after mod
|
||||||
- After generation, you need to wait for a period of time to configure the network and login information by cloudinit inside the virtual machine, it takes about 5 minutes
|
- After generation, you need to wait for a period of time to configure the network and login information by cloudinit inside the virtual machine, it takes about 5 minutes
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
#### How to use
|
#### How to use
|
||||||
|
@ -179,7 +179,7 @@ https://github.com/spiritLHLS/Images/releases/tag/v1.0
|
||||||
- You can customize the number of cores, memory size and hard disk size for batch opening, remember to calculate the free resources for opening
|
- You can customize the number of cores, memory size and hard disk size for batch opening, remember to calculate the free resources for opening
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -L https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh
|
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Executable after running
|
Executable after running
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.04.13
|
# 2024.03.12
|
||||||
|
|
||||||
# ./buildv6only.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统
|
# ./buildv6only.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统
|
||||||
# ./buildv6only.sh 103 test2 1234567 1 512 5 debian11
|
# ./buildv6only.sh 103 test2 1234567 1 512 5 debian11
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.09.16
|
# 2024.03.12
|
||||||
|
|
||||||
cd /root >/dev/null 2>&1
|
cd /root >/dev/null 2>&1
|
||||||
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#from https://github.com/spiritLHLS/pve
|
#from https://github.com/oneclickvirt/pve
|
||||||
|
|
||||||
|
|
||||||
## China_IP
|
## China_IP
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#from https://github.com/spiritLHLS/pve
|
#from https://github.com/oneclickvirt/pve
|
||||||
# pve 7
|
# pve 7
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#from https://github.com/spiritLHLS/pve
|
#from https://github.com/oneclickvirt/pve
|
||||||
# pve 6 to pve 7
|
# pve 6 to pve 7
|
||||||
|
|
||||||
# 打印信息
|
# 打印信息
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from https://github.com/spiritLHLS/pve
|
# from https://github.com/oneclickvirt/pve
|
||||||
|
|
||||||
apt-get install -y libguestfs-tools rng-tools curl
|
apt-get install -y libguestfs-tools rng-tools curl
|
||||||
apt-get install -y libguestfs-tools rng-tools curl --fix-missing
|
apt-get install -y libguestfs-tools rng-tools curl --fix-missing
|
||||||
curl -o rebuild_qcow2.sh https://raw.githubusercontent.com/spiritLHLS/pve/main/back/rebuild_qcow2.sh
|
curl -o rebuild_qcow2.sh https://raw.githubusercontent.com/oneclickvirt/pve/main/back/rebuild_qcow2.sh
|
||||||
chmod 777 rebuild_qcow2.sh
|
chmod 777 rebuild_qcow2.sh
|
||||||
for image in ubuntu18.qcow2 ubuntu20.qcow2 ubuntu22.qcow2 debian11.qcow2 debian12.qcow2 centos9-stream.qcow2 centos8-stream.qcow2 centos7.qcow2 almalinux8.qcow2 almalinux9.qcow2 alpinelinux_edge.qcow2 alpinelinux_stable.qcow2 rockylinux8.qcow2 rockylinux9.qcow2; do
|
for image in ubuntu18.qcow2 ubuntu20.qcow2 ubuntu22.qcow2 debian11.qcow2 debian12.qcow2 centos9-stream.qcow2 centos8-stream.qcow2 centos7.qcow2 almalinux8.qcow2 almalinux9.qcow2 alpinelinux_edge.qcow2 alpinelinux_stable.qcow2 rockylinux8.qcow2 rockylinux9.qcow2; do
|
||||||
curl -o $image "https://down.idc.wiki/Image/realServer-Template/current/qcow2/$image"
|
curl -o $image "https://down.idc.wiki/Image/realServer-Template/current/qcow2/$image"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from https://github.com/spiritLHLS/pve
|
# from https://github.com/oneclickvirt/pve
|
||||||
|
|
||||||
if ! command -v virt-customize &> /dev/null
|
if ! command -v virt-customize &> /dev/null
|
||||||
then
|
then
|
||||||
|
@ -21,7 +21,7 @@ if [[ "$qcow_file" == *"debian"* || "$qcow_file" == *"ubuntu"* || "$qcow_file" =
|
||||||
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
||||||
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/spiritLHLS/pve' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/oneclickvirt/pve' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
||||||
echo "启用SSH功能..."
|
echo "启用SSH功能..."
|
||||||
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
||||||
|
@ -63,7 +63,7 @@ elif [[ "$qcow_file" == *"almalinux9"* || "$qcow_file" == *"rockylinux"* ]]; the
|
||||||
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
||||||
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/spiritLHLS/pve' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/oneclickvirt/pve' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
||||||
echo "启用SSH功能..."
|
echo "启用SSH功能..."
|
||||||
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
||||||
|
@ -91,7 +91,7 @@ elif [[ "$qcow_file" == *"almalinux8"* || "$qcow_file" == *"centos9-stream"* ||
|
||||||
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
||||||
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/spiritLHLS/pve' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/oneclickvirt/pve' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
||||||
echo "启用SSH功能..."
|
echo "启用SSH功能..."
|
||||||
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
||||||
|
@ -119,7 +119,7 @@ else
|
||||||
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
virt-customize -a $qcow_file --run-command "sed -i 's/ssh_pwauth:[[:space:]]*0/ssh_pwauth: 1/g' /etc/cloud/cloud.cfg"
|
||||||
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '' > /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Modified from https://github.com/oneclickvirt/kvm_images' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/spiritLHLS/pve' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo 'Related repo https://github.com/oneclickvirt/pve' >> /etc/motd"
|
||||||
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
virt-customize -a $qcow_file --run-command "echo '--by https://t.me/spiritlhl' >> /etc/motd"
|
||||||
echo "启用SSH功能..."
|
echo "启用SSH功能..."
|
||||||
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
virt-customize -a $qcow_file --run-command "systemctl enable ssh"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#from https://github.com/spiritLHLS/pve
|
#from https://github.com/oneclickvirt/pve
|
||||||
|
|
||||||
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
|
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
|
||||||
iptables -t nat -F
|
iptables -t nat -F
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.08.15
|
# 2024.03.12
|
||||||
|
|
||||||
########## 预设部分输出和部分中间变量
|
########## 预设部分输出和部分中间变量
|
||||||
|
|
||||||
|
@ -253,5 +253,5 @@ fi
|
||||||
# Dockerfile_aarch64_7
|
# Dockerfile_aarch64_7
|
||||||
tag="x86_64_7"
|
tag="x86_64_7"
|
||||||
docker_file_name="Dockerfile_x86_64_7"
|
docker_file_name="Dockerfile_x86_64_7"
|
||||||
curl -Lk "${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/dockerfiles/${docker_file_name}" -o /root/Dockerfile
|
curl -Lk "${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/dockerfiles/${docker_file_name}" -o /root/Dockerfile
|
||||||
docker build -t "spiritlhl/proxmoxve:${tag}" -f /root/Dockerfile .
|
docker build -t "spiritlhl/proxmoxve:${tag}" -f /root/Dockerfile .
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
|
# 2024.03.12
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
DNS_SERVER="8.8.8.8"
|
DNS_SERVER="8.8.8.8"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.09.16
|
# 2024.03.12
|
||||||
|
|
||||||
# 清理路由缓存
|
# 清理路由缓存
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.06.25
|
# 2024.03.12
|
||||||
|
|
||||||
# 检查是否存在 "iface eth0 inet6 auto" 行
|
# 检查是否存在 "iface eth0 inet6 auto" 行
|
||||||
if ! grep -q "iface eth0 inet6 auto" /etc/network/interfaces; then
|
if ! grep -q "iface eth0 inet6 auto" /etc/network/interfaces; then
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.07.31
|
# 2024.03.12
|
||||||
|
|
||||||
# 安装ifupdown2
|
# 安装ifupdown2
|
||||||
apt-get install -y ifupdown2
|
apt-get install -y ifupdown2
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.18
|
# 2024.03.12
|
||||||
|
|
||||||
# 打印信息
|
# 打印信息
|
||||||
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.16
|
# 2024.03.12
|
||||||
|
|
||||||
########## 预设部分输出和部分中间变量
|
########## 预设部分输出和部分中间变量
|
||||||
|
|
||||||
|
@ -331,13 +331,13 @@ if [ ! -z "$ipv6_address" ] && [ ! -z "$ipv6_prefixlen" ] && [ ! -z "$ipv6_gatew
|
||||||
if [ -f /usr/local/bin/pve_maximum_subset ] && [ $(cat /usr/local/bin/pve_maximum_subset) = false ]; then
|
if [ -f /usr/local/bin/pve_maximum_subset ] && [ $(cat /usr/local/bin/pve_maximum_subset) = false ]; then
|
||||||
_blue "No install ndpresponder"
|
_blue "No install ndpresponder"
|
||||||
elif [ "$system_arch" = "x86" ]; then
|
elif [ "$system_arch" = "x86" ]; then
|
||||||
wget ${cdn_success_url}https://github.com/spiritLHLS/pve/releases/download/ndpresponder_x86/ndpresponder -O /usr/local/bin/ndpresponder
|
wget ${cdn_success_url}https://github.com/oneclickvirt/pve/releases/download/ndpresponder_x86/ndpresponder -O /usr/local/bin/ndpresponder
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/ndpresponder.service -O /etc/systemd/system/ndpresponder.service
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/ndpresponder.service -O /etc/systemd/system/ndpresponder.service
|
||||||
chmod 777 /usr/local/bin/ndpresponder
|
chmod 777 /usr/local/bin/ndpresponder
|
||||||
chmod 777 /etc/systemd/system/ndpresponder.service
|
chmod 777 /etc/systemd/system/ndpresponder.service
|
||||||
elif [ "$system_arch" = "arch" ]; then
|
elif [ "$system_arch" = "arch" ]; then
|
||||||
wget ${cdn_success_url}https://github.com/spiritLHLS/pve/releases/download/ndpresponder_aarch64/ndpresponder -O /usr/local/bin/ndpresponder
|
wget ${cdn_success_url}https://github.com/oneclickvirt/pve/releases/download/ndpresponder_aarch64/ndpresponder -O /usr/local/bin/ndpresponder
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/ndpresponder.service -O /etc/systemd/system/ndpresponder.service
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/ndpresponder.service -O /etc/systemd/system/ndpresponder.service
|
||||||
chmod 777 /usr/local/bin/ndpresponder
|
chmod 777 /usr/local/bin/ndpresponder
|
||||||
chmod 777 /etc/systemd/system/ndpresponder.service
|
chmod 777 /etc/systemd/system/ndpresponder.service
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.21
|
# 2024.03.12
|
||||||
|
|
||||||
# ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6
|
# ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6
|
||||||
# ./buildct.sh 102 1234567 1 512 5 20001 20002 20003 30000 30025 debian11 local N
|
# ./buildct.sh 102 1234567 1 512 5 20001 20002 20003 30000 30025 debian11 local N
|
||||||
|
@ -484,12 +484,12 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if echo "$system" | grep -qiE "alpine|archlinux|gentoo|openwrt" >/dev/null 2>&1; then
|
if echo "$system" | grep -qiE "alpine|archlinux|gentoo|openwrt" >/dev/null 2>&1; then
|
||||||
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/ssh_sh.sh -o ssh_sh.sh
|
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/ssh_sh.sh -o ssh_sh.sh
|
||||||
pct exec $CTID -- chmod 777 ssh_sh.sh
|
pct exec $CTID -- chmod 777 ssh_sh.sh
|
||||||
pct exec $CTID -- dos2unix ssh_sh.sh
|
pct exec $CTID -- dos2unix ssh_sh.sh
|
||||||
pct exec $CTID -- bash ssh_sh.sh
|
pct exec $CTID -- bash ssh_sh.sh
|
||||||
else
|
else
|
||||||
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/ssh_bash.sh -o ssh_bash.sh
|
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/ssh_bash.sh -o ssh_bash.sh
|
||||||
pct exec $CTID -- chmod 777 ssh_bash.sh
|
pct exec $CTID -- chmod 777 ssh_bash.sh
|
||||||
pct exec $CTID -- dos2unix ssh_bash.sh
|
pct exec $CTID -- dos2unix ssh_bash.sh
|
||||||
pct exec $CTID -- bash ssh_bash.sh
|
pct exec $CTID -- bash ssh_bash.sh
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.21
|
# 2024.03.12
|
||||||
# ./buildct_onlyv6.sh CTID 密码 CPU核数 内存 硬盘 系统 存储盘
|
# ./buildct_onlyv6.sh CTID 密码 CPU核数 内存 硬盘 系统 存储盘
|
||||||
# ./buildct_onlyv6.sh 102 1234567 1 512 5 debian11 local
|
# ./buildct_onlyv6.sh 102 1234567 1 512 5 debian11 local
|
||||||
|
|
||||||
|
@ -434,12 +434,12 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if echo "$system" | grep -qiE "alpine|archlinux|gentoo|openwrt" >/dev/null 2>&1; then
|
if echo "$system" | grep -qiE "alpine|archlinux|gentoo|openwrt" >/dev/null 2>&1; then
|
||||||
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/ssh_sh.sh -o ssh_sh.sh
|
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/ssh_sh.sh -o ssh_sh.sh
|
||||||
pct exec $CTID -- chmod 777 ssh_sh.sh
|
pct exec $CTID -- chmod 777 ssh_sh.sh
|
||||||
pct exec $CTID -- dos2unix ssh_sh.sh
|
pct exec $CTID -- dos2unix ssh_sh.sh
|
||||||
pct exec $CTID -- bash ssh_sh.sh
|
pct exec $CTID -- bash ssh_sh.sh
|
||||||
else
|
else
|
||||||
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/ssh_bash.sh -o ssh_bash.sh
|
pct exec $CTID -- curl -L ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/ssh_bash.sh -o ssh_bash.sh
|
||||||
pct exec $CTID -- chmod 777 ssh_bash.sh
|
pct exec $CTID -- chmod 777 ssh_bash.sh
|
||||||
pct exec $CTID -- dos2unix ssh_bash.sh
|
pct exec $CTID -- dos2unix ssh_bash.sh
|
||||||
pct exec $CTID -- bash ssh_bash.sh
|
pct exec $CTID -- bash ssh_bash.sh
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.09
|
# 2024.03.12
|
||||||
|
|
||||||
# ./buildvm.sh VMID 用户名 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6
|
# ./buildvm.sh VMID 用户名 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6
|
||||||
# ./buildvm.sh 102 test1 1234567 1 512 5 40001 40002 40003 50000 50025 debian11 local N
|
# ./buildvm.sh 102 test1 1234567 1 512 5 40001 40002 40003 50000 50025 debian11 local N
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.09
|
# 2024.03.12
|
||||||
# 自动选择要绑定的IPV4地址
|
# 自动选择要绑定的IPV4地址
|
||||||
# ./buildvm_extraip.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘 是否附加IPV6(默认为N)
|
# ./buildvm_extraip.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘 是否附加IPV6(默认为N)
|
||||||
# ./buildvm_extraip.sh 152 test1 1234567 1 512 5 debian11 local N
|
# ./buildvm_extraip.sh 152 test1 1234567 1 512 5 debian11 local N
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.09
|
# 2024.03.12
|
||||||
# 手动指定要绑定的IPV4地址
|
# 手动指定要绑定的IPV4地址
|
||||||
|
|
||||||
# ./buildvm_manual_ip.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘 IPV4地址 是否附加IPV6(默认为N)
|
# ./buildvm_manual_ip.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘 IPV4地址 是否附加IPV6(默认为N)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.09
|
# 2024.03.12
|
||||||
# 自动选择要绑定的IPV6地址
|
# 自动选择要绑定的IPV6地址
|
||||||
# ./buildvm_onlyv6.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘
|
# ./buildvm_onlyv6.sh VMID 用户名 密码 CPU核数 内存 硬盘 系统 存储盘
|
||||||
# ./buildvm_onlyv6.sh 152 test1 1234567 1 512 5 debian11 local
|
# ./buildvm_onlyv6.sh 152 test1 1234567 1 512 5 debian11 local
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.20
|
# 2024.03.12
|
||||||
|
|
||||||
# 用颜色输出信息
|
# 用颜色输出信息
|
||||||
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
|
# 2024.03.12
|
||||||
|
|
||||||
divert_install_script() {
|
divert_install_script() {
|
||||||
local package_name=$1
|
local package_name=$1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.12.31
|
# 2024.03.12
|
||||||
|
|
||||||
# cd /root
|
# cd /root
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ pre_check() {
|
||||||
apt-get install dos2unix -y
|
apt-get install dos2unix -y
|
||||||
fi
|
fi
|
||||||
if [ ! -f "buildct.sh" ]; then
|
if [ ! -f "buildct.sh" ]; then
|
||||||
curl -L ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh
|
curl -L ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh
|
||||||
dos2unix buildct.sh
|
dos2unix buildct.sh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.12.31
|
# 2024.03.12
|
||||||
|
|
||||||
# cd /root
|
# cd /root
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ pre_check() {
|
||||||
apt-get install dos2unix -y
|
apt-get install dos2unix -y
|
||||||
fi
|
fi
|
||||||
if [ ! -f "buildvm.sh" ]; then
|
if [ ! -f "buildvm.sh" ]; then
|
||||||
curl -L ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
curl -L ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
|
||||||
dos2unix buildvm.sh
|
dos2unix buildvm.sh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.20
|
# 2024.03.12
|
||||||
|
|
||||||
########## 预设部分输出和部分中间变量
|
########## 预设部分输出和部分中间变量
|
||||||
|
|
||||||
|
@ -516,8 +516,8 @@ check_cdn_file() {
|
||||||
|
|
||||||
prebuild_ifupdown2() {
|
prebuild_ifupdown2() {
|
||||||
if [ ! -f "/usr/local/bin/ifupdown2_installed.txt" ]; then
|
if [ ! -f "/usr/local/bin/ifupdown2_installed.txt" ]; then
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/install_ifupdown2.sh -O /usr/local/bin/install_ifupdown2.sh
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/install_ifupdown2.sh -O /usr/local/bin/install_ifupdown2.sh
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/ifupdown2-install.service -O /etc/systemd/system/ifupdown2-install.service
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/ifupdown2-install.service -O /etc/systemd/system/ifupdown2-install.service
|
||||||
chmod 777 /usr/local/bin/install_ifupdown2.sh
|
chmod 777 /usr/local/bin/install_ifupdown2.sh
|
||||||
chmod 777 /etc/systemd/system/ifupdown2-install.service
|
chmod 777 /etc/systemd/system/ifupdown2-install.service
|
||||||
if [ -f "/usr/local/bin/install_ifupdown2.sh" ]; then
|
if [ -f "/usr/local/bin/install_ifupdown2.sh" ]; then
|
||||||
|
@ -741,8 +741,8 @@ fi
|
||||||
systemctl restart networking
|
systemctl restart networking
|
||||||
if [ $? -ne 0 ] && [ -e "/etc/systemd/system/networking.service" ]; then
|
if [ $? -ne 0 ] && [ -e "/etc/systemd/system/networking.service" ]; then
|
||||||
if [ ! -f "/usr/local/bin/clear_interface_route_cache.sh" ]; then
|
if [ ! -f "/usr/local/bin/clear_interface_route_cache.sh" ]; then
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/clear_interface_route_cache.sh -O /usr/local/bin/clear_interface_route_cache.sh
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/clear_interface_route_cache.sh -O /usr/local/bin/clear_interface_route_cache.sh
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/clear_interface_route_cache.service -O /etc/systemd/system/clear_interface_route_cache.service
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/clear_interface_route_cache.service -O /etc/systemd/system/clear_interface_route_cache.service
|
||||||
chmod +x /usr/local/bin/clear_interface_route_cache.sh
|
chmod +x /usr/local/bin/clear_interface_route_cache.sh
|
||||||
chmod +x /etc/systemd/system/clear_interface_route_cache.service
|
chmod +x /etc/systemd/system/clear_interface_route_cache.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
@ -768,8 +768,8 @@ if [ "$system_arch" = "arch" ]; then
|
||||||
systemctl stop NetworkManager
|
systemctl stop NetworkManager
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/usr/local/bin/check-dns.sh" ]; then
|
if [ ! -f "/usr/local/bin/check-dns.sh" ]; then
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/check-dns.sh -O /usr/local/bin/check-dns.sh
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/check-dns.sh -O /usr/local/bin/check-dns.sh
|
||||||
wget ${cdn_success_url}https://raw.githubusercontent.com/spiritLHLS/pve/main/extra_scripts/check-dns.service -O /etc/systemd/system/check-dns.service
|
wget ${cdn_success_url}https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/check-dns.service -O /etc/systemd/system/check-dns.service
|
||||||
chmod +x /usr/local/bin/check-dns.sh
|
chmod +x /usr/local/bin/check-dns.sh
|
||||||
chmod +x /etc/systemd/system/check-dns.service
|
chmod +x /etc/systemd/system/check-dns.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2023.12.31
|
# 2024.03.12
|
||||||
# ./pve_delete.sh arg1 arg2
|
# ./pve_delete.sh arg1 arg2
|
||||||
# arg 可填入虚拟机/容器的序号,可以有任意多个
|
# arg 可填入虚拟机/容器的序号,可以有任意多个
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.08
|
# 2024.03.12
|
||||||
|
|
||||||
if [ -f "/etc/resolv.conf" ]; then
|
if [ -f "/etc/resolv.conf" ]; then
|
||||||
cp /etc/resolv.conf /etc/resolv.conf.bak
|
cp /etc/resolv.conf /etc/resolv.conf.bak
|
||||||
|
@ -143,7 +143,7 @@ checkupdate
|
||||||
install_required_modules
|
install_required_modules
|
||||||
if [ -f "/etc/motd" ]; then
|
if [ -f "/etc/motd" ]; then
|
||||||
echo '' >/etc/motd
|
echo '' >/etc/motd
|
||||||
echo 'Related repo https://github.com/spiritLHLS/pve' >>/etc/motd
|
echo 'Related repo https://github.com/oneclickvirt/pve' >>/etc/motd
|
||||||
echo '--by https://t.me/spiritlhl' >>/etc/motd
|
echo '--by https://t.me/spiritlhl' >>/etc/motd
|
||||||
fi
|
fi
|
||||||
service iptables stop 2>/dev/null
|
service iptables stop 2>/dev/null
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# from
|
# from
|
||||||
# https://github.com/spiritLHLS/pve
|
# https://github.com/oneclickvirt/pve
|
||||||
# 2024.02.08
|
# 2024.03.12
|
||||||
|
|
||||||
if [ -f "/etc/resolv.conf" ]; then
|
if [ -f "/etc/resolv.conf" ]; then
|
||||||
cp /etc/resolv.conf /etc/resolv.conf.bak
|
cp /etc/resolv.conf /etc/resolv.conf.bak
|
||||||
|
|
Loading…
Reference in a new issue