, 5 min read
Installing Simplified Saaze on Oracle Cloud
This blog runs on Simplified Saaze. Simplified Saaze is a static site generator written in PHP. I use Simplified Saaze to generate all ca. static 700 HTML files.
I recently configured a minimal Oracle cloud instance, see First Impressions on Oracle Cloud. This blog post shows how to install Simplified Saaze on that instance running on Oracle Linux 9.
I had already written about some installations of Simplified Saaze:
- Simplified Saaze
- Installing Simplified Saaze on Windows 10
- Installing Simplified Saaze on Windows 10 #2
- Installing Simplified Saaze on Android
1. Installing packages
Install php-cli
.
dnf --disablerepo=ol9_oci_included install php-cli
Packages php-common
and php-opcache
are automatically installed as dependency as well.
The much large package php
contains an httpd-server, which we do not want.
We already have chosen NGINX.
So, we did not install package php
, but just php-cli
which is way smaller.
We need to compile two PHP PECL extensions:
Therefore we need some development libraries.
dnf --disablerepo=ol9_oci_included install php-devel
This in turn installs dependencies.
autoconf noarch 2.69-39.el9 ol9_appstream 741 k
automake noarch 1.16.2-8.el9 ol9_appstream 794 k
cmake-filesystem x86_64 3.26.5-2.el9 ol9_appstream 11 k
gcc-c++ x86_64 11.5.0-5.0.1.el9_5 ol9_appstream 13 M
keyutils-libs-devel x86_64 1.6.3-1.el9 ol9_appstream 88 k
krb5-devel x86_64 1.21.1-8.0.1.el9_6 ol9_appstream 187 k
libcom_err-devel x86_64 1.46.5-7.el9 ol9_appstream 24 k
libkadm5 x86_64 1.21.1-8.0.1.el9_6 ol9_baseos_latest 75 k
libselinux-devel x86_64 3.6-3.el9 ol9_appstream 338 k
libsepol-devel x86_64 3.6-2.el9 ol9_appstream 87 k
libstdc++-devel x86_64 11.5.0-5.0.1.el9_5 ol9_appstream 3.1 M
libtool x86_64 2.4.6-46.el9 ol9_appstream 606 k
libverto-devel x86_64 0.3.2-3.el9 ol9_appstream 15 k
libxml2-devel x86_64 2.9.13-11.el9_6 ol9_appstream 1.1 M
m4 x86_64 1.4.19-1.el9 ol9_appstream 333 k
openssl-devel x86_64 1:3.2.2-6.0.1.el9_5.1 ol9_appstream 4.0 M
pcre2-devel x86_64 10.40-6.0.1.el9 ol9_appstream 669 k
pcre2-utf16 x86_64 10.40-6.0.1.el9 ol9_appstream 213 k
pcre2-utf32 x86_64 10.40-6.0.1.el9 ol9_appstream 202 k
perl-File-Compare noarch 1.100.600-481.1.el9_6 ol9_appstream 12 k
perl-Thread-Queue noarch 3.14-460.el9 ol9_appstream 28 k
perl-threads x86_64 1:2.25-460.el9 ol9_appstream 65 k
perl-threads-shared x86_64 1.61-460.el9 ol9_appstream 50 k
The PHP Yaml extension needs the yaml C header.
dnf --disablerepo=ol9_oci_included --enablerepo=ol9_codeready_builder install libyaml-devel
This strange looking --disablerepo=ol9_oci_included
was explained in First Impressions on Oracle Cloud.
The --enablerepo
adds the repo such that dnf
finds libyaml-devel
.
See Installing LibYAML.
2. Compiling extensions
1. MD4C extension. Copy the tar-file:
scp -i ~/.ssh/ssh-key-2025-08-02-dl8dbo-opc.key -p md4c-1.1.tgz opc@oracle-cloud-instance:/tmp/
Unpack, go to to the directory, then run
phpize
./configure
make
2. Yaml extension. Copy the tar-file:
scp -i ~/.ssh/ssh-key-2025-08-02-dl8dbo-opc.key -p yaml-2.2.5.tgz opc@oracle-cloud-instance:/tmp/
Unpack, then run
phpize
./configure
make
make test
Both modules are then copied to /usr/lib64/php/modules
:
cd /usr/lib64/php/modules/
cp -p ~opc/D/md4c-1.1/modules/md4c.so .
cp -p ~opc/D/yaml-2.2.5/modules/yaml.so .
chown root:root md4c.so yaml.so
Finally, php.ini
needs adjustment.
Add the following new file to /etc/php.d/90-md4c-yaml.ini
:
extension=md4c
extension=yaml
Check results with:
php -m
Result should be:
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
md4c
openssl
pcntl
pcre
Phar
readline
Reflection
session
sockets
SPL
standard
tokenizer
yaml
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
3. Installing composer
There is a lot of Tohu wa-bohu around the installation of PHP composer. I followed the instructions in the PKGBUILD from the Arch Linux package composer.
Here is a simple installation recipe.
- Download
composer.phar
from composer Releases. - Rename:
mv composer.phar /usr/local/bin/composer
chown root:root /usr/local/bin/composer
- Make it executable:
chmod 775 /usr/local/bin/composer
Checking that it actually works, let's fetch Saaze example.
cd
composer create-project eklausme/saaze-example
Output is:
$ time composer create-project eklausme/saaze-example
Creating a "eklausme/saaze-example" project at "./saaze-example"
Installing eklausme/saaze-example (v1.4)
- Downloading eklausme/saaze-example (v1.4)
- Installing eklausme/saaze-example (v1.4): Extracting archive
Created project in /home/opc/saaze-example
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking eklausme/saaze (v2.5)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Downloading eklausme/saaze (v2.5)
- Installing eklausme/saaze (v2.5): Extracting archive
Generating optimized autoload files
No security vulnerability advisories found.
real 0m2.132s
user 0m0.467s
sys 0m0.210s
4. Using Simplified Saaze
Now the static HTML files can be generated.
$ time php saaze
Building static site in /home/opc/saaze-example/build...
execute(): filePath=/home/opc/saaze-example/content/auxil.yml, nSIentries=0, totalPages=0, entries_per_page=20
execute(): filePath=/home/opc/saaze-example/content/music.yml, nSIentries=11, totalPages=1, entries_per_page=20
execute(): filePath=/home/opc/saaze-example/content/blog.yml, nSIentries=35, totalPages=2, entries_per_page=20
Finished creating 3 collections, 3 with index, and 47 entries (0.06 secs / 756kB)
#collections=3, parseEntry=0.0020/47-3, md2html=0.0009, toHtml=0.0002/47, renderEntry=0.0054/47, renderCollection=0.0007/6, content=47/0
real 0m0.092s
user 0m0.019s
sys 0m0.035s
Looking at the result in the build
directory.
$ ls -alF build/
total 8
drwxr-xr-x. 4 opc opc 49 Aug 4 13:47 ./
drwxr-xr-x. 7 opc opc 184 Aug 4 13:47 ../
drwxr-xr-x. 38 opc opc 4096 Aug 4 13:47 blog/
-rw-r--r--. 1 opc opc 965 Aug 4 13:47 index.html
drwxr-xr-x. 4 opc opc 48 Aug 4 13:47 music/
To actually deploy the web-site the following simple shell script will do.
Beforehand, create mkdir /srv/http/oldblogs
.
#!/bin/bash
# Deploy Saaze-Example
cd /home/opc/php/saaze-example
time RBASE="/saaze-example" php saaze -b /tmp/build
cd /tmp/build
rm index.html
ln -s blog/index.html
cp -p /home/opc/php/saaze-example/public/blogklm.css .
cd /srv/http/
rm -rf oldblogs/saaze-example/
mv saaze-example/ oldblogs/
mv /tmp/build/ saaze-example
To enable NGINX to read all subdirectories in /srv/http
you must instruct SELinux:
chcon -R -t public_content_rw_t /srv/http