This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docpublic:systemes:remotelabsguacamole [2020/06/17 10:10] procacci@tem-tsp.eu [build] |
docpublic:systemes:remotelabsguacamole [2020/06/18 15:25] (current) procacci@tem-tsp.eu [packages repositories] |
||
---|---|---|---|
Line 6: | Line 6: | ||
* https:// | * https:// | ||
+ | |||
+ | ==== environement ==== | ||
+ | |||
+ | installation faite en centos 8 et tomcat 9 (tar.gz dans / | ||
==== packages repositories ==== | ==== packages repositories ==== | ||
Line 18: | Line 22: | ||
< | < | ||
[root@rlab ~]# dnf install --nogpgcheck https:// | [root@rlab ~]# dnf install --nogpgcheck https:// | ||
- | [root@rlabw ~]# yum install dnf-plugins-core | + | [root@rlab ~]# yum install dnf-plugins-core |
- | [root@rlabw ~]# dnf config-manager --enable PowerTools | + | [root@rlab ~]# dnf config-manager --enable PowerTools |
</ | </ | ||
Line 952: | Line 956: | ||
docs examples | docs examples | ||
</ | </ | ||
+ | |||
+ | ==== guacd ==== | ||
+ | |||
+ | demarer (manuellement pour l' | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# / | ||
+ | Starting guacd: guacd[27813]: | ||
+ | SUCCESS | ||
+ | [root@rlab ~]# / | ||
+ | guacd is running with PID=27815. | ||
+ | |||
+ | [root@rlab ~]# ps auwx |grep guacd | ||
+ | root | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== reverse-proxy ==== | ||
+ | |||
+ | le support de proxy-ajp n'est pas compatible avec les websocket guacamole (force un retour a http) et apache 2.4.3 ne support pas la method HTTP PATCH ce qui rend inoperant l' | ||
+ | |||
+ | avant tout s' | ||
+ | |||
+ | < | ||
+ | [root@rlab conf]# vim / | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | === remote IP === | ||
+ | |||
+ | par defaut quand tomcat est derriere un proxy , il voit les requetes clientes venir de l'IP du proxy, in convient pour les logs et potentiels controles d' | ||
+ | |||
+ | < | ||
+ | [root@rlab conf]# vim / | ||
+ | |||
+ | < | ||
+ | Configuring Tomcat to pass through the remote IP address provided by the reverse proxy in the X-Forwarded-For header | ||
+ | requires the configuration of what Tomcat calls a Valve. | ||
+ | In this case, it is the RemoteIpValve and is configured in the conf/ | ||
+ | --> | ||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | === apache proxy === | ||
+ | |||
+ | les directives ProxyPass et ProxyPassReverse fournis par le mod_proxy assure le lien de proxy entre apache et tomcat | ||
+ | |||
+ | < | ||
+ | [root@rlab conf.d]# vim / | ||
+ | |||
+ | # | ||
+ | < | ||
+ | Order allow,deny | ||
+ | Allow from all | ||
+ | ProxyPass http:// | ||
+ | ProxyPassReverse http:// | ||
+ | ProxyPassReverseCookiePath / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | === apache log === | ||
+ | |||
+ | il est inutile de loger toutes les requetes http de courte durée du aux steams dans le http-tunnel (si pas de websockets) | ||
+ | |||
+ | < | ||
+ | [root@rlab conf.d]# vim / | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | SetEnvIf Request_URI " | ||
+ | CustomLog | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== database ==== | ||
+ | |||
+ | afin de permettre a plusieurs utilisateurs de se conencter et enregistrer des preferences il convient de definir une database | ||
+ | |||
+ | === arborescence extension === | ||
+ | |||
+ | la database ou autre modules d' | ||
+ | |||
+ | < | ||
+ | [root@rlab etc]# mkdir -p / | ||
+ | </ | ||
+ | |||
+ | === modules === | ||
+ | |||
+ | recuperation et deploiement des modules pour la database | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# wget https:// | ||
+ | [root@rlab ~]# yum install mysql-connector-java-8.0.20-1.el8.noarch.rpm | ||
+ | [root@rlab ~]# cp / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# wget https:// | ||
+ | [root@rlab ~]# tar xvfz guacamole-auth-jdbc-1.1.0.tar.gz ^C | ||
+ | [root@rlab ~]# cp guacamole-auth-jdbc-1.1.0/ | ||
+ | </ | ||
+ | |||
+ | ==== mariaDB ==== | ||
+ | |||
+ | apres installation de mariadb-server , on va le securiser | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# systemctl start mariadb.service | ||
+ | [root@rlab ~]# mysql_secure_installation | ||
+ | Set root password? [Y/n] Y | ||
+ | New password: | ||
+ | Re-enter new password: Secret Pa U g... S.. ip5 d Da | ||
+ | Password updated successfully! | ||
+ | Reloading privilege tables.. | ||
+ | ... Success! | ||
+ | Remove anonymous users? [Y/n] y | ||
+ | ... Success! | ||
+ | Normally, root should only be allowed to connect from ' | ||
+ | ensures that someone cannot guess at the root password from the network. | ||
+ | Disallow root login remotely? [Y/n] y | ||
+ | ... Success! | ||
+ | Remove test database and access to it? [Y/n] y | ||
+ | - Dropping test database... | ||
+ | ... Success! | ||
+ | - Removing privileges on test database... | ||
+ | ... Success! | ||
+ | Reload privilege tables now? [Y/n] y | ||
+ | Thanks for using MariaDB! | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# mysql -u root -p | ||
+ | |||
+ | MariaDB [(none)]> | ||
+ | Query OK, 1 row affected (0.000 sec) | ||
+ | MariaDB [(none)]> | ||
+ | Query OK, 0 rows affected (0.000 sec) | ||
+ | MariaDB [(none)]> | ||
+ | Query OK, 0 rows affected (0.000 sec) | ||
+ | MariaDB [(none)]> | ||
+ | </ | ||
+ | |||
+ | creation des table et user : | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# cat / | ||
+ | [root@rlab ~]# cat / | ||
+ | </ | ||
+ | |||
+ | === configuration / properties === | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# mkdir -p / | ||
+ | [root@rlab ~]# cat / | ||
+ | # MySQL properties | ||
+ | mysql-hostname: | ||
+ | mysql-port: 3306 | ||
+ | mysql-database: | ||
+ | mysql-username: | ||
+ | mysql-password: | ||
+ | #Additional settings | ||
+ | mysql-default-max-connections-per-user: | ||
+ | mysql-default-max-group-connections-per-user: | ||
+ | </ | ||
+ | |||
+ | === permissions === | ||
+ | |||
+ | < | ||
+ | [root@rlab ~]# chmod 0400 / | ||
+ | [root@rlab ~]# chown tomcat: | ||
+ | [root@rlab ~]# ln -s / | ||
+ | |||
+ | [root@rlab ~]# chown tomcat: | ||
+ | </ | ||
+ | |||
+ | ==== GUACAMOLE_HOME ==== | ||
+ | |||
+ | Tres imprtant pour la configurations des plugins/ | ||
+ | |||
+ | comme ci-dessus nus avons definit les propriété dans / | ||
+ | |||
+ | cf https:// | ||
+ | |||
+ | |||
+ | < | ||
+ | [root@rlab / | ||
+ | </ | ||
+ | |||
+ | Apres redemarrage de tomcat , on peut enfin se connecter avec la compte guacadmin (cf fichier d' | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||