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-devel2. 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.conf4. Operations notes
| Item | Meaning |
|---|---|
pstree -aup | Inspect the process tree |
killall paozhu | Stop the process |
touch log/restart_server | Trigger the restart flag |
deamon_enable | Daemon switch (source spelling) |