projects:mdm

This is an old revision of the document!


Sito di riferimento: https://h-mdm.com/

ubuntu@h-mdm:~$ sudo apt update
ubuntu@h-mdm:~$ sudo apt install openjdk-8-jdk aapt tomcat8 postgresql
ubuntu@h-mdm:~$ sudo apt install unzip
 
ubuntu@h-mdm:~$ wget https://h-mdm.com/files/hmdm-3.30-install-ubuntu.zip
ubuntu@h-mdm:~$ unzip hmdm-3.30-install-ubuntu.zip 

Preparazione database

# su - postgres
$ psql
postgres=# CREATE USER hmdm WITH PASSWORD 'password';
postgres=# CREATE DATABASE hmdm WITH OWNER=hmdm;
postgres=# \q
check database
# Bisogna specificare -h localhost, altrimenti effettua 
# una peer authentication, che fallisce perché non esiste
# hmdm negli utenti di sistema
psql -U hmdm  -W -h localhost 

Installazione

ubuntu@h-mdm:~/hmdm-install$ sudo ./hmdm_install.sh
Please choose the installation language (en/ru) [en]: en

PostgreSQL database setup
=========================
Make sure you've installed PostgreSQL and created the database:
# CREATE USER hmdm WITH PASSWORD 'topsecret';
# CREATE DATABASE hmdm WITH OWNER=hmdm;

PostgreSQL host [localhost]: localhost
PostgreSQL port [5432]: 5432
PostgreSQL database [hmdm]: hmdm
PostgreSQL user [hmdm]: hmdm
PostgreSQL password: password

File storage setup
==================
Please choose where the files uploaded to Headwind MDM will be stored
If the directory doesn't exist, it will be created
##### FOR TOMCAT 9, USE SANDBOXED DIR: /var/lib/tomcat9/work #####

Headwind MDM directory [/opt/hmdm]: /opt/hmdm

Web application setup
=====================
Headwind MDM requires access from Internet
Please assign a public domain name to this server

Protocol (http|https) [http]: http
Domain name or public IP (e.g. example.com): mdm.csgalileo.org
Port (leave empty for default ports 80 or 443): 8080
Project path on server or ROOT [/hmdm]: /hmdm
Tomcat virtual host [localhost]: localhost

Ready to install!
Location on server: /opt/hmdm
URL: http://mdm.csgalileo.org:8080/hmdm
Is this information correct [Y/n]? Y

Tomcat config file created: /var/lib/tomcat8/conf/Catalina/localhost//hmdm.xml
Deploying hmdm-3.30.1-os.war to Tomcat: /var/lib/tomcat8/webapps//hmdm.war
............................
Deployment successful, initializing the database...

======================================
Headwind MDM has been installed!
To continue, open in your web browser:
http://mdm.csgalileo.org:8080/hmdm
Login: admin:admin

Entrato ho cambiato la password di admin in Euro…

Il pushing dei messaggi (se si seleziona MQTT) ha bisogno della porta 31000 (TCP) aperta. Inoltre, dietro NAT, modificare /etc/hosts

IP_PRIVATO mdm.csgalileo.org

Per verifica, controllare i log dopo il riavvio di tomcat: se non compare qualcosa come

2020-12-03 09:27:02 [ERROR] com.hmdm.notification.guice.module.NotificationMqttTaskModule : Failed to create MQTT broker service
java.io.IOException: Failed to bind to server socket: mqtt://94.230.76.87:31000 due to: java.net.BindException: Cannot assign requested address (Bind failed)

l'MQTT è impostato correttamente. Ad ogni modo la configurazione di questo bind è in /var/lib/tomcat8/conf/Catalina/localhost/hmdm.xml

<!-- MQTT notification service parameters -->
    <Parameter name="mqtt.server.uri" value="mdm.csgalileo.org:31000"/>

In https://h-mdm.com/quick-start/ c'e' un breve video molto esaustivo, ma in sintesi per effettuare l'enrollement del telefono, partire da un device resettato (android 7 o superiore).

  • Fare tap 7 volte sulla schermata iniziale
  • Configurare il wifi
  • Fare lo scan del QR-COde (il telefono si scarica i pacchetti necessari autonomamente e presenta la schermata dello scanner)
  • L'applicazione si installa
  • Assegnare i permessi che chiede
  • Inserire l'ID del device (che nella pagina del barcode presentata dal server è in basso in una textbox)

Quando ho finito ho cliccato su home (O) e mi ha chiesto se volevo confermare mdm come launcher.

La registrazione è a buon fine se il pallino è verde sotto status nella dashboard.

Premere sulla terza icona a dx (un simbolo di download) per sincronizzare il telefono.

  • projects/mdm.1607067482.txt.gz
  • Last modified: 2020/12/04 08:38
  • by igor