<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="it">
	<id>http://wiki.netsitech.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mazzotti</id>
	<title>WikiSitech - Contributi utente [it]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.netsitech.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mazzotti"/>
	<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php/Speciale:Contributi/Mazzotti"/>
	<updated>2026-06-18T23:46:20Z</updated>
	<subtitle>Contributi utente</subtitle>
	<generator>MediaWiki 1.34.4</generator>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Add-user-with-public-key&amp;diff=14909</id>
		<title>Add-user-with-public-key</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Add-user-with-public-key&amp;diff=14909"/>
		<updated>2026-06-11T13:19:04Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: /* UBUNTU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tramite questa procedura è possibile aggiungere un utente ad un server linux con accesso tramite SSH e chiave pubblica.&amp;lt;br&amp;gt;&lt;br /&gt;
= Creazione della chiave (RSA) =&lt;br /&gt;
Puoi fare [[Sitech:Progetti/CA|riferimento alla pagina]] in cui viene descritta la procedura per crearla.&lt;br /&gt;
&lt;br /&gt;
= Creazione dell'utente =&lt;br /&gt;
== AWS Linux ==&lt;br /&gt;
Vedere [https://docs.aws.amazon.com/it_it/AWSEC2/latest/UserGuide/managing-users.html l'articolo specifico].&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== UBUNTU ==&lt;br /&gt;
Cominciamo con la creazione dell'utente, operazione che va effettuata sulla macchina:&lt;br /&gt;
 sudo useradd -m -g &amp;lt;group&amp;gt; -d /home/&amp;lt;username&amp;gt; -s /bin/bash &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 (nel caso si tratti di un utente senza shell)&lt;br /&gt;
 sudo useradd -m -g &amp;lt;group&amp;gt; -d /home/&amp;lt;username&amp;gt; -s /usr/sbin/nologin &amp;lt;username&amp;gt;&lt;br /&gt;
...alla eliminazione della password per l'utente.&amp;lt;br&amp;gt;&lt;br /&gt;
 sudo passwd -d &amp;lt;username&amp;gt;&lt;br /&gt;
...ed alla aggiunta alla lista degli utenti che hanno accesso al comando sudo:&lt;br /&gt;
 sudo usermod -aG sudo &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''su sistemi Linux AWS vedere il [https://jumpcloud.com/blog/creating-sudo-users-on-amazon-linux seguente articolo]:''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 sudo mkdir /home/&amp;lt;username&amp;gt;/.ssh&lt;br /&gt;
&lt;br /&gt;
Possiamo a questo punto copiare il contenuto della chiave pubblica nel file '''authorized_keys''.&amp;lt;br&amp;gt;&lt;br /&gt;
In questo esempio apriamo il file con un editor e vi copiamo il contenuto, ma è possibile anche procedere con una copia del file tramite l'account dell'utente che già ha accesso alla macchina (scp)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo vi /home/&amp;lt;username&amp;gt;/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Una volta copiato il contenuto è necessario sistemare i privilegi dei file appena toccati:&lt;br /&gt;
&lt;br /&gt;
 sudo chmod 700 /home/&amp;lt;username&amp;gt;/.ssh&lt;br /&gt;
 sudo chmod 600 /home/&amp;lt;username&amp;gt;/.ssh/authorized_keys&lt;br /&gt;
 sudo chown -R &amp;lt;username&amp;gt;:&amp;lt;group&amp;gt; /home/&amp;lt;username&amp;gt;/.ssh&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UBUNTU on AWS ==&lt;br /&gt;
Cominciamo con la creazione dell'utente, con aggiunta alla lista di chi ha accesso al comando sudo:&lt;br /&gt;
operazione che va effettuata sulla macchina:&lt;br /&gt;
 sudo adduser --disabled-password --shell /bin/bash &amp;lt;username&amp;gt;&lt;br /&gt;
 sudo passwd -d &amp;lt;username&amp;gt;&lt;br /&gt;
 sudo usermod -aG sudo &amp;lt;username&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
...infine ci presentiamo con l'utente creato e generiamo la configurazione SSH&lt;br /&gt;
 sudo su - &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 mkdir .ssh&lt;br /&gt;
 chmod 700 .ssh&lt;br /&gt;
 touch .ssh/authorized_keys&lt;br /&gt;
 chmod 600 .ssh/authorized_keys&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
alla quale aggiungiamo la chiave pubblica dell'utente (Assicurarsi di incollare la chiave pubblica in una riga continua. La chiave pubblica non deve essere divisa su più righe.)&lt;br /&gt;
 vi .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Possiamo ora tentare un collegamento utilizzando il client ssh ma fornendo tutti i parametri necessari:&lt;br /&gt;
&lt;br /&gt;
 ssh -i &amp;lt;path-to-private-key&amp;gt; &amp;lt;username&amp;gt;@&amp;lt;servername&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Per semplificare questo processo, è possibile configurare SSH sul proprio client per riconoscere i parametri di connessione.&amp;lt;br&amp;gt;&lt;br /&gt;
Questa operazione la si compie modificando il file ''~/.ssh/config'' per aggiungere le seguenti righe:&lt;br /&gt;
 Host &amp;lt;serveralias&amp;gt;&lt;br /&gt;
        Hostname &amp;lt;servername&amp;gt;&lt;br /&gt;
        User &amp;lt;username&amp;gt;&lt;br /&gt;
        PreferredAuthentications publickey&lt;br /&gt;
        IdentityFile ~/.ssh/&amp;lt;my-private-key&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Add-user-with-public-key&amp;diff=14908</id>
		<title>Add-user-with-public-key</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Add-user-with-public-key&amp;diff=14908"/>
		<updated>2026-06-11T13:18:47Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: /* UBUNTU */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tramite questa procedura è possibile aggiungere un utente ad un server linux con accesso tramite SSH e chiave pubblica.&amp;lt;br&amp;gt;&lt;br /&gt;
