fix:添加部署的图示和API代理的相关说明
BIN
docs/en/guide/oneclickvirt/images/home.png
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
docs/en/guide/oneclickvirt/images/init.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
docs/en/guide/oneclickvirt/images/init_success.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
docs/en/guide/oneclickvirt/images/proxy.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
@@ -4,19 +4,19 @@ outline: deep
|
||||
|
||||
# OneClickVirt
|
||||
|
||||
Distinguish between the panel side and the controlled side. The controlled side needs to have the corresponding virtualization environment installed in advance. You can use other parts of this documentation for environment installation.
|
||||
Distinguishes between panel side and controlled side. The controlled side needs to have the corresponding virtualization environment installed in advance. You can use other main installations in this documentation for environment installation.
|
||||
|
||||
## Controlled Side
|
||||
|
||||
Refer to other parts of this documentation for environment installation, no further details are provided here.
|
||||
Corresponds to other main installations in this documentation for environment installation, which will not be elaborated here.
|
||||
|
||||
## Panel Side
|
||||
|
||||
The host machine needs to have ```nginx``` or ```caddy``` and ```mysql``` installed, with at least 1G free memory and 1G free disk space.
|
||||
The host machine needs to have ```nginx``` or ```caddy``` or ```OpenResty``` ,and ```8.4.6``` version ```mysql``` installed, requiring at least 1G of free memory and 1G of free disk space.
|
||||
|
||||
After installation, the default startup addresses are:
|
||||
After installation is complete, the default startup addresses are:
|
||||
|
||||
Frontend: ```http://localhost:8080```
|
||||
Frontend: ```http://your IP or domain name```
|
||||
|
||||
Backend API: ```http://localhost:8888```
|
||||
|
||||
@@ -26,90 +26,171 @@ API Documentation: ```http://localhost:8888/swagger/index.html```
|
||||
|
||||
#### Linux
|
||||
|
||||
Download and execute:
|
||||
Download and execute
|
||||
|
||||
International:
|
||||
International
|
||||
|
||||
```shell
|
||||
curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
|
||||
````
|
||||
```
|
||||
|
||||
Domestic:
|
||||
Domestic
|
||||
|
||||
```shell
|
||||
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
|
||||
```
|
||||
|
||||
Interactive installation:
|
||||
Install environment with interaction
|
||||
|
||||
```
|
||||
./install.sh
|
||||
```
|
||||
|
||||
Non-interactive installation:
|
||||
Install environment without interaction
|
||||
|
||||
```
|
||||
noninteractive=true ./install.sh
|
||||
```
|
||||
|
||||
Installation directory: `/opt/oneclickvirt`
|
||||
Installation directory: ```/opt/oneclickvirt```
|
||||
|
||||
Usage:
|
||||
After successful installation, you need to manually start the service:
|
||||
|
||||
Start service: `systemctl start oneclickvirt`
|
||||
```shell
|
||||
systemctl start oneclickvirt
|
||||
```
|
||||
|
||||
Stop service: `systemctl stop oneclickvirt`
|
||||
Other usage methods:
|
||||
|
||||
Enable autostart: `systemctl enable oneclickvirt`
|
||||
Stop service:
|
||||
|
||||
Check status: `systemctl status oneclickvirt`
|
||||
```shell
|
||||
systemctl stop oneclickvirt
|
||||
```
|
||||
|
||||
View logs: `journalctl -u oneclickvirt -f`
|
||||
Enable auto-start at boot:
|
||||
|
||||
```shell
|
||||
systemctl enable oneclickvirt
|
||||
```
|
||||
|
||||
Check status:
|
||||
|
||||
```shell
|
||||
systemctl status oneclickvirt
|
||||
```
|
||||
|
||||
View logs:
|
||||
|
||||
```shell
|
||||
journalctl -u oneclickvirt -f
|
||||
```
|
||||
|
||||
Restart service:
|
||||
|
||||
```shell
|
||||
systemctl restart oneclickvirt
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
See:
|
||||
Check
|
||||
|
||||
[https://github.com/oneclickvirt/oneclickvirt/releases/latest](https://github.com/oneclickvirt/oneclickvirt/releases/latest)
|
||||
https://github.com/oneclickvirt/oneclickvirt/releases/latest
|
||||
|
||||
Download the latest compressed file for the corresponding architecture, extract it, and run it.
|
||||
Download the latest compressed file for the corresponding architecture, extract and execute it.
|
||||
|
||||
In the same directory as the executed binary file, download:
|
||||
In the same directory as the executable binary file, download
|
||||
|
||||
[https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/server/config.yaml](https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/server/config.yaml)
|
||||
https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/server/config.yaml
|
||||
|
||||
This file is the configuration file needed later.
|
||||
file, which is the configuration file needed for subsequent use.
|
||||
|
||||
### Frontend Installation
|
||||
|
||||
#### Linux
|
||||
|
||||
The previous installation script will extract the static files to:
|
||||
The previous installation script will extract static files to
|
||||
|
||||
```shell
|
||||
cd /opt/oneclickvirt/web/
|
||||
```
|
||||
|
||||
In this path.
|
||||
this path
|
||||
|
||||
Use `nginx` or `caddy` to build a static website with this path. Whether you need domain binding is up to you.
|
||||
Use ```nginx``` or ```caddy``` to establish a static website with this path. Whether domain binding is needed is your choice.
|
||||
|
||||
After the static files are deployed, you need to reverse proxy the backend address for frontend use. Taking ```OpenResty``` as an example:
|
||||
|
||||

|
||||
|
||||
You need to reverse proxy the path ```/api``` to the backend ```http://127.0.0.1:8888``` address. If you are using ```1panel```, you just need to fill in these, and the default backend domain uses the default ```$host``` without modification.
|
||||
|
||||
If you are using ```nginx``` or ```caddy```, please refer to the proxy source code below and modify it yourself for proxying
|
||||
|
||||
```shell
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8888;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_http_version 1.1;
|
||||
add_header X-Cache $upstream_cache_status;
|
||||
add_header Cache-Control no-cache;
|
||||
proxy_ssl_server_name off;
|
||||
proxy_ssl_name $proxy_host;
|
||||
}
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
After downloading the `web-dist.zip` file, extract it and use the corresponding program to build a static website.
|
||||
After downloading the ```web-dist.zip``` file, extract it and use the corresponding program to establish a static website, set up the reverse proxy similar to Linux.
|
||||
|
||||
## MYSQL
|
||||
|
||||
After installing MySQL, create an empty database named ```oneclickvirt```. It is recommended to allow access only from local ```127.0.0.1```. Keep the corresponding username and password safe.
|
||||
After installing mysql, create an empty database ```oneclickvirt``` with type ```utf8mb4```, preferably accessible only locally ```127.0.0.1```. Save the corresponding username and password.
|
||||
|
||||
After opening the corresponding page of the front-end, it will automatically jump to the initialization interface, fill in the database information and related user information, test the database link without problems, then you can click the initialization system.
|
||||
After opening the corresponding frontend page, it will automatically redirect to the initialization interface.
|
||||
|
||||
After completing the initialization, it will automatically jump to the home page, you can explore and use it by yourself.
|
||||

|
||||
|
||||
If you are using the default user information for initialization, then the default account is:
|
||||
Fill in the database information and related user information. If the database connection test is successful, you can click to initialize the system.
|
||||
|
||||
Administrator account: admin / Admin123!@#
|
||||

|
||||
|
||||
Ordinary user: testuser / TestUser123!@#
|
||||
After completing initialization, it will automatically redirect to the homepage, where you can explore and use it yourself.
|
||||
|
||||
## Configuration File (Optional)
|
||||

|
||||
|
||||
If you used the default user information for initialization, the default accounts are:
|
||||
|
||||
Administrator username
|
||||
|
||||
```
|
||||
admin
|
||||
```
|
||||
|
||||
Administrator password
|
||||
|
||||
```
|
||||
Admin123!@#
|
||||
```
|
||||
|
||||
Regular user username
|
||||
|
||||
```
|
||||
testuser
|
||||
```
|
||||
|
||||
Regular user password
|
||||
|
||||
```
|
||||
TestUser123!@#
|
||||
```
|
||||
|
||||
## Configuration File (Optional)
|
||||
BIN
docs/guide/oneclickvirt/images/home.png
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
docs/guide/oneclickvirt/images/init.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
docs/guide/oneclickvirt/images/init_success.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
docs/guide/oneclickvirt/images/proxy.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
@@ -12,11 +12,11 @@ outline: deep
|
||||
|
||||
## 面板端
|
||||
|
||||
宿主机需要安装好```nginx```或```caddy```和```mysql```,需要至少1G空闲内存和1G空闲硬盘。
|
||||
宿主机需要安装好```nginx```或```caddy```或```OpenResty```之一,以及```8.4.6```版本的```mysql```,需要至少1G空闲内存和1G空闲硬盘。
|
||||
|
||||
安装完成后,默认启动的地址
|
||||
|
||||
前端:```http://localhost:8080```
|
||||
前端:```http://你的IP或者域名```
|
||||
|
||||
后端 API:```http://localhost:8888```
|
||||
|
||||
@@ -40,13 +40,13 @@ curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/m
|
||||
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
|
||||
```
|
||||
|
||||
有交互地安装
|
||||
有交互地安装环境
|
||||
|
||||
```
|
||||
./install.sh
|
||||
```
|
||||
|
||||
无交互地安装
|
||||
无交互地安装环境
|
||||
|
||||
```
|
||||
noninteractive=true ./install.sh
|
||||
@@ -54,17 +54,45 @@ noninteractive=true ./install.sh
|
||||
|
||||
安装目录: ```/opt/oneclickvirt```
|
||||
|
||||
使用方法:
|
||||
安装成功后,需要手动启动服务:
|
||||
|
||||
启动服务: ```systemctl start oneclickvirt```
|
||||
```shell
|
||||
systemctl start oneclickvirt
|
||||
```
|
||||
|
||||
停止服务: ```systemctl stop oneclickvirt```
|
||||
其他使用方法:
|
||||
|
||||
开机自启: ```systemctl enable oneclickvirt```
|
||||
停止服务:
|
||||
|
||||
查看状态: ```systemctl status oneclickvirt```
|
||||
```shell
|
||||
systemctl stop oneclickvirt
|
||||
```
|
||||
|
||||
查看日志: ```journalctl -u oneclickvirt -f```
|
||||
开机自启:
|
||||
|
||||
```shell
|
||||
systemctl enable oneclickvirt
|
||||
```
|
||||
|
||||
查看状态:
|
||||
|
||||
```shell
|
||||
systemctl status oneclickvirt
|
||||
```
|
||||
|
||||
查看日志:
|
||||
|
||||
```shell
|
||||
journalctl -u oneclickvirt -f
|
||||
```
|
||||
|
||||
重启服务:
|
||||
|
||||
停止服务:
|
||||
|
||||
```shell
|
||||
systemctl restart oneclickvirt
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
@@ -94,22 +122,77 @@ cd /opt/oneclickvirt/web/
|
||||
|
||||
使用```nginx```或```caddy```以这个路径建立静态网站即可,是否需要域名绑定自行选择
|
||||
|
||||
静态文件部署完毕后,需要反代后端地址给前端使用,这里具体以```OpenResty```为例:
|
||||
|
||||

|
||||
|
||||
需要反代路径```/api```到后端的```http://127.0.0.1:8888```地址上,如果你使用的的是```1panel```,那么就只需要填写这些即可,默认的后端域名使用默认的```$host```不需要修改。
|
||||
|
||||
如果你使用的是```nginx```或```caddy```,请参考下方的代理源码自行修改进行代理
|
||||
|
||||
```shell
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8888;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_http_version 1.1;
|
||||
add_header X-Cache $upstream_cache_status;
|
||||
add_header Cache-Control no-cache;
|
||||
proxy_ssl_server_name off;
|
||||
proxy_ssl_name $proxy_host;
|
||||
}
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
下载```web-dist.zip```文件后,解压并使用对应的程序建立静态网站即可.
|
||||
下载```web-dist.zip```文件后,解压并使用对应的程序建立静态网站,类似Linux那样设置好反向代理即可。
|
||||
|
||||
## MYSQL
|
||||
|
||||
安装mysql后,创建一个空的数据库```oneclickvirt```,最好仅本地```127.0.0.1```可访问,对应用户名和密码保存好。
|
||||
安装mysql后,创建一个空的数据库```oneclickvirt```,使用类型```utf8mb4```,最好仅本地```127.0.0.1```可访问,对应用户名和密码保存好。
|
||||
|
||||
打开前端对应的页面后,将自动跳转到初始化界面,填写数据库信息和相关用户信息,测试数据库链接无问题,则可点击初始化系统。
|
||||
打开前端对应的页面后,将自动跳转到初始化界面。
|
||||
|
||||

|
||||
|
||||
填写数据库信息和相关用户信息,测试数据库链接无问题,则可点击初始化系统。
|
||||
|
||||

|
||||
|
||||
完成初始化后会自动跳转到首页,可以自行探索并使用了。
|
||||
|
||||

|
||||
|
||||
如果使用的是默认的用户信息进行初始化,那么默认的账户为:
|
||||
|
||||
管理员账户:admin / Admin123!@#
|
||||
管理员账户名
|
||||
|
||||
普通用户:testuser / TestUser123!@#
|
||||
```
|
||||
admin
|
||||
```
|
||||
|
||||
管理员密码
|
||||
|
||||
```
|
||||
Admin123!@#
|
||||
```
|
||||
|
||||
普通用户账户名
|
||||
|
||||
```
|
||||
testuser
|
||||
```
|
||||
|
||||
普通用户密码
|
||||
|
||||
```
|
||||
TestUser123!@#
|
||||
```
|
||||
|
||||
## 配置文件(可选)
|
||||
|
||||