Installation guide
RHEL / Oracle Linux + Nginx
Step-by-step deployment on RHEL 8/9, Oracle Linux, Rocky or AlmaLinux,
with Nginx and PHP-FPM 8.2, from the application package.
Requirements
| Distribution | RHEL / Oracle Linux 8.x or 9.x (Rocky, AlmaLinux compatible) |
| Web server | Nginx + PHP-FPM 8.2 |
| Oracle Instant Client | 19c — lightweight “Basic” package, 64-bit (RPM) |
| The application package | sw_pkg_*.zip archive (see step 4) |
1. Install Nginx, PHP-FPM and the extensions
# Enable PHP 8.2 (RHEL 9 / OL 9)
sudo dnf module reset php
sudo dnf module enable php:8.2
# (RHEL 8: Remi repository, module php:remi-8.2)
sudo dnf install -y nginx php-fpm php-cli php-common \
php-mbstring php-gd php-ldap php-zip php-sodium php-process php-xml
sqlite3 is shipped by php-common. Do not install php-pdo: the application uses the native SQLite3 extension.
2. Install the Oracle Instant Client and the OCI8 extension
sudo dnf install -y oracle-instantclient-basic oracle-instantclient-devel
echo "/usr/lib/oracle/19.25/client64/lib" | \
sudo tee /etc/ld.so.conf.d/oracle-instantclient.conf
sudo ldconfig
sudo dnf install -y php-devel php-pear gcc make
sudo pecl install oci8-3.3.0
# prompt: instantclient,/usr/lib/oracle/19.25/client64/lib
echo "extension=oci8.so" | sudo tee /etc/php.d/30-oci8.ini
3. Configure PHP-FPM (nginx pool)
Edit /etc/php-fpm.d/www.conf to run under the nginx user and expose the Oracle environment:
user = nginx
group = nginx
listen = /run/php-fpm/www.sock
listen.owner = nginx
listen.group = nginx
env[LD_LIBRARY_PATH] = /usr/lib/oracle/19.25/client64/lib
env[ORACLE_HOME] = /usr/lib/oracle/19.25/client64
env[TNS_ADMIN] = /usr/lib/oracle/19.25/client64/network/admin
In /etc/php.ini: date.timezone, default_charset = "UTF-8", upload_max_filesize = 64M, post_max_size = 72M, memory_limit = 256M.
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/conf.d/app.conf:
server {
listen 80;
server_name mon-appli.example.com;
root /opt/app/mon-appli;
index index.php;
# Main router: otherwise -> 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;
}
# PHP execution via PHP-FPM
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Block hidden files (.htaccess, .git...)
location ~ /\. { deny all; }
client_max_body_size 72M;
}
The
lib/, securite/ and log/ folders are outside root (mon-appli/): Nginx never serves them.
6. Permissions and SELinux
sudo chown -R nginx:nginx /opt/app/securite /opt/app/log
sudo chmod 700 /opt/app/securite
sudo semanage fcontext -a -t httpd_sys_content_t "/opt/app/mon-appli(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/opt/app/securite(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/opt/app/log(/.*)?"
sudo restorecon -Rv /opt/app
# Allow outbound network access (LDAP, Oracle, OAuth)
sudo setsebool -P httpd_can_network_connect 1
sudo setsebool -P httpd_can_network_connect_db 1
7. Start, open the firewall and check
sudo nginx -t
sudo systemctl enable --now php-fpm nginx
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload
php -m | grep -E 'oci8|sqlite3|mbstring|ldap|sodium'
curl -I http://localhost/ # expected: 302 to the login page
You are ready. The SQLite database and the encryption key are created on first access. Log in, change the default account, then configure your Oracle databases and authentication.