= Creazione della chiave (RSA) =&lt;br /&gt;
Puoi fare [[Sitech:Progetti/CA|riferimento alla pagina]] in cui viene descritta la procedura per crearla.&lt;br /&gt;
&lt;br /&gt;
= Creazione dell'utente =&lt;br /&gt;
== AWS Linux ==&lt;br /&gt;
Vedere [https://docs.aws.amazon.com/it_it/AWSEC2/latest/UserGuide/managing-users.html l'articolo specifico].&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== UBUNTU ==&lt;br /&gt;
Cominciamo con la creazione dell'utente, operazione che va effettuata sulla macchina:&lt;br /&gt;
 sudo useradd -m -g &amp;lt;group&amp;gt; -d /home/&amp;lt;username&amp;gt; -s /bin/bash &amp;lt;username&amp;gt;&lt;br /&gt;
 (nel caso si tratti di un utente senza shell)&lt;br /&gt;
 sudo useradd -m -g &amp;lt;group&amp;gt; -d /home/&amp;lt;username&amp;gt; -s /usr/sbin/nologin &amp;lt;username&amp;gt;&lt;br /&gt;
...alla eliminazione della password per l'utente.&amp;lt;br&amp;gt;&lt;br /&gt;
 sudo passwd -d &amp;lt;username&amp;gt;&lt;br /&gt;
...ed alla aggiunta alla lista degli utenti che hanno accesso al comando sudo:&lt;br /&gt;
 sudo usermod -aG sudo &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''su sistemi Linux AWS vedere il [https://jumpcloud.com/blog/creating-sudo-users-on-amazon-linux seguente articolo]:''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 sudo mkdir /home/&amp;lt;username&amp;gt;/.ssh&lt;br /&gt;
&lt;br /&gt;
Possiamo a questo punto copiare il contenuto della chiave pubblica nel file '''authorized_keys''.&amp;lt;br&amp;gt;&lt;br /&gt;
In questo esempio apriamo il file con un editor e vi copiamo il contenuto, ma è possibile anche procedere con una copia del file tramite l'account dell'utente che già ha accesso alla macchina (scp)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo vi /home/&amp;lt;username&amp;gt;/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Una volta copiato il contenuto è necessario sistemare i privilegi dei file appena toccati:&lt;br /&gt;
&lt;br /&gt;
 sudo chmod 700 /home/&amp;lt;username&amp;gt;/.ssh&lt;br /&gt;
 sudo chmod 600 /home/&amp;lt;username&amp;gt;/.ssh/authorized_keys&lt;br /&gt;
 sudo chown -R &amp;lt;username&amp;gt;:&amp;lt;group&amp;gt; /home/&amp;lt;username&amp;gt;/.ssh&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UBUNTU on AWS ==&lt;br /&gt;
Cominciamo con la creazione dell'utente, con aggiunta alla lista di chi ha accesso al comando sudo:&lt;br /&gt;
operazione che va effettuata sulla macchina:&lt;br /&gt;
 sudo adduser --disabled-password --shell /bin/bash &amp;lt;username&amp;gt;&lt;br /&gt;
 sudo passwd -d &amp;lt;username&amp;gt;&lt;br /&gt;
 sudo usermod -aG sudo &amp;lt;username&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
...infine ci presentiamo con l'utente creato e generiamo la configurazione SSH&lt;br /&gt;
 sudo su - &amp;lt;username&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 mkdir .ssh&lt;br /&gt;
 chmod 700 .ssh&lt;br /&gt;
 touch .ssh/authorized_keys&lt;br /&gt;
 chmod 600 .ssh/authorized_keys&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
alla quale aggiungiamo la chiave pubblica dell'utente (Assicurarsi di incollare la chiave pubblica in una riga continua. La chiave pubblica non deve essere divisa su più righe.)&lt;br /&gt;
 vi .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Possiamo ora tentare un collegamento utilizzando il client ssh ma fornendo tutti i parametri necessari:&lt;br /&gt;
&lt;br /&gt;
 ssh -i &amp;lt;path-to-private-key&amp;gt; &amp;lt;username&amp;gt;@&amp;lt;servername&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Per semplificare questo processo, è possibile configurare SSH sul proprio client per riconoscere i parametri di connessione.&amp;lt;br&amp;gt;&lt;br /&gt;
Questa operazione la si compie modificando il file ''~/.ssh/config'' per aggiungere le seguenti righe:&lt;br /&gt;
 Host &amp;lt;serveralias&amp;gt;&lt;br /&gt;
        Hostname &amp;lt;servername&amp;gt;&lt;br /&gt;
        User &amp;lt;username&amp;gt;&lt;br /&gt;
        PreferredAuthentications publickey&lt;br /&gt;
        IdentityFile ~/.ssh/&amp;lt;my-private-key&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=File:Default-VDP.png&amp;diff=14895</id>
		<title>File:Default-VDP.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=File:Default-VDP.png&amp;diff=14895"/>
		<updated>2026-06-07T09:47:55Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Configurazione dischi di default per VDP&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Mysql5&amp;diff=14809</id>
		<title>Mysql5</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Mysql5&amp;diff=14809"/>
		<updated>2026-04-02T10:35:43Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: /* Attivazione del log delle query */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MySQL 5.x - Appunti di gestione =&lt;br /&gt;
== Grant privilegi di accesso al DB ==&lt;br /&gt;
=== Grant fornendo l'indirizzo IP ===&lt;br /&gt;
 mysql -u userLogin --password=passLogin --database=mysql -e &amp;quot;GRANT SELECT ON db.* TO 'user'@'172.16.0.%' IDENTIFIED BY '*****';&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Grant fornendo il FQDN ===&lt;br /&gt;
 mysql -u userLogin --password=passLogin --database=mysql -e &amp;quot;GRANT SELECT ON db.* TO 'user'@'%.netsitech.com' IDENTIFIED BY '*****';&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Attivazione del log delle query ==&lt;br /&gt;
 mysqld --log=&amp;lt;percorso-del-file-di-log&amp;gt; --user=&amp;lt;utente-che-esegue-il-servizio&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
   Esempio:&lt;br /&gt;
 mysqld --log=/var/log/mysql-queries.log --user=mysql&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
L'attivazione del log delle query (lente), può essere attivato anche collegandosi al DB ed impostando le seguenti variabili:&lt;br /&gt;
 -- Impostazione del file di log&lt;br /&gt;
 SET GLOBAL slow_query_log_file='/var/log/mysql/slow-query.log';&lt;br /&gt;
 -- Impostazione del tempo espresso in secondi (sono permessi valori decimali) trascorso il quale la query viene definita 'slow'&lt;br /&gt;
 SET GLOBAL long_query_time=0.5;&lt;br /&gt;
 -- Attivazione del log&lt;br /&gt;
 SET GLOBAL slow_query_log=1;&lt;br /&gt;
&lt;br /&gt;
== Comando di backup ==&lt;br /&gt;
=== di un database specifico ===&lt;br /&gt;
 mysqldump [--comments] [--disable-keys] [--hex-blob] -u &amp;lt;utente&amp;gt; -p &amp;lt;database&amp;gt; [table [...]] &amp;gt; &amp;lt;percorso-e-nome-del-file-di-backup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Esempio&lt;br /&gt;
 mysqldump  -u root -p bacula &amp;gt; D:\Backup\MySQL\FullBackupMySQL.sql&lt;br /&gt;
&lt;br /&gt;
esegue il backup del database bacula.&lt;br /&gt;
&lt;br /&gt;
=== di un gruppo di database ===&lt;br /&gt;
 mysqldump --databases --comments --disable-keys --hex-blob -r &amp;lt;percorso-e-nome-del-file-di-backup&amp;gt; -u &amp;lt;utente&amp;gt; -p&amp;lt;password&amp;gt; &amp;lt;database1&amp;gt; &amp;lt;database2&amp;gt; [...]&lt;br /&gt;
&lt;br /&gt;
  Esempio&lt;br /&gt;
 mysqldump&amp;quot; --databases --comments --disable-keys --hex-blob -r D:\Backup\MySQL\FullBackupMySQL.sql -u root -p****** mysql bacula dotproject&lt;br /&gt;
&lt;br /&gt;
esegue il backup dei database mysql, bacula e dotproject&lt;br /&gt;
&lt;br /&gt;
=== di tutti i database ===&lt;br /&gt;
 mysqldump --all-databases --comments --disable-keys --hex-blob -r &amp;lt;percorso-e-nome-del-file-di-backup&amp;gt; -u &amp;lt;utente&amp;gt; -p&amp;lt;password&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Esempio&lt;br /&gt;
 mysqldump --all-databases --comments --disable-keys --hex-blob -r D:\Backup\MySQL\FullBackupMySQL.sql -u root -p******&lt;br /&gt;
&lt;br /&gt;
=== di un elenco di tabelle (note per prefisso) ===&lt;br /&gt;
 mysqldump -u [user] -p databasename `echo &amp;quot;show tables like 'prefix_%';&amp;quot; | mysql -u [user] -p databasename | sed '/Tables_in/d'` &amp;gt; [destination-file].sql&lt;br /&gt;
&lt;br /&gt;
== Comando di restore ==&lt;br /&gt;
=== di un database specifico ===&lt;br /&gt;
 mysql -u &amp;lt;utente&amp;gt; -p -D&amp;lt;database&amp;gt; [table [...]] &amp;lt; percorso-e-nome-del-file-di-backup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  Esempio&lt;br /&gt;
 mysql  -u root -p -Dbacula &amp;lt; D:\Backup\MySQL\FullBackupMySQL.sql&lt;br /&gt;
&lt;br /&gt;
esegue il restore del contenuto del file ''FullBackupMySQL.sql'' sul database ''bacula''.&lt;br /&gt;
&lt;br /&gt;
[[Category:MySQL]]&lt;br /&gt;
== Analisi delle performance / Script di tuning ==&lt;br /&gt;
Alla [https://devdev.it/ottimizzare-le-prestazioni-di-mysql-e-mariadb-mysqltuner-306/ pagina web qui indicata] è disponibile uno script perl che effettua alcune verifiche sulla istanza in esecuzione di MySQL.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Lo script è archiviato alla versione corrente [https://gitlab.netsitech.com/sitech/sitech_sysadmin/-/raw/master/mysql/mysqltuner.pl anche sul repo GITLab] Sitech.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Spostamento dei file del database =&lt;br /&gt;
Per spostare i file del database in una unità diversa è possibile procedere come segue:&lt;br /&gt;
# Arrestare l'istanza di MySQL&lt;br /&gt;
# Modificare tutti i riferimenti contenuti nel file di configurazione utilizzato nel lancio dell'istanza (default '''my.ini''')&lt;br /&gt;
# Spostare i file nella nuova locazione&lt;br /&gt;
# Avviare l'istanza del database&lt;br /&gt;
&lt;br /&gt;
= Problemi di accesso SSL a MySQL =&lt;br /&gt;
== mysql daemon ==&lt;br /&gt;
Per verificare se il supporto a SSL è attivo, è necessario collegarsi al db:&lt;br /&gt;
 mysql -u &amp;lt;username&amp;gt; -p&lt;br /&gt;
ed eseguire il comando:&lt;br /&gt;
 SHOW VARIABLES LIKE '%ssl%';&lt;br /&gt;
Nel caso in cui compaiano le righe:&lt;br /&gt;
 +---------------+-----------------+&lt;br /&gt;
 | Variable_name | Value           |&lt;br /&gt;
 +---------------+-----------------+&lt;br /&gt;
 | have_openssl  | YES             |&lt;br /&gt;
 | have_ssl      | YES             |&lt;br /&gt;
 +---------------+-----------------+&lt;br /&gt;
è necessario disattivare il supporto a SSL agendo sulla configurazione del server:&lt;br /&gt;
 /etc/mysql/mysql.conf.d/mysqld.cnf&lt;br /&gt;
aggiungendo la riga:&lt;br /&gt;
 skip_ssl&lt;br /&gt;
e rilanciando il server:&lt;br /&gt;
 systemctl restart mysql.service&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== mysql container (docker) ==&lt;br /&gt;
Per disattivare l'utilizzo di SSL, nel docker-compose (definizione dello stack) di avvio, aggiungere il parametro:&lt;br /&gt;
 --skip_ssl&lt;br /&gt;
come nell'esempio seguente:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;YAML&amp;quot;&amp;gt;&lt;br /&gt;
version: '3.1'&lt;br /&gt;
services:&lt;br /&gt;
    mysql-test:&lt;br /&gt;
        image: mysql:8.0&lt;br /&gt;
        restart: always&lt;br /&gt;
        command: --skip_ssl --default-authentication-plugin=mysql_native_password&lt;br /&gt;
&lt;br /&gt;
        volumes:&lt;br /&gt;
          - mysql-test:/var/lib/mysql&lt;br /&gt;
&lt;br /&gt;
        environment:&lt;br /&gt;
            - TZ=Europe/Rome&lt;br /&gt;
            - MYSQL_ROOT_PASSWORD=password&lt;br /&gt;
            - MYSQL_DATABASE=database-name&lt;br /&gt;
            - MYSQL_USER=yyyyyy&lt;br /&gt;
            - MYSQL_PASSWORD=xxxxxx&lt;br /&gt;
&lt;br /&gt;
        ports:&lt;br /&gt;
            - &amp;quot;3306:3306&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== JAVA ==&lt;br /&gt;
* javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)&lt;br /&gt;
Il problema è causato, a partire dalla versione 5.7 del software su server (Community Edition) quando ci si collega con un client che non implementa correttamente le specifiche SSL attese durante l'handshake.&amp;lt;br&amp;gt;&lt;br /&gt;
Per risolvere il problema è necessario aggiungere il seguente parametro alla stringa di connessione:&lt;br /&gt;
 &amp;amp;useSSL=false&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Hibernate ==&lt;br /&gt;
Aggiungere le seguenti righe al file di configurazione di Hibernate:&lt;br /&gt;
 hibernate.connection.useSSL=false&lt;br /&gt;
 hibernate.connection.requireSSL=false&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Extend_a_Volume_Group&amp;diff=14644</id>
		<title>Extend a Volume Group</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Extend_a_Volume_Group&amp;diff=14644"/>
		<updated>2026-01-08T14:12:47Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: /* Extending a logical volume in a virtual machine running Red Hat, Cent OS or OpenSUSe */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Gestire i Volume Groups &amp;amp; Logical Volumes=&lt;br /&gt;
* Effettuare una scansione dei logical volumes e verificarne lo stato&lt;br /&gt;
 lvscan -a&lt;br /&gt;
* Riattivare un LV che risulti disattivo&lt;br /&gt;
 lvchange -ay &amp;lt;pathToLV&amp;gt;&lt;br /&gt;
* Disattivare un LV&lt;br /&gt;
 lvchange -an &amp;lt;pathToLV&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creazione di un VolumeGroup==&lt;br /&gt;
 vgcreate &amp;lt;volume-group-name&amp;gt; /dev/sdX&lt;br /&gt;
Nota: Se è necessario aggiungere alla vm un disco fisico seguire questa guida: [[Sitech:Progetti/vmWare#Aggiungere_un_disco_virtuale|Aggiungere_un_disco_virtuale]]&lt;br /&gt;
&lt;br /&gt;
==Aggiungere un disco fisico ad un VolumeGroup==&lt;br /&gt;
 vgextend &amp;lt;volume-group-name&amp;gt; /dev/sdX&lt;br /&gt;
Nota: Se è necessario aggiungere alla vm un disco fisico seguire questa guida: [[Sitech:Progetti/vmWare#Aggiungere_un_disco_virtuale|Aggiungere_un_disco_virtuale]]&lt;br /&gt;
&lt;br /&gt;
==Incrementare la dimensione di un disco virtuale appartenente ad un VolumeGroup==&lt;br /&gt;
 pvresize /dev/sdX&lt;br /&gt;
 vgdisplay &amp;lt;volume-group-name&amp;gt;&lt;br /&gt;
la nuova dimensione del volume-group rispecchierà la nuova dimensione del disco ridimensionato.&lt;br /&gt;
A questo punto lo spazio aggiunto può essere aggiunto al logical-volume&lt;br /&gt;
&lt;br /&gt;
==Creare un Logical Volume==&lt;br /&gt;
* Creazione di un LV utilizzando la dimensione massima disponibile nel VG&lt;br /&gt;
 lvcreate -n &amp;lt;logical-volume-name&amp;gt; -l 100%FREE &amp;lt;volume-group-name&amp;gt;&lt;br /&gt;
* Creazione di un LV indicando la dimensione iniziale del LV a 8Gb&lt;br /&gt;
 lvcreate -n &amp;lt;logical-volume-name&amp;gt; -L8G &amp;lt;volume-group-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creare un file-system in un LV esistente==&lt;br /&gt;
 mkfs -t ext4 /dev/mapper/lv-name&lt;br /&gt;
==UUID di un volume e mount automatico==&lt;br /&gt;
Per ottenere il UUID di un volume, utilizzare il seguente comando&lt;br /&gt;
 blkid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Per attivare il mount automatico, editare il file&lt;br /&gt;
 /etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Shrinking a logical volume==&lt;br /&gt;
Before shrinking the volume must be unmounted.&lt;br /&gt;
&lt;br /&gt;
 umount /dev/mapper/volume_lv&lt;br /&gt;
 lvresize --resizefs -L&amp;lt;NEWSIZE&amp;gt; /dev/mapper/volume_lv&lt;br /&gt;
 mount /dev/mapper/volume_lv&lt;br /&gt;
==Extending a logical volume (and corresponding filesystem)==&lt;br /&gt;
 lvresize --resizefs -L&amp;lt;NEWSIZE&amp;gt; /dev/mapper/volume_lv&lt;br /&gt;
Example (extend vgData-lvdocker_volumes by 4GB):&lt;br /&gt;
 lvresize --resizefs -L+4G /dev/mapper/vgData-lvdocker_volumes&lt;br /&gt;
oppure&lt;br /&gt;
 lvextend --resizefs -L+4G /dev/mapper/vgData-lvdocker_volumes&lt;br /&gt;
&lt;br /&gt;
==Extending a logical volume in a virtual machine running Red Hat, Cent OS or OpenSUSe==&lt;br /&gt;
&lt;br /&gt;
'''Purpose'''&amp;lt;br&amp;gt;&lt;br /&gt;
This article provides steps for extending a volume group created with Logical Volume Manager (LVM) in a virtual machine running Red Hat/Cent OS/OpenSUSe.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Resolution'''&amp;lt;br&amp;gt;&lt;br /&gt;
Create a new disk then [[Rescan_added_HDD_since_last_boot|rescan devices]].&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Run this command to convert the new disk to a physical volume:&lt;br /&gt;
&lt;br /&gt;
Note: The number for the sda can change depending on system setup. Use the sda number that was created in step 5.&lt;br /&gt;
&lt;br /&gt;
 # pvcreate /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Run this command to extend the physical volume:&lt;br /&gt;
&lt;br /&gt;
 # vgextend VolGroup00 /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Note: To determine which volume group to extend, use the command vgdisplay.&lt;br /&gt;
&lt;br /&gt;
Run this command to verify how many physical extents are available to the Volume Group:&lt;br /&gt;
&lt;br /&gt;
 # vgdisplay VolGroup00 | grep &amp;quot;Free&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Run the following command to extend the Logical Volume:&lt;br /&gt;
&lt;br /&gt;
 # lvextend -L+#G /dev/VolGroup00/LogVol00&lt;br /&gt;
&lt;br /&gt;
Where # is the number of Free space in GB available as per the previous command. Use the full number output from Step 10 including any decimals.&lt;br /&gt;
Or use:&lt;br /&gt;
&lt;br /&gt;
 # lvextend -l +100%FREE /dev/VolGroup00/LogVol00&lt;br /&gt;
&lt;br /&gt;
to extend to max size available.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: to determine which logical volume to extend, use the command lvdisplay.&lt;br /&gt;
&lt;br /&gt;
Run the following command to expand the ext3 filesystem online, inside of the Logical Volume:&lt;br /&gt;
&lt;br /&gt;
 # resize2fs /dev/VolGroup00/LogVol00&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 # xfs_growfs -d /dev/VolGroup00/LogVol00&lt;br /&gt;
if the file system is an ''xfs'' type.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Use ext2online instead of resize2fs if it is a Red Hat virtual machine.&lt;br /&gt;
&lt;br /&gt;
Run the following command to verify that the / filesystem has the new space available:&lt;br /&gt;
&lt;br /&gt;
 # df -h /&lt;br /&gt;
&lt;br /&gt;
=Altre fonti di informazione=&lt;br /&gt;
Puoi trovare altre informazioni utili e complete in [https://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu questo articolo].&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Extend_a_Volume_Group&amp;diff=14643</id>
		<title>Extend a Volume Group</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Extend_a_Volume_Group&amp;diff=14643"/>
		<updated>2026-01-08T14:01:58Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Gestire i Volume Groups &amp;amp; Logical Volumes=&lt;br /&gt;
* Effettuare una scansione dei logical volumes e verificarne lo stato&lt;br /&gt;
 lvscan -a&lt;br /&gt;
* Riattivare un LV che risulti disattivo&lt;br /&gt;
 lvchange -ay &amp;lt;pathToLV&amp;gt;&lt;br /&gt;
* Disattivare un LV&lt;br /&gt;
 lvchange -an &amp;lt;pathToLV&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creazione di un VolumeGroup==&lt;br /&gt;
 vgcreate &amp;lt;volume-group-name&amp;gt; /dev/sdX&lt;br /&gt;
Nota: Se è necessario aggiungere alla vm un disco fisico seguire questa guida: [[Sitech:Progetti/vmWare#Aggiungere_un_disco_virtuale|Aggiungere_un_disco_virtuale]]&lt;br /&gt;
&lt;br /&gt;
==Aggiungere un disco fisico ad un VolumeGroup==&lt;br /&gt;
 vgextend &amp;lt;volume-group-name&amp;gt; /dev/sdX&lt;br /&gt;
Nota: Se è necessario aggiungere alla vm un disco fisico seguire questa guida: [[Sitech:Progetti/vmWare#Aggiungere_un_disco_virtuale|Aggiungere_un_disco_virtuale]]&lt;br /&gt;
&lt;br /&gt;
==Incrementare la dimensione di un disco virtuale appartenente ad un VolumeGroup==&lt;br /&gt;
 pvresize /dev/sdX&lt;br /&gt;
 vgdisplay &amp;lt;volume-group-name&amp;gt;&lt;br /&gt;
la nuova dimensione del volume-group rispecchierà la nuova dimensione del disco ridimensionato.&lt;br /&gt;
A questo punto lo spazio aggiunto può essere aggiunto al logical-volume&lt;br /&gt;
&lt;br /&gt;
==Creare un Logical Volume==&lt;br /&gt;
* Creazione di un LV utilizzando la dimensione massima disponibile nel VG&lt;br /&gt;
 lvcreate -n &amp;lt;logical-volume-name&amp;gt; -l 100%FREE &amp;lt;volume-group-name&amp;gt;&lt;br /&gt;
* Creazione di un LV indicando la dimensione iniziale del LV a 8Gb&lt;br /&gt;
 lvcreate -n &amp;lt;logical-volume-name&amp;gt; -L8G &amp;lt;volume-group-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creare un file-system in un LV esistente==&lt;br /&gt;
 mkfs -t ext4 /dev/mapper/lv-name&lt;br /&gt;
==UUID di un volume e mount automatico==&lt;br /&gt;
Per ottenere il UUID di un volume, utilizzare il seguente comando&lt;br /&gt;
 blkid&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Per attivare il mount automatico, editare il file&lt;br /&gt;
 /etc/fstab&lt;br /&gt;
&lt;br /&gt;
==Shrinking a logical volume==&lt;br /&gt;
Before shrinking the volume must be unmounted.&lt;br /&gt;
&lt;br /&gt;
 umount /dev/mapper/volume_lv&lt;br /&gt;
 lvresize --resizefs -L&amp;lt;NEWSIZE&amp;gt; /dev/mapper/volume_lv&lt;br /&gt;
 mount /dev/mapper/volume_lv&lt;br /&gt;
==Extending a logical volume (and corresponding filesystem)==&lt;br /&gt;
 lvresize --resizefs -L&amp;lt;NEWSIZE&amp;gt; /dev/mapper/volume_lv&lt;br /&gt;
Example (extend vgData-lvdocker_volumes by 4GB):&lt;br /&gt;
 lvresize --resizefs -L+4G /dev/mapper/vgData-lvdocker_volumes&lt;br /&gt;
oppure&lt;br /&gt;
 lvextend --resizefs -L+4G /dev/mapper/vgData-lvdocker_volumes&lt;br /&gt;
&lt;br /&gt;
==Extending a logical volume in a virtual machine running Red Hat, Cent OS or OpenSUSe==&lt;br /&gt;
&lt;br /&gt;
'''Purpose'''&amp;lt;br&amp;gt;&lt;br /&gt;
This article provides steps for extending a volume group created with Logical Volume Manager (LVM) in a virtual machine running Red Hat/Cent OS/OpenSUSe.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Resolution'''&amp;lt;br&amp;gt;&lt;br /&gt;
Create a new disk then [[Rescan_added_HDD_since_last_boot|rescan devices]].&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Run this command to convert the new disk to a physical volume:&lt;br /&gt;
&lt;br /&gt;
Note: The number for the sda can change depending on system setup. Use the sda number that was created in step 5.&lt;br /&gt;
&lt;br /&gt;
 # pvcreate /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Run this command to extend the physical volume:&lt;br /&gt;
&lt;br /&gt;
 # vgextend VolGroup00 /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Note: To determine which volume group to extend, use the command vgdisplay.&lt;br /&gt;
&lt;br /&gt;
Run this command to verify how many physical extents are available to the Volume Group:&lt;br /&gt;
&lt;br /&gt;
 # vgdisplay VolGroup00 | grep &amp;quot;Free&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Run the following command to extend the Logical Volume:&lt;br /&gt;
&lt;br /&gt;
 # lvextend -L+#G /dev/VolGroup00/LogVol00&lt;br /&gt;
&lt;br /&gt;
Where # is the number of Free space in GB available as per the previous command. Use the full number output from Step 10 including any decimals.&lt;br /&gt;
Or use:&lt;br /&gt;
&lt;br /&gt;
 # lvextend -l +100%FREE /dev/VolGroup00/LogVol00&lt;br /&gt;
&lt;br /&gt;
to extend to max size available.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: to determine which logical volume to extend, use the command lvdisplay.&lt;br /&gt;
&lt;br /&gt;
Run the following command to expand the ext3 filesystem online, inside of the Logical Volume:&lt;br /&gt;
&lt;br /&gt;
 # resize2fs /dev/VolGroup00/LogVol00&lt;br /&gt;
&lt;br /&gt;
Note: Use ext2online instead of resize2fs if it is a Red Hat virtual machine.&lt;br /&gt;
&lt;br /&gt;
Run the following command to verify that the / filesystem has the new space available:&lt;br /&gt;
&lt;br /&gt;
 # df -h /&lt;br /&gt;
&lt;br /&gt;
=Altre fonti di informazione=&lt;br /&gt;
Puoi trovare altre informazioni utili e complete in [https://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu questo articolo].&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=File:Creazione_regola_02.png&amp;diff=14615</id>
		<title>File:Creazione regola 02.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=File:Creazione_regola_02.png&amp;diff=14615"/>
		<updated>2025-11-13T16:34:20Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=File:Creazione_regola_01.png&amp;diff=14614</id>
		<title>File:Creazione regola 01.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=File:Creazione_regola_01.png&amp;diff=14614"/>
		<updated>2025-11-13T16:33:59Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Aws-tip-and-tricks&amp;diff=14594</id>
		<title>Aws-tip-and-tricks</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Aws-tip-and-tricks&amp;diff=14594"/>
		<updated>2025-09-25T12:17:26Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Elenca le interfacce di rete collegate ad uno specifico security group&lt;br /&gt;
 aws ec2 describe-network-interfaces --region eu-south-1 --filters Name=group-id,Values=&amp;lt;ID-security-group&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Elenca i servizi che non hanno associato il tag ''customer''&lt;br /&gt;
 aws resourcegroupstaggingapi get-resources --tags-per-page 100 | jq '.ResourceTagMappingList[] | select(contains({Tags: [{Key: &amp;quot;customer&amp;quot;} ]}) | not)'&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=File:ControlPanel-QNAP.png&amp;diff=14585</id>
		<title>File:ControlPanel-QNAP.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=File:ControlPanel-QNAP.png&amp;diff=14585"/>
		<updated>2025-09-18T14:16:15Z</updated>

		<summary type="html">&lt;p&gt;Mazzotti: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mazzotti</name></author>
		
	</entry>
</feed>