Install ECIS on Linux server (Ubuntu/Debian)
In this document the process is explained to install ECIS on Linux server. To run ECIS the following services will be installed. This document is based on Debian but can also be used on Ubuntu
Service | Role |
---|
PHP 8.4 (fpm and cli) | ECIS is written in PHP 8.4. FPM is used to render the application and CLI for cronjobs |
Nginx | Nginx will handle the incoming requests and forward to PHP. In this setup Nginx acts mainly as proxy server |
GIT | Git is used as code management system and for updates on ECIS |
Redis | ECIS users caching to speed up the application |
Solr | Search engine using ECIS search configuration |
MySQL | Database server |
Pre requirements
For this install a (virtual) server running Debian is required
Disk: minimal 64 GB
CPU: 4 Cores
Memory: 8192 MiB
Software installation
Install GIT, PHP, NGINX and Redis
sudo apt-get update && apt-get upgrade
sudo sudo apt-get install \
ca-certificates \
curl \
gnupg2 \
wget \
lsb-release
For PHP, we use the sources of Oerdnj Sury
On Ubuntu
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt update
On Debian
curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x
sudo apt update
Install packages
apt-get install git nginx-full redis-server php8.4-fpm php8.4-cli php8.4-common php8.4-intl php-redis php8.4-gd php-igbinary php8.4-mysql php8.4-mbstring php8.4-zip php8.4-xml php8.4-curl php8.4-opcache php8.4-readline php8.4-soap php8.4-bcmath php8.4-redis php8.4-gmp
Login and log out to reload the permissions
Install MySQL, using the installation package of MySQL. Debian will install MariaDB as default database server when no extra sources are added. The latest version can be found on the APT pages of MySQL
wget https://dev.mysql.com/get/mysql-apt-config_0.8.43-1_all.deb
sudo apt install ./mysql-apt-config_0.8.43-1_all.deb
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_secure_installation
Create a dedicated user for ECIS
CREATE
USER 'ECIS_admin'@'172.%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON `ecis_production`.* TO
'ECIS_admin'@'172.%';
FLUSH
PRIVILEGES;
Install SOLR (version number might be higher, can be checked on the Solr Download page)
sudo apt-get install default-jdk default-jre
wget https://www.apache.org/dyn/closer.lua/solr/solr/9.8.1/solr-9.8.1.tgz?action=download
mv solr-9.8.1.tgz?action=download solr-9.8.1.tgz
sudo tar xzf solr-9.8.1.tgz solr-9.8.1/bin/install_solr_service.sh --strip-components=2
sudo ./install_solr_service.sh solr-9.8.1.tgz
Clone ECIS SOLR docker repository and reload SOLR (as solr user)
sudo su && su solr
ssh-keygen #Upload the key to Github to prevent API rate limits
git clone https://github.com/iteaoffice/solr /var/solr/data
exit
sudo service solr restart
Create database and import the basic database into the mysql-server
mysql -u root -p
Download a copy of an empty database
create
database ECIS_production;
use
database source ./emtpy_ECIS_database.sql
NGINX Configuration
ECIS requires a few changes to NGINX, which are described here
Create a vhost with the following settings, or replace /etc/nginx/default
with the following file
server {
listen 80 default_server;
server_name _;
client_max_body_size 30M;
root /var/www/ecis/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 300;
include fastcgi_params;
fastcgi_param ECIS_ENVIRONMENT production;
fastcgi_param ECIS_HOST host;
}
}
Use nginx -t
to test the configuration and restart nginx using service nginx restart
when the config is OK
PHP Configuration
Edit /etc/php/fpm/8.4/fpm/php.ini
and change the following settings
; How many GET/POST/COOKIE input variables may be accepted
max_input_vars = 10000
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 1024M
upload_max_filesize = 64M
post_max_size = 64M
Restart PHP with service php8.4-fpm restart
Clone ECIS repository
Upload the generated public key to GitHub and clone the ECIS repository in /var/www/ECIS
Create a new file called production.local.php
and save in /var/www/ECIS/config/<organisation>
folder and the following content
<?php
declare(strict_types=1);
use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
return [
'doctrine' => [
'connection' => [
'orm_default' => [
'driverClass' => Driver::class,
'params' => [
'host' => '172.17.0.1',
'port' => '3306',
'user' => 'ecis_admin',
'password' => 'PASSWORD',
'dbname' => 'ecis_production',
'driverOptions' => [
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
],
],
],
],
],
'solr' => [
'host' => '172.17.0.1',
],
'cache' => [
'adapter' => [
'name' => 'redis',
'options' => [
'server' => [
'host' => 'localhost',
'port' => 6379,
],
'database' => 1,
'namespace' => 'ECIS',
],
],
],
'jield_authorize' => [
'cache_enabled' => false,
],
'application_options' => [
'serverUrl' => 'https://hostname.ECIS.net',
],
'zfctwig' => [
'environment_options' => [
'cache' => false,
'debug' => true,
],
],
'lmc_cors' => [
'allowed_origins' => [
'https://hostname.ECIS.net',
],
'allowed_methods' => ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH'],
'allowed_headers' => ['Authorization', 'Content-Type', 'Accept'],
],
];
Run Composer to install all dependencies
php composer.phar install --no-dev --prefer-dist
Last modified: 11 April 2025