HowTo install GLPI 9.4.4 on NethServer 7.7

Do not know this glpi package;
You may try to exchange all rh-php71 references with rh-php73

And make a small adjustment to the apache config so it points to the port (9003) nethserver-rh-php73-php-fpm configures for fpm : (old apache conf snippet for nethserver-rh-php71-php-fpm)

  <FilesMatch \.php$>
     SetHandler "proxy:fcgi://127.0.0.1:9001"
  </FilesMatch>

becomes port 9003 for nethserver-rh-php73-php-fpm:

  <FilesMatch \.php$>
     SetHandler "proxy:fcgi://127.0.0.1:9003"
  </FilesMatch>

(my 1 cent)

1 Like

Does it? Because when I was just trying to figure it out (for self-service-password), it looked like that system wanted port 9000 insteadā€“but I donā€™t see it in the docs one way or the other.

The (stock) centos pacakage(s) put all php-fpmā€™s on port 9000 (meaning you can run just one at the time.) AFAIK (and pretty sureā€¦ but you never knowā€¦) nethserver-rh-php73-php-fpm configures port 9003 for rh-php73-php-fpm.

2 Likes

interesting

so it will be like this

yum -y install nethserver-rh-php73-php-fpm rh-php73-php-mysqlnd rh-php73-php-mbstring rh-php73-php-gd rh-php73-php-ldap
rh-php73-php-imap rh-php73-php-opcache rh-php73-php-xmlrpc

Summary

nethserver-rh-mariadb102

excluding mariadb part, is that correct?

1 Like

Yes it is the epel version, sadly it is not updated, the rpm mus be builtd or installed manually

for an update you may exclude it (as said do not know GLPI, if they changed the database it wonā€™t update);

For a fresh install you may try to follow this how to with he changes as suggested and see how it plays out. :cold_sweat:

1 Like

@stephdl Are you in a position to build an updated module with the latest version 9.5.5?

Reading this https://glpi-install.readthedocs.io/en/latest/prerequisites.html

You have a migration database to do from the old version to the new one (>mariadb10), I am not sure to get the time to follow each version.

You could install it manually like any web application

1 Like

The install for version 9.5 is fairly easy what Iā€™ve done

Step 1.

In nethserver cockpit in webserver create a virtual host select php 7.3

Step 2.
Install Mariadb103 as per StĆ©phaneā€™s how to
and install some additional prerequisites with

yum install -y php-xmlrpc php-onelogin-php-saml.noarch

Then create the user and database with

mysql103 -u root

CREATE USER 'glpi'@'127.0.0.1:3313' IDENTIFIED BY 'password';

GRANT USAGE ON *.* TO 'glpi'@'127.0.0.1:3313' IDENTIFIED BY 'password' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

CREATE DATABASE IF NOT EXISTS glpi;GRANT ALL PRIVILEGES ON glpi.* TO 'glpi'@'127.0.0.1:3313';

FLUSH PRIVILEGES;

quit

Step 3.

Download GLPI

cd /var/lib/nethserver/vhost/virtualhostrootdirectory

wget https://github.com/glpi-project/glpi/releases/download/9.5.5/glpi-9.5.5.tgz

tar -xvzf glpi-9.5.5.tgz

or if you want it to be accessable by just the virtualhost name add --strip 1 to the end of the command

tar -xvzf glpi-9.5.5.tgz --strip 1

cd ./glpi

find ./* -type d -exec chmod 755 {} + && find ./* -type f -exec chmod 644 {} +

chown apache:apache -R ./*

systemctl restart httpd

Step 4.

Open a webbrowser and go to https://virtualhost/glpi

a. Select your language
b. Agree to the terms
c. Choose Install
d. for the time being ignore the dependencies and continue
e. enter your database details as follows
SQL Server (MariaDB or MySQL)=127.0.0.1:3313
SQL User=glpi
SQL Password=the password you set
and ā€˜keep on goingā€™
f. Select glpi database and continue and wait for Step 3 to display OK - database was initialized and click ā€˜keep on goingā€™
g. Decide if you want to Send ā€œusage statisticsā€ and click ā€˜continueā€™
h. click ā€˜continueā€™ in step 5 and ā€˜use GLPIā€™ in step 6

*** note you might get an error like Invalid cookie data Empty login or password just click login again and the passwords to login (which must be changed from default) are as follows ***

  • glpi / glpi (super-admin)
  • tech / tech
  • postonly / postonly (only for helpdesk)
  • normal / normal

Dont forget to run rm ./install/install.php to remove install directory
also see here for the official docs from glpi and here for the flyvemdm docs

To install flyve mdm (to clarify this is to install not configure ill add that later)

Cd to glpi virtual host root document folder

cd /var/lib/nethserver/vhost/virtualhostrootdirectory

Install the following
yum install -y unzip git composer mosquitto
cd ./glpi/plugins
git clone https://github.com/fusioninventory/fusioninventory-for-glpi.git fusioninventory
git clone https://github.com/flyve-mdm/glpi-plugin.git flyvemdm

cd ./flyvemdm

`composer install --no-devā€™

ignore any errors at this point

Open a webbrowser and go to https://virtualhost/glpi/front/plugin.php

1st click the folder icon on the right side of FusionInventory under actions install and enable

Then do the same for flyvemdm

2 Likes

Just doing the config having trouble when it comes to setting up mosquito to bind to the glpi database I added user mosquito and after issues with connecting I have it access to the whole database Iā€™m thinking it might be the flyve.cnf I created itā€™s in the right spot but for the bind address should it be 0.0.0.0:3313 or is the port defined differently

How can i uninstall the module installed as per steph repo

EDIT: yum remove nethserver-glpi did the work.
though not sure is everything is removed

1 Like

@Shane_Treweek can you convert the install instuction above for glpi 9.5.5 version to be a wiki, so that we can also add onto it?

Also, can we add a documentation on adding cron job tasks based on Nethserver way.
to start with @stephdl has a crontab manager here

1 Like

Iā€™ll try to get it done tonight also I apologize I completely forgot to add the install instructions I gave are for 9.5 Iā€™ll also look at the Cron manager you mentioned once Iā€™ve done that and managed to get flyve working Iā€™ll start scripting it for automatic install

2 Likes

You gave to apache all rights to write on all files and folders, it is a hole in the security if the web application is hacked. Only folder where glpi must store external files like pictures,icons,temp files must be writable by apache.

2 Likes

Reading quickly the spec file of remi only the folder files must be writable by apache

https://git.remirepo.net/cgit/rpms/glpi/glpi.git/tree/glpi.spec#n592

1 Like

thanks iā€™ll make those changes

1 Like

how can i add this to crontab /usr/bin/php5 /var/www/glpi/front/cron.php &>/dev/null

am getting error: The validation has been failed: This command line is not allowed : [ ā€œ\ā€ ]

export VISUAL=nano; crontab -e -u apache
*/1 * * * * /usr/bin/php5 /var/www/glpi/front/cron.php &>/dev/null

should do it if it doesnt are you sure that /usr/bin/php5 is the correct location

1 Like

Seems setting up flyverMDM requires quite alot of work to be done to get it up and running.

I think ill just wait for the instructions, cause alot of things i really cant understand.

I am glad this is a staging server.