
Phira多人联机服务器搭建/使用教程
直接下载服务端文件并运行 https://github.com/afoim/phira-mp-autobuild 这里有一些由Github Action自动构建的服务端文件,涵盖以下系统和架构 也可以前往Multiplayer Server | Dmocken的Phira下载站自行寻找 寻找适用于你的系统的文件,下载下来并执行即可。默认服务端将会在你的主机12346端口上开放,如果需要自定义端口,请使用--port参数指定端口。然后即可使用Phira来填写IP/域名:端口来连接 *如果要显示Log,请使用 RUST_LOG=debug ./xxx 去运行,默认日志等级是 WARN 如果这些文件不适用于你正在使用的系统请前往自行构建(高级)继续阅读 自行构建(高级) 由于phira-mp使用Rust编写,若想要自行构建需要在你的操作系统上安装Rust环境 对于Windows 前往Rust 下载页,下载 Rust 打开后会弹出一个 CMD 窗口,输入 1(Quick Install)回车,等待 Visual Studio 安装(如果此步 Visual Studio 下载很慢也可以手动下载) 在 Visual Studio 中,勾选使用 C++ 的桌面开发,然后安装 然后请跳过 Linux 教程直接阅读构建 phira-mp 对于Linux 执行:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 选择 1 回车 执行:source $HOME/.cargo/env 使用Rust构建phira-mp 克隆仓库:git clone https://github.com/TeamFlos/phira-mp.git(不支持IPv6)或git clone https://github.com/afoim/phira-mp-autobuild.git(支持IPv6) cd phira-mp或cd phira-mp-autobuild 更新依赖:cargo update 构建:cargo build --release -p phira-mp-server ...