PHP Classes

File: docs/book/installation.md

Recommend this page to a friend!
  Classes of Artur Graniszewski   ZEUS for PHP   docs/book/installation.md   Download  
File: docs/book/installation.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: ZEUS for PHP
Manage the execution of multiple parallel tasks
Author: By
Last change: Removed ReactPHP from ZEUS code
Date: 7 years ago
Size: 2,130 bytes
 

Contents

Class file image Download

Requirements

OS requirements

  • Linux/Unix/BSD platform
  • _Windows platform currently not supported_

PHP requirements

  • PHP 5.6+ (HHVM or PHP 7+ is recommended for performance reasons as ZEUS can be up to 4x faster and use less memory)
  • Posix module installed and enabled
  • Pcntl module installed and enabled
  • socket functions enabled for IPC purposes

Library requirements

  • Zend Framework 3+ application (with the following modules installed: `zend-mvc`, `zend-mvc-console`, `zend-console`, `zend-log`, `zend-config`)
  • Opis library (`opis/closure`)

Installation

ZEUS for PHP is available on GitHub and can be installed in two different ways:

Downloading

via Composer:

user@host:/var/www/$ cd zf3-application-directory
user@host:/var/www/zf3-application-directory$ composer require zeus-server/zf3-server

by downloading source code

Latest stable source codes can be found in the following ZIP archive .

After downloading, contents of the compressed ZEUS-for-PHP-master directory in ZIP file must be unpacked into a ZF3 zf3-application-directory/module/Zeus directory.

Enabling ZEUS module

After installation, ZEUS for PHP must be activated in Zend Framework's config/modules.config.php file, like so:

<?php 
// contents of "zf3-application-directory/config/modules.config.php" file:

return [
    'Zend\\Log',
    'Zend\\Mvc\\Console',
    '...',
    'Zeus' // this line should be added
];

This can be achieved either by modifying configuration file in any text editor, or by issuing sed command in Application's root directory:

user@host:/var/www/zf3-application-directory$ sed -i "s/'Zend\\\Log',/'Zend\\\Log','Zeus',/g" config/modules.config.php

If ZEUS for PHP is installed correctly, the following terminal command will show ZEUS version and its services in console:

user@host:/var/www/zf3-application-directory$ php public/index.php zeus status