IMHO creation of OCS server is easy with Debian.
For example https://ask.ocsinventory-ng.org/13105/tutorial-ocsserver-2-9-on-debian-10-buster?show=13105#q13105 is running well
My own procedure (for a fresh Debian Bullseye) :
# install MariaDB
apt install mariadb-server
mysql_secure_installation # add password for root
mysql -u root -p XXXXX
CREATE DATABASE ocsweb;
CREATE USER 'ocsuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON ocsweb.* to 'ocsuser'@'localhost';
FLUSH PRIVILEGES;
EXIT ;
# install Apache2 Php Perl + lib
apt install make cmake gcc build-essential # for Perl building
apt install apache2 libapache2-mod-perl2 libapache-dbi-perl libapache-db-perl libapache2-mod-php
apt install php php-zip php-pclzip php-gd php-mysql php-soap php-curl php-json php-xml php-mbstring php-ldap
apt install perl libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libnet-ip-perl \
libsoap-lite-perl libio-compress-perl libapache-dbi-perl libapache2-mod-perl2 libapache2-mod-perl2-dev \
libdbd-mysql-perl libnet-ip-perl libxml-simple-perl libarchive-zip-perl
cpan install CPAN # update cmd 'cpan'
cpan install XML::Entities Apache2::SOAP Net::IP Apache::DBI Mojolicious Switch Plack::Handler Archive::Zip
# install OCS Server
cd sources
wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/ \
download/2.X/OCSNG_UNIX_SERVER_2.X.tar.gz
tar xvzf OCSNG_UNIX_SERVER_2.X.X.tar.gz
cd OCSNG_UNIX_SERVER_2.X.X
vi setup.sh # put info DB_SERVER_xxx and some path
./setup.sh
Do you wish to continue ([y]/n)? Enter
Which host is running database server [localhost] ? Enter
On which port is running database server [3306] ? Enter
Where is Apache daemon binary [/usr/sbin/apache2ctl] ? Enter
Where is Apache main configuration file [/etc/apache2/apache2.conf] ? Enter
Which user group is running Apache web server [www-data] ? Enter
Where is Apache Include configuration directory [/etc/apache2/conf-available] ? Enter
Where is PERL interpreter binary [/usr/bin/perl] ? Entree
Do you wish to setup Communication server on this computer ([y]/n)? Enter
Where to put Communication server log directory [/var/log/ocsinventory-server] ? Enter
Where to put Communication server plugins configuration files [/etc/ocsinventory-server/plugins] ? Enter
Where to put Communication server plugins Perl modules files [/etc/ocsinventory-server/perl] ? Enter
Do you wish to setup Rest API server on this computer ([y]/n)? Enter
Where do you want the API code to be store [/usr/local/share/perl/5.24.1] ? Enter
Do you allow Setup renaming Communication Server Apache configuration file
to ‘z-ocsinventory-server.conf’ ([y]/n) ? Enter
Do you wish to setup Administration Server (Web Administration Console)
on this computer ([y]/n)? Enter
Do you wish to continue ([y]/n)? Enter
Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports] ? Enter
Where to create writable/cache directories for deployment packages,
administration console logs, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ? Enter
# Apache conf
cd /etc/apache2/conf-available
vi ocsinventory-reports.conf # check config
vi z-ocsinventory-server.conf # check config : put correct value OCS_DB_XXXX
a2enconf ocsinventory-reports
a2enconf z-ocsinventory-server
apache2ctl -t # is syntax correct ?
apache2ctl -S # virtualhost ?
systemctl restart apache2
# launch reports to initialize DB
http://server/ocsreports/
# if OK
rm ocsreports/install.php # better mv xxx xxx.old
# have a look on apache log
tail -f /var/log/apache2/access.log
# have a look on ocs activity
tail -f /var/log/ocsinventory-server/activity.log
(I tested : from a fresh VM Debian Bullseye, I dit it in 20' with copy/paste + 5' for adding/setting agent ... but I'm experienced ;) it need more and more time and knowledge for add certificate, use https, use different path, ...)