init
This commit is contained in:
74
docs/dev_guide/installation/linux.md
Normal file
74
docs/dev_guide/installation/linux.md
Normal file
@ -0,0 +1,74 @@
|
||||
# Linux
|
||||
本节介绍如何在Linux上安装ew。
|
||||
|
||||
:::tip 注意
|
||||
本节并未提及如何配置游戏资源服务器,如需配置资源服务器请参考[XX](https://example.com)。
|
||||
:::
|
||||
|
||||
## 方式一:使用二进制程序
|
||||
|
||||
### 下载二进制程序
|
||||
从[XX](https://example.com)下载适用于Linux的二进制文件。
|
||||
|
||||
### 运行ew
|
||||
在当前目录下使用命令行,以下是一个典型的运行示例:
|
||||
```
|
||||
./ew --port 8080 --path ./data/ --max_time 1736076211
|
||||
```
|
||||
::: tip 注意
|
||||
具体的命令行参数可以在[环境变量和命令行参数](../variable-argument.md)或者使用
|
||||
```
|
||||
./ew --help
|
||||
```
|
||||
查看。
|
||||
:::
|
||||
|
||||
## 方式二:从源代码编译
|
||||
|
||||
### 下载源代码
|
||||
从[XX](https://example.com)下载或git克隆源代码。
|
||||
|
||||
### 编译源代码
|
||||
#### 构建说明
|
||||
1. 安装以下依赖
|
||||
- [Perl](https://www.perl.org/)
|
||||
- [Rust](https://www.rust-lang.org/)
|
||||
- [Node.js](https://nodejs.org/)
|
||||
- libssl-dev
|
||||
|
||||
:::tip 注意
|
||||
在Ubuntu发行版中安装 **Perl** 和 **libssl-dev** 可以使用以下命令安装:
|
||||
```
|
||||
apt install -y perl libssl-dev
|
||||
```
|
||||
其他的Linux发行版请参照其包管理说明或者自行编译安装。
|
||||
:::
|
||||
1. 构建WebUI
|
||||
```
|
||||
cd webui
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
1. 构建ew服务器
|
||||
- Debug模式
|
||||
```
|
||||
cargo build
|
||||
```
|
||||
- Release模式
|
||||
```
|
||||
cargo build --release
|
||||
```
|
||||
构建完成的二进制文件`ew`在源代码根目录下的`target/debug`或`target/release`中。可以将其移动到你想存储的位置。
|
||||
### 运行ew
|
||||
在当前目录下使用命令行,以下是一个典型的运行示例:
|
||||
```
|
||||
./ew --port 8080 --path ./data/ --max_time 1736076211
|
||||
```
|
||||
::: tip 注意
|
||||
具体的命令行参数可以在[环境变量和命令行参数](../variable-argument.md)或者使用
|
||||
```
|
||||
./ew --help
|
||||
```
|
||||
查看。
|
||||
:::
|
Reference in New Issue
Block a user