This commit is contained in:
spiritlhl
2023-08-16 10:23:40 +00:00
parent c45f4ff7df
commit 54222e3efa
6 changed files with 78 additions and 78 deletions

View File

@@ -2,7 +2,7 @@
outline: deep
---
# Dispel doubts
# Solve the puzzle
## Common Docker Commands

View File

@@ -2,44 +2,44 @@
outline: deep
---
# 前言
# Preface
以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了
The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!
## 要求
## Requirements
硬件要求:
- 系统:Debian 8+, Ubuntu 18+(推荐20.04)
- 虚拟化:推荐KVMVMWARE虚拟化
- 内存内存至少512MB
- 硬盘:硬盘(系统盘)至少10G
- 网络独立的IPV4地址IPV6可有可无带宽能下载脚本就行网络能连接Githubraw页面就行
Hardware requirements.
- System: Debian 8+, Ubuntu 18+ (20.04 recommended).
- Virtualization: KVM, VMWARE recommended.
- Memory: At least 512MB of RAM
- Hard disk: hard disk (system disk) at least 10G
- Network: Independent IPV4 address, IPV6 is optional, bandwidth can download scripts on the line, the network can connect to the Github raw page on the line
PS: 如果硬件非常好资源很多可使用PVE批量开KVM虚拟化的虚拟机 [跳转](https://github.com/spiritLHLS/pve)
PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs [Jump](https://github.com/spiritLHLS/pve)
PS: 如果硬件资源更烂虚拟化不支持可使用docker版本的适配面更广 [跳转](https://github.com/spiritLHLS/docker)
PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider [Jump](https://github.com/spiritLHLS/docker)
## 项目特点
## Project Features
- 本套脚本开发使用的**Ubuntu20**Ubuntu别的长期维护版本应该也没问题Debian无法使用zfs时自动切换别的存储类型
- This set of script development using **Ubuntu20**, Ubuntu other long-term maintenance version should also be no problem, Debian can not use zfs automatically switch to another storage type!
- 已设置同时进行TCP和UDP转发除了SSH端口其他的映射内网外网端口一致
- Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.
- 已设置支持开出的LXC容器进行docker嵌套虚拟默认普通版本和纯探针版本使用debian11系统
- Support for docker nested virtualization of open LXC containers has been set up, and the default normal version and pure probe version use the debian11 system.
- 已屏蔽容器内可能用于滥用的工具包和IPV4网络的TCP/UDP协议的端口( 3389 8888 54321 65432 ),以防止容器被用于扫描和爆破,且可外置进程检查有问题自动停机
- Have blocked the container may be used to abuse the toolkit and IPV4 network TCP/UDP protocol ports ( 3389 8888 54321 65432 ), to prevent the container is used for scanning and blasting, and can be external process checking for problems automatically shut down
- 已支持一键为LXC容器配置IPV6地址(前提是母鸡有IPV6子网无IPV6地址则不配置),自动适配子网大小
- Has supported one-click configuration of IPV6 addresses for LXC containers (provided that the mother hen has an IPV6 subnet, no IPV6 address is not configured), automatically adapted to the size of the subnet
- 保证你要开的盘为默认的系统盘(sda或者sda1)而不是挂载的盘(sdb之类的),不确定的使用```fdisk -l``````df```查看
- Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use ``fdisk -l`` and ``df`` to check.
- 挂载其他盘的详看 [其他说明](https://github.com/spiritLHLS/lxd/blob/main/README_other.md)
- See [Other notes](https://github.com/spiritLHLS/lxd/blob/main/README_other.md) for details on mounting other disks.
- 一键脚本支持自定义限制所有内容,普通版本支持多次运行批量生成不覆盖先前生成的配置
- One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration
## 检测环境
## Detecting the environment
**使用后续脚本的务必执行本命令检测母鸡是否符合要求**
** Use the subsequent script must execute this command to detect the hen whether it meets the requirements **
Command:

View File

@@ -2,49 +2,49 @@
outline: deep
---
# 解惑
## Solve the puzzle
## 如果LXD安装后lxc命令显示找不到怎么办
## What if the lxc command says it can't be found after LXD is installed?
```
``
! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
export PATH=$PATH:/snap/bin
```
执行这个命令后尝试
After executing this command try
```
lxc -h
```
看看lxc命令是否已修复
to see if the lxc command is fixed.
## 开设centos7发现报错CGroupV1不支持怎么办
## What to do if you open centos7 and find that CGroupV1 is not supported?
启用CGroup V1要在Ubuntu系统上启用CGroup V1需要编辑内核启动参数。
Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.
请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。
Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.
编辑```/etc/default/grub```文件,将```GRUB_CMDLINE_LINUX_DEFAULT```中的参数末尾加上```cgroup_enable=memory```。
Edit the ```/etc/default/grub`` file and add ``cgroup_enable=memory`` to the end of the parameters in ``GRUB_CMDLINE_LINUX_DEFAULT``.
```
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash cgroup_enable=memory"
```
保存文件并运行以下命令更新GRUB引导。
Save the file and run the following command to update the GRUB boot.
```bash
sudo update-grub
```
重启系统,使更改生效
Reboot the system for the changes to take effect
如果上述更改仍旧不支持开设centos7那么请使用别的宿主机系统尝试
If the above changes still do not support the opening of centos7, try using a different host system.
## 目前已验证可开带独立IPV6地址容器的VPS商家
## Currently verified VPS vendors that can open containers with separate IPV6 addresses.
[kuroit](https://my.kuroit.com/aff.php?aff=5) 中的 美国凤凰城 regular
Phoenix, USA regular in [kuroit](https://my.kuroit.com/aff.php?aff=5)
[datalix](https://t.me/vps_reviews/338) 中的 德国AMD 促销款
[datalix](https://t.me/vps_reviews/338) in German AMD Promotions
[luxvps](https://billing.luxvps.xyz/aff.php?aff=36) 中的 德国AMD 促销款
German AMD Promotions in [luxvps](https://billing.luxvps.xyz/aff.php?aff=36)

View File

@@ -2,15 +2,15 @@
outline: deep
---
# 一些自定义脚本
# Some custom scripts
每个脚本可能有对应的系统要求,自行查看
Each script may have its own system requirements, check them out!
## 在非Debian系统上安装 Proxmox VE 7
## Installing Proxmox VE 7 on a non-Debian system
本机硬件配置的最低要求同先前正常安装的要求一致
Minimum local hardware requirements are the same as for the previous normal installation.
需要先安装docker
You need to install docker first.
```
curl -sSL https://get.docker.com/ | sh
@@ -19,17 +19,17 @@ chmod +x /usr/local/bin/docker-compose
docker-compose --version
```
然后使用```uname -m```查询架构,使用对应架构的命令
Then use ```uname -m``` to query the architecture and use the command corresponding to the architecture
开设出的PVE面板信息为
The opened PVE panel information is:
登录用户名和密码都是```root```,登录后务必使用webSSH更改密码以免被爆破
Login username and password are both ``root``, after logging in be sure to use web SSH to change the password to avoid being blown up.
用宿主机SSH时务必登录对应```https://IPV4地址:8006```在web面板上使用SSH不要使用宿主机的22端口操控PVE
When using host SSH, be sure to log into the corresponding ``https://IPV4:8006`` to use SSH on the web panel, do not use the host's port 22 to manipulate the PVE.
因为web面板上的SSH是在Docker内的所以不支持后续的一键配置请自行配置网关等进行使用
Because the SSH on the web panel is inside Docker, it does not support subsequent one-click configurations, so please configure your own gateway, etc. to use it.
X86架构
X86 architecture
```bash
docker run -idt --network host \
@@ -40,7 +40,7 @@ docker run -idt --network host \
spiritlhl/pve:7_x86_64
```
ARM架构
ARM architecture
```bash
docker run -idt --network host \
@@ -51,4 +51,4 @@ docker run -idt --network host \
spiritlhl/pve:7_aarch64
```
开设出的面板实际是开设在容器内的但网络已使用host模式PVE的端口约等于就使用的宿主机的端口正常使用即可
The web panel is actually opened in the container, but the network has used the host mode, the port of the PVE is about the same as the port of the host used, normal use can be

View File

@@ -2,39 +2,39 @@
outline: deep
---
# 前言
# Preface
以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了
The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!
如果有未适配的商家或机器欢迎联系[@spiritlhl_bot](https://t.me/spiritlhl_bot),有空会尝试支持一下
If there are unadapted merchants or machines welcome to contact [@spiritlhl_bot](https://t.me/spiritlhl_bot), will try to support it sometime!
## 各种要求
## Various requirements
建议debian在使用前尽量使用最新的稳定版本的系统
It is recommended that debian try to use the latest stable version of the system before use.
**不要在动态IP的服务器上使用本套脚本(重启机器后自动切换本机IP的服务器暂不支持重启机器后IP不自动切换的支持)**
** Do not use this set of scripts in the dynamic IP server (reboot the machine automatically switch the local IP server is not supported, reboot the machine after the IP does not automatically switch the support)**
本项目只适配Debian系统(非Debian无法通过APT源安装官方只给了Debian的镜像其他系统只能使用ISO安装)
This project is only adapted to Debian system (non-Debian can not be installed through the APT source, the official only gave the Debian image, other systems can only use ISO installation)
- 系统要求:Debian 8+
- System requirements: Debian 8+
:::tip
建议debian11而不是debian12因为后者是beta版本debian11安装的才是稳定版
It is recommended to install debian11 instead of debian12, because the latter is a beta version, and the debian11 installation is the stable version.
:::
- 硬件要求2核2G内存```x86_64``````arm```架构服务器硬盘至少20G
- 可开KVM的硬件要求VM-X或AMD-V支持 (部分VPS和全部独服支持)
- 如果硬件或系统需求不满足可使用LXD批量开LXC容器[跳转](https://github.com/spiritLHLS/lxd)
- Hardware requirements: 2 cores 2G RAM ``x86_64`` or ``arm`` architecture server hard disk at least 20G
- Hardware requirements for KVM: VM-X or AMD-V support (some VPS and all Dedicated servers support).
- If hardware or system requirements are not met, you can use LXD to batch open LXC containers [Jump](https://github.com/spiritLHLS/lxd)
:::warning
内存开点swap免得机器炸了
:::
I'm not sure if I'm going to be able to do this, but I'm going to be able to do it in a few minutes.
:::.
开设虚拟内存(SWAP)
Setting up virtual memory (SWAP)
单位换算:输入 1024 产生 1G SWAP-虚拟内存虚拟内存占用硬盘空间当实际内存不够用时将自动使用虚拟内存做内存使用但随之带来IO高占用以及CPU性能占用
Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory takes up hard disk space, when the actual memory is not enough to use the virtual memory will automatically use the virtual memory for memory use, but then bring the IO high occupancy and CPU performance occupancy!
建议只开实际内存大小两倍大小的虚拟内存
It is recommended to use only twice the size of the actual memory as virtual memory.
Command:
@@ -42,14 +42,14 @@ Command:
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
```
## 检测环境
## Detecting the environment
- 本项目相关脚本执行前务必执行本脚本检测环境如果不符合安装PVE的要求则无法使用后续的脚本
- 检测本机IPV6的网络配置情况(有无IPV6都可安装只是查询一下罢了)
- 检测硬件配置是否满足最低要求
- 检测硬件环境是否可嵌套虚拟化KVM类型的服务器
- 检测系统环境是否可嵌套虚拟化KVM类型的服务器
- 不可嵌套虚拟化KVM类型的服务器也可以开LXC虚拟化的服务器但不推荐安装PVE不如使用[LXD](https://github.com/spiritLHLS/lxd)
- Before the execution of scripts related to this project, be sure to execute this script to detect the environment, if it does not meet the requirements of the installation of PVE will not be able to use the subsequent scripts.
- Detecting the IPV6 network configuration of the machine (IPV6 can be installed with or without IPV6, it is just a query).
- Detect whether the hardware configuration meets the minimum requirements
- Detect whether the hardware environment can be nested virtualization KVM type of server
- Detect whether the system environment can nest virtualized KVM-type servers.
- Can not be nested virtualization KVM type of server can also open LXC virtualization server, but do not recommend installing PVE, rather use [LXD](https://github.com/spiritLHLS/lxd)
Command:
@@ -57,7 +57,7 @@ Command:
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/spiritLHLS/pve/main/scripts/check_kernal.sh)
```
如果你需要更新IPV6信息再查询那么执行以下命令后再查询
If you need to update the IPV6 information before querying, then execute the following command before querying
```bash
rm -rf /usr/local/bin/pve_ipv6*

View File

@@ -2,7 +2,7 @@
outline: deep
---
# 解惑
# Solve the puzzle
## 安装PVE成功但重启后失联