Questo post illustra i passaggi per modificare la password del database del motore per il motore RHVM.
1. Prima della modifica, è possibile eseguire i comandi seguenti per verificare l'attuale ENGINE_DB_PASSWORD per il motore RHEVM che interagisce con il database del motore. Per impostazione predefinita, ENGINE_DB_PASSWORD è una stringa casuale che viene generata automaticamente da engine-config durante il processo di installazione. ENGINE_DB_PASSWORD è utilizzato dai seguenti file:
[root@rhevm-engine ~]# cat /etc/ovirt-engine/engine.conf.d/10-setup-database.conf |grep "ENGINE_DB_PASSWORD" ENGINE_DB_PASSWORD="xxxxxxxx" [root@rhevm-engine ~]# cat /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf |grep "ENGINE_DB_PASSWORD" ENGINE_DB_PASSWORD="xxxxxxxx" [root@rhevm-engine ~]# cat /etc/ovirt-engine/aaa/internal.properties |grep dbpassword config.datasource.dbpassword=xxxxxxxx
2. Segui i passaggi seguenti per modificare la password del database del motore:
un. Arrestare il processo ovirt-engine:
[root@rhevm-engine ~]# systemctl stop ovirt-engine
b. Interrompi il servizio di Data Warehouse di oVirt Engine:
[root@rhevm-engine ~]# systemctl stop ovirt-engine-dwhd
c. Modifica le credenziali che il processo del motore invia al database modificando ENGINE_DB_PASSWORD con la nuova password:
[root@rhevm-engine ~]# vi /etc/ovirt-engine/engine.conf.d/10-setup-database.conf ENGINE_DB_PASSWORD="YourNewPassword" [root@rhevm-engine ~]# vi /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf ENGINE_DB_PASSWORD="YourNewPassword"
d. Modifica password db del dominio interno:
[root@rhevm-engine ~]# vi /etc/ovirt-engine/aaa/internal.properties config.datasource.dbpassword=YourNewPassword
e. Modifica le credenziali del database postgres:
Per impostazione predefinita, il nome dell'utente in ENGINE_DB_USER e il database in ENGINE_DB_DATABASE sono entrambi "motore":
[root@rhevm-engine ~]# cat /etc/ovirt-engine/engine.conf.d/10-setup-database.conf ENGINE_DB_HOST="localhost" ENGINE_DB_PORT="5432" ENGINE_DB_USER="engine" ENGINE_DB_DATABASE="engine"
Collegati al database "Postgres" per modificare l'utente db del motore e le password postgres:
[root@rhevm-engine ~]# su - postgres Last login: Thu Apr 30 15:29:48 AEST 2020 on pts/1 -bash-4.2$ scl enable rh-postgresql95 -- psql psql (9.5.14) Type "help" for help. postgres=# alter user engine with password 'YourNewPassword'; ALTER ROLE postgres-# alter user postgres with password 'YourNewPassword'; ALTER ROLE postgres=# \q -bash-4.2$ exit logout
f. Avvia ovirt-engine e il servizio Data Warehouse per avere effetto:
[root@rhevm-engine ~]# systemctl start ovirt-engine [root@rhevm-engine ~]# systemctl start ovirt-engine-dwhd
Ora puoi utilizzare ora le nuove credenziali per accedere al database del motore.