Phira-MP Linux Help Documentation
For Users Who Want to Use a One-Click Deployment
- Go to the Phira Download Site (or other sources) to obtain the precompiled executable files.
- Use
wget [link]to download the executable file to the server. If the downloaded file is a compressed archive (.zip), you need to extract it first and usecd [path]to navigate to the location of the executable. - Use
./[filename]or./[filename] --port [port]to run it directly.
If You Want to Compile the Official Rust Version Yourself
If Rust is not installed, please install it first. You can follow the instructions at https://www.rust-lang.org/tools/install.
For Ubuntu or Debian users, if
curlis not installed, use the following command to install it:shellsudo apt install curlFor Fedora or CentOS users, use the following command:
shellsudo yum install curlAfter installing curl, use the following command to install Rust:
shellcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shNext, clone the repository to the server: Install the git tool:
Linux Distribution Installation Command Debian / Ubuntu sudo apt update && sudo apt install gitRHEL / CentOS 7 and below sudo yum install gitRHEL / CentOS 8+ / Fedora sudo dnf install gitArch Linux sudo pacman -S gitopenSUSE sudo zypper install gitAfter installation, clone the repository to a local folder:
shellgit clone https://github.com/TeamFlos/phira-mp.gitThen, build the project:
shellcd phira-mp cargo build --release -p phira-mp-server
Running the Server
You can run the application using the following command:
shellRUST_LOG=info target/release/phira-mp-serverYou can also specify a port via parameters:
shellRUST_LOG=info target/release/phira-mp-server --port 8080
For Docker
- Create a Dockerfile:
FROM ubuntu:22.04
RUN apt-get update && apt-get -y upgrade && apt-get install -y curl git build-essential pkg-config openssl libssl-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /root/
RUN git clone https://github.com/TeamFlos/phira-mp
WORKDIR /root/phira-mp
RUN cargo build --release -p phira-mp-server
ENTRYPOINT ["/root/phira-mp/target/release/phira-mp-server", "--port", "<preferred-port>"]- Build the image:
docker build --tag phira-mp . - Run the container:
docker run -it --name phira-mp -p <preferred-port>:<preferred-port> --restart=unless-stopped phira-mp
Troubleshooting
If you encounter issues related to OpenSSL, ensure that libssl-dev (for Ubuntu or Debian) or openssl-devel (for Fedora or CentOS) is installed. If the issue persists, you can set the OPENSSL_DIR environment variable for the compilation process.
If you are compiling on Linux for Linux and receive a message about missing pkg-config, you may need to install it:
# For Ubuntu or Debian
sudo apt install pkg-config libssl-dev
# For Fedora or CentOS
sudo dnf install pkg-config openssl-develFor other issues, refer to the specific error messages and adjust your environment accordingly.
Monitoring
You can check the running processes and the ports they are listening on:
ps -aux | grep phira-mp-server
netstat -tuln | grep 12346