Paozhu logoPaozhu Docs
Documentation
INSTALL

Linux installation

Dependencies, database setup, build and run steps for Ubuntu/Debian and Rocky/AlmaLinux.

1. Install dependencies

terminalbash
# Ubuntu / Debian
sudo apt-get update
sudo apt-get install cmake git
sudo apt-get install -y brotli libbrotli-dev zlib1g-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install mysql-server

# Rocky / AlmaLinux
sudo dnf -y upgrade
sudo dnf install gcc g++ cmake libasan
sudo dnf install brotli brotli-devel openssl openssl-devel

2. Initialize the database

mysqlsql
CREATE DATABASE cppcms DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
USE cppcms;
SOURCE /path/to/paozhu/conf/cppcms.sql;

3. Build and run

terminalbash
cd paozhu
[ -f asio/asio.hpp ] || unzip asio.zip
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
cd ..
sudo ./bin/paozhu conf/server.conf

4. Operations notes

ItemMeaning
pstree -aupInspect the process tree
killall paozhuStop the process
touch log/restart_serverTrigger the restart flag
deamon_enableDaemon switch (source spelling)