Installation guide
Ubuntu / Debian + Nginx
Step-by-step deployment on Ubuntu 22.04/24.04 (or Debian) with Nginx and
PHP-FPM 8.2, from the application package.
Requirements
| Distribution | Ubuntu 22.04 / 24.04 LTS (Debian 12 compatible) |
| Web server | Nginx + PHP-FPM 8.2 |
| Oracle Instant Client | 19c — lightweight “Basic” package (.zip) + SDK, 64-bit |
| The application package | sw_pkg_*.zip archive (see step 4) |
1. Install Nginx, PHP-FPM and the extensions
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:ondrej/php # PHP 8.2 if not shipped
sudo apt update
sudo apt install -y nginx php8.2-fpm php8.2-cli \
php8.2-mbstring php8.2-gd php8.2-ldap php8.2-zip \
php8.2-curl php8.2-xml php8.2-intl php8.2-sqlite3
php8.2-sqlite3 provides the native SQLite3 extension; sodium is built into PHP 8.2. No PDO required.
2. Install the Oracle Instant Client and the OCI8 extension
Download the Instant Client Basic and SDK 19c ZIPs (Linux x64) from oracle.com, then:
sudo apt install -y libaio1 unzip
sudo mkdir -p /opt/oracle
sudo unzip instantclient-basic-linux.x64-19.25*.zip -d /opt/oracle
sudo unzip instantclient-sdk-linux.x64-19.25*.zip -d /opt/oracle
# -> /opt/oracle/instantclient_19_25
echo "/opt/oracle/instantclient_19_25" | \
sudo tee /etc/ld.so.conf.d/oracle-instantclient.conf
sudo ldconfig
sudo apt install -y php8.2-dev php-pear build-essential
sudo pecl install oci8-3.3.0
# prompt: instantclient,/opt/oracle/instantclient_19_25
echo "extension=oci8.so" | sudo tee /etc/php/8.2/mods-available/oci8.ini
sudo phpenmod oci8
3. Configure PHP-FPM and the Oracle environment
In /etc/php/8.2/fpm/php.ini: date.timezone, default_charset = "UTF-8", upload_max_filesize = 64M, post_max_size = 72M, memory_limit = 256M.
So that OCI8 finds the Oracle libraries under PHP-FPM, add to /etc/php/8.2/fpm/pool.d/www.conf:
env[LD_LIBRARY_PATH] = /opt/oracle/instantclient_19_25
The pool runs by default as www-data and listens on /run/php/php8.2-fpm.sock.
4. Get and deploy the package
- Download the package from the Download page (CDN or Portable archive).
- Transfer then extract the archive:
scp sw_pkg_*_portable.zip user@server:/tmp/
sudo mkdir -p /opt/app
sudo unzip /tmp/sw_pkg_*_portable.zip -d /opt/app
Web root: /opt/app/mon-appli. Minimal securite/database.sqlite (no secret); master.key and the full schema are created on first access. Default account: admin / admin123 (change it immediately).
5. Configure Nginx (router)
The try_files block replaces the Apache .htaccess. Create /etc/nginx/sites-available/app:
server {
listen 80;
server_name mon-appli.example.com;
root /opt/app/mon-appli;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Oracle module front-controller
location /oracle/ {
try_files $uri $uri/ /oracle/index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
}
location ~ /\. { deny all; }
client_max_body_size 72M;
}
sudo ln -s /etc/nginx/sites-available/app /etc/nginx/sites-enabled/app
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t
lib/, securite/ and log/ folders are outside root: Nginx never serves them.
6. Permissions
# PHP-FPM runs as www-data: write access to the writable folders
sudo chown -R www-data:www-data /opt/app/securite /opt/app/log
sudo chmod 700 /opt/app/securite
7. Start, open the firewall and check
sudo systemctl restart php8.2-fpm nginx
sudo ufw allow 'Nginx HTTP'
php -m | grep -E 'oci8|sqlite3|mbstring|ldap|sodium'
php -r "echo oci_client_version().PHP_EOL;"
curl -I http://localhost/ # expected: 302 to the login page
