Below instructions are working only on AlmaLinux 9
For other OS's need to be adapted accordingly
A server with AlmaLinux 9 freshly installed, with root access and updated
dnf update
useradd dotkernel
passwd dotkernel
usermod -aG wheel dotkernel
sudo dnf install -y dnf-utils
sudo dnf install zip unzip socat wget
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
sudo dnf module enable php:remi-8.4
sudo dnf install -y php php-cli php-common php-intl
sudo systemctl start php-fpm
sudo systemctl enable php-fpm
sudo dnf install php-pecl-swoole6
php -i | grep swoole
sudo dnf install valkey
sudo systemctl enable valkey
sudo systemctl start valkey
sudo valkey-cli ping
sudo dnf install php-pecl-redis
php -i | grep redis
sudo dnf install git
wget https://getcomposer.org/installer -O composer-installer.php
sudo chmod 777 /usr/local/bin
php composer-installer.php --filename=composer --install-dir=/usr/local/bin
In order to add a minimum level of security, a firewall needs to be installed and allows
connections from outside only to certain ports, from certain IP.
Firewall setup is not mandatory
sudo dnf install firewalld
sudo systemctl enable firewalld
Before starting the firewall, be sure you will not be locked outside
sudo firewall-offline-cmd --zone=public --add-port=22/tcp --permanent
sudo systemctl start firewalld
By default, Swoole runs on port 8556. You can change that in the configuration file.
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="YOUR_IP_ADDRESS" port port="8556" protocol="tcp" accept'
sudo firewall-cmd --reload