WARNING: It's a draft. It doesn't cover security, permissions and other stuff.
Tested on Alpine Linux v3.20 / Observium CE 24.4
Derived from https://docs.observium.org/install_debian/
apk add php82-cli php82-mysqli php82-pecl-mcrypt php82-ctype php82-gd php82-bcmath php82-mbstring php82-opcache php82-apcu php82-curl php82-fpm php82-pear php82-snmp php82-session php82-apache2
apk add net-snmp net-snmp-tools fping rrdtool subversion whois mtr ipmitool graphviz imagemagick
apk add apache2
apk add mariadb mariadb-client py3-pymysql
https://docs.observium.org/install_debian/#create-the-mysql-database-and-user
rc-update add mariadb
/etc/init.d/mariadb setup
rc-service mariadb start
mariadb
#> CREATE DATABASE observium DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
#> CREATE USER 'observium'@'localhost' identified by '<db password>';
#> GRANT ALL ON observium.* TO 'observium'@'localhost';
Edit /etc/my.cnf.d/mariadb-server.cnf
: set bind-address=127.0.0.1
and comment out skip-networking
rc-update add snmpd
sed -i 's/#rocommunity public/rocommunity public/g;' /etc/snmp/snmpd.conf
# replace agentAddress udp:127.0.0.1:161 with udp:161,udp6:[::1]:161 for ipv6 support
rc-service snmpd start
mkdir -p /opt/observium && cd /opt
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
cd observium
cp config.php.default config.php
# edit config.php and change db user/pass
./discovery.php -u
mkdir logs rrd
./adduser.php admin password 10
ln -s /usr/sbin/fping /usr/bin/fping
./add_device.php localhost public v2c
./discovery.php -h all
./poller.php -h all
https://docs.observium.org/install_debian/#apache-configuration
rc-update add apache2
cat <<EOF > /etc/apache2/conf.d/observium.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /opt/observium/html
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /opt/observium/html/>
DirectoryIndex index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
EOF
rc-service apache2 start
33 */6 * * * /opt/observium/observium-wrapper discovery >> /dev/null 2>&1
*/5 * * * * /opt/observium/observium-wrapper discovery --host new >> /dev/null 2>&1
*/5 * * * * /opt/observium/observium-wrapper poller >> /dev/null 2>&1
13 5 * * * /opt/observium/housekeeping.php -ysel >> /dev/null 2>&1
47 4 * * * /opt/observium/housekeeping.php -yrptb >> /dev/null 2>&1
I was hoping for nginx instead of apache2, but Observium heavily relies on htaccess, which is pain in the ass to convert into nginx configuration so for now it is what it is.