Open Source Mobile Device Management?


(fpausp) #42

Any news abt MDM on Nethserver 7.6 ?


(Rob Bosch) #43

With php-scl it should be possible to use php7 with glpi. It would be great to have a full blown MDM feature, especially in a BYOD environment.


(HF) #44

I believe the real issue is:


(Markus Neuberger) #45

Oh, I forgot about that. I am going to give it another try the next days…


(Stéphane de Labrusse) #46

It is probably possible to use the specific port or the different tcp socket of mariadb scl :-?


(Markus Neuberger) #47

OMG, I tried to connect to localhost:3312 and that’s not possible, I didn’t read the wiki page carefully enough.
With giving the glpi mariadb user access to server.domain.local the connection worked.
I also updated the used PHP from 5.6 to 7.1.

wget https://github.com/glpi-project/glpi/releases/download/9.4.0/glpi-9.4.0.tgz
tar -xzf glpi-9.4.0.tgz
mv glpi /usr/share/
# Set owner to apache
chown -R apache:apache /usr/share/glpi
# Create httpd conf for glpi
cat << EOF > /etc/httpd/conf.d/glpi.conf
Alias /glpi /usr/share/glpi
<Directory /usr/share/glpi>
  Require all granted
  <FilesMatch \.php$>
     SetHandler "proxy:fcgi://127.0.0.1:9001"
  </FilesMatch>
</Directory>
<Directory /usr/share/glpi/files>
  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
  Allow from ::1
  Allow from localhost
</Directory>
EOF
# Install Nethserver rh-php71 and extensions and mariadb 10.2 from stephdl repo
yum install http://mirror.de-labrusse.fr/NethServer/7/x86_64/nethserver-stephdl-1.0.7-1.ns7.sdl.noarch.rpm
yum -y install nethserver-rh-php71-php-fpm rh-php71-php-mysqlnd rh-php71-php-mbstring rh-php71-php-gd rh-php71-php-ldap rh-php71-php-imap rh-php71-php-opcache rh-php71-php-xmlrpc nethserver-rh-mariadb102

Please change server.domain.tld to fit your servername and SECRET to have a more secure password.

# Create database and user
mysql102
create database glpi;
grant all privileges on glpi.* to glpi@server.domain.tld identified by 'SECRET';
exit;
# Restart services
systemctl restart httpd
systemctl restart rh-php71-php-fpm

Browse to https://NETHSERVER/glpi and go through the install. Enter server.domain.tld:3312 in the DB host field and the DB user credentials.


Bareos - Backup Archiving REcovery?
(fpausp) #48

Thank you Markus, GLPI is installed… Can someone help me please, with the next steps for MDM ?

edit:
Do we need Fusion Inventory also, or just Flyve MDM for GLPI ?


(Markus Neuberger) #49

Yes, Fusion Inventory is needed:

https://flyvemdm-doc.readthedocs.io/en/latest/installation/fusioninventory.html


(fpausp) #50

OK I am here now in the config wizzard:

Which user should I use? I guess apache?


(Markus Neuberger) #51

Yes, like here but the php path should be changed to use 7.1.
/opt/rh/rh-php71/root/usr/bin/php


(fpausp) #52

OK, thank you. I am here now:

I guess I have to install mosquitto via yum first. Is the rest of the commands OK?


(Markus Neuberger) #53

For the mysql commands you have to use mysql102 -e "..." as glpi doesn’t use the default mysql server.

Same for the path to create the flyvemdm.cnf file, for mariadb102 it’s /etc/opt/rh/rh-mariadb102/my.cnf.d/


(HF) #54

Or better yet, the RH way: scl enable php71 ‘command to execute’


(fpausp) #55


(Markus Neuberger) #56

You don’t need the -h option.
I think you have to replace gpli-database-name with glpi.


(fpausp) #57
[root@mdmsrv01 ~]# mysql102 mdmsrv01.mydomain.lan -u mosquitto -p -e "select * from \`glpi\`.\`glpi_plugin_flyvemdm_mqttusers\`;"
Enter password:
ERROR 1045 (28000): Access denied for user 'mosquitto'@'localhost' (using password: YES)

What abt the port 3312 ?


(Markus Neuberger) #58

I assume you have everything on one Nethserver or do you run mosquito and glpi on different servers?
The command mysql102 uses the right mariadb102 so you don’t have to care about the port. Did you enter the correct password for mosquito you set before?

Please try:

mysql102 -u mosquitto -p -e "select * from \`glpi\`.\`glpi_plugin_flyvemdm_mqttusers\`;

Another try:

Recreate the mariadb user with mosquitto@localhost instead of mosquitto@mqtt.server.ip.


(fpausp) #59
mysql102 -e "CREATE USER 'mosquitto'@'localhost' IDENTIFIED BY 'MyPassWord';"

mysql102 -e "GRANT SELECT ON glpi.glpi_plugin_flyvemdm_mqttusers TO 'mosquitto'@'localhost';"

mysql102 -e "GRANT SELECT ON glpi.glpi_plugin_flyvemdm_mqttacls TO 'mosquitto'@'localhost';"

mysql102 -h localhost -u mosquitto -p -e "select * from \`glpi\`.\`glpi_plugin_flyvemdm_mqttusers\`;"

Enter password:
+----+------------------+-----------------------------------------------------------------------------------------------------+---------+
| id | user             | password                                                                                            | enabled |
+----+------------------+-----------------------------------------------------------------------------------------------------+---------+
|  1 | flyvemdm-backend | PasswordPasswordPasswordPasswordPasswordPasswordPasswordPasswordPasswordPasswordPasswordPasswordPas |       1 |
+----+------------------+-----------------------------------------------------------------------------------------------------+---------+

:+1:


(fpausp) #60

???


(Markus Neuberger) #61

I’d replace apt-get with yum and give it a try.