mirror of
https://github.com/oneclickvirt/oneclickvirt.github.io.git
synced 2026-05-23 10:21:29 +08:00
52 lines
1.7 KiB
Markdown
52 lines
1.7 KiB
Markdown
---
|
||
outline: deep
|
||
---
|
||
|
||
|
||
# 前言
|
||
|
||
支持开设 Docker 虚拟化的各系统,含 Linux、Android、Windows 系统
|
||
|
||
## 环境预设
|
||
|
||
- 检测系统环境,安装对应组件
|
||
- 安装docker和docker-compose,这里有判断为国际服务器还是国内服务器,自动安装对应源的docker
|
||
- 下载默认需要的一些配置脚本
|
||
- 检测如果存在IPV6地址,检测其是否大于或等于/64,如果符合条件,则配置docker的ipv6的网络
|
||
- 如果上述条件都符合,创建ndpresponder的docker和radvd,使得IPV6的分配支持ndp广播和自动分配
|
||
- 支持x86_64和ARM架构的服务器
|
||
|
||
国际
|
||
|
||
```shell
|
||
curl -L https://raw.githubusercontent.com/spiritLHLS/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh
|
||
```
|
||
|
||
国内
|
||
|
||
```shell
|
||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh
|
||
```
|
||
|
||
## 开设虚拟内存
|
||
|
||
:::tip
|
||
内存开点swap免得机器炸了
|
||
:::
|
||
|
||
单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用
|
||
|
||
建议只开实际内存大小两倍大小的虚拟内存
|
||
|
||
国际
|
||
|
||
```shell
|
||
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
|
||
```
|
||
|
||
国内
|
||
|
||
```shell
|
||
curl -L https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
|
||
```
|