INSTALLATION

Location

  • Because you are logged in now with the non-root user dotkernel, your current server path must be /home/dotkernel

Please be sure you are using the non-root user for the below installation

git clone

git clone -b default-queue https://github.com/dotkernel/queue.git

The installation path should be now /home/dotkernel/queue

Prepare config/autoload files

  • duplicate local.php.dist as local.php, then fill in the database credentials and set the $baseUrl
  • duplicate log.local.dist as log.local
  • duplicate messenger.local.php.dist as messenger.local.php
  • duplicate swoole.local.php.dist as swoole.local.php

Run Composer

composer install --no-dev

Create services (daemon)

  • Edit the files from /daemon folder and set proper paths
  • copy them in /etc/systemd/system/
sudo cp /home/dotkernel/queue/daemon/swoole.service /etc/systemd/system/swoole.service
sudo cp /home/dotkernel/queue/daemon/messenger.service  /etc/systemd/system/messenger.service

Start the Swoole daemon

sudo systemctl daemon-reload
sudo systemctl enable swoole.service
sudo systemctl start swoole.service
sudo systemctl status  swoole.service

Start the Messenger daemon

sudo systemctl daemon-reload
sudo systemctl enable messenger.service
sudo systemctl start messenger.service
sudo systemctl status  messenger.service

Testing the installation

Send a request from your local machine

echo "Hello" | socat -T1 - TCP:SERVER-IP:8556`