diff --git a/source/_includes/_installation/_repo/pg-access.rst b/source/_includes/_installation/_repo/pg-access.rst new file mode 100644 index 000000000..f0b7ccee4 --- /dev/null +++ b/source/_includes/_installation/_repo/pg-access.rst @@ -0,0 +1,50 @@ + +.. tab-set:: + + .. tab-item:: Ubuntu 22.04 + :sync: ubu22 + + .. code:: console + + # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" + # echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/16/main/pg_hba.conf + # systemctl restart postgresql + + .. tab-item:: Ubuntu 24.04 + :sync: ubu24 + + .. code:: console + + # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" + # echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/16/main/pg_hba.conf + # systemctl restart postgresql + + .. tab-item:: RHEL8 + :sync: rhel8 + + .. code:: console + + # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" + # echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/16/data/pg_hba.conf + # systemctl restart postgresql-16 + + .. tab-item:: RHEL9 + :sync: rhel9 + + .. code:: console + + # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" + # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" + # echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/16/data/pg_hba.conf + # systemctl restart postgresql-16 + +.. hint:: You may replace the ``0.0.0.0/0`` network with the one + within the cluster is installed (e.g., **172.16.0.0/24**) to prevent + unwanted accesses. diff --git a/source/_includes/_installation/pg-ce.rst b/source/_includes/_installation/pg-ce.rst index 666673db1..8f59e3b7b 100644 --- a/source/_includes/_installation/pg-ce.rst +++ b/source/_includes/_installation/pg-ce.rst @@ -36,52 +36,4 @@ Finally, allow the other nodes to access the databases that will be stored on this node by running these commands. -.. tab-set:: - - .. tab-item:: Ubuntu 22.04 - :sync: ubu22 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/16/main/pg_hba.conf - # systemctl restart postgresql - - .. tab-item:: Ubuntu 24.04 - :sync: ubu24 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/16/main/pg_hba.conf - # systemctl restart postgresql - - .. tab-item:: RHEL 8 - :sync: rhel8 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/16/data/pg_hba.conf - # systemctl restart postgresql-16 - - .. tab-item:: RHEL 9 - :sync: rhel9 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/16/data/pg_hba.conf - # systemctl restart postgresql-16 - -.. hint:: You may replace the ``0.0.0.0/0`` network with the one - within the cluster is installed (e.g., **172.16.0.0/24**) to prevent - unwanted accesses. +.. include:: /_includes/_installation/_repo/pg-access.rst diff --git a/source/_includes/_installation/pg.rst b/source/_includes/_installation/pg.rst index 59aac6fd5..92e9d7e1c 100644 --- a/source/_includes/_installation/pg.rst +++ b/source/_includes/_installation/pg.rst @@ -16,52 +16,4 @@ Finally, allow the other nodes to access the databases that will be stored on this node by running these commands. -.. tab-set:: - - .. tab-item:: Ubuntu 22.04 - :sync: ubu22 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/16/main/pg_hba.conf - # systemctl restart postgresql - - .. tab-item:: Ubuntu 24.04 - :sync: ubu24 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/16/main/pg_hba.conf - # systemctl restart postgresql - - .. tab-item:: RHEL8 - :sync: rhel8 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/16/data/pg_hba.conf - # systemctl restart postgresql-16 - - .. tab-item:: RHEL9 - :sync: rhel9 - - .. code:: console - - # su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\"" - # su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\"" - # echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/16/data/pg_hba.conf - # systemctl restart postgresql-16 - -.. hint:: You may replace the ``0.0.0.0/0`` network with the one - within the cluster is installed (e.g., **172.16.0.0/24**) to prevent - unwanted accesses. +.. include:: /_includes/_installation/_repo/pg-access.rst diff --git a/source/carbonio/install/scenarios/essential/manual.rst b/source/carbonio/install/scenarios/essential/manual.rst index 36b5189b8..909894eae 100644 --- a/source/carbonio/install/scenarios/essential/manual.rst +++ b/source/carbonio/install/scenarios/essential/manual.rst @@ -67,10 +67,16 @@ Core Node .. _es1-step4: -.. dropdown:: Step 4: Configure PostgreSQL +.. dropdown:: Step 4: Initialise and configure PostgreSQL + + .. rubric:: Initialisation .. include:: /_includes/_installation/step-conf-db-single-cb.rst + .. rubric:: Configuration + + .. include:: /_includes/_installation/_repo/pg-access.rst + .. _es1-step5: .. dropdown:: Step 5: Bootstrap |product| diff --git a/source/carbonio/install/scenarios/fullsmall/manual.rst b/source/carbonio/install/scenarios/fullsmall/manual.rst index 9ce6642c4..a7cf9d6fc 100644 --- a/source/carbonio/install/scenarios/fullsmall/manual.rst +++ b/source/carbonio/install/scenarios/fullsmall/manual.rst @@ -73,10 +73,16 @@ Core Node .. _fsm1-step4: -.. dropdown:: Step 4: Configure PostgreSQL +.. dropdown:: Step 4: Initialise and configure PostgreSQL + + .. rubric:: Initialisation .. include:: /_includes/_installation/step-conf-db-single-cb.rst + .. rubric:: Configuration + + .. include:: /_includes/_installation/_repo/pg-access.rst + .. _fsm1-step5: .. dropdown:: Step 5: Bootstrap |product| diff --git a/source/carbonio/install/scenarios/fullstandard/manual.rst b/source/carbonio/install/scenarios/fullstandard/manual.rst index 40cbad288..b336cc3b7 100644 --- a/source/carbonio/install/scenarios/fullstandard/manual.rst +++ b/source/carbonio/install/scenarios/fullstandard/manual.rst @@ -73,10 +73,16 @@ Core Node .. _st1-step4: -.. dropdown:: Step 4: Configure PostgreSQL +.. dropdown:: Step 4: Initialise and configure PostgreSQL + + .. rubric:: Initialisation .. include:: /_includes/_installation/step-conf-db-single-cb.rst + .. rubric:: Configuration + + .. include:: /_includes/_installation/_repo/pg-access.rst + .. _st1-step5: .. dropdown:: Step 5: Bootstrap |product| diff --git a/source/carbonio/install/scenarios/redundant/manual.rst b/source/carbonio/install/scenarios/redundant/manual.rst index 29aa8632f..c3602cca9 100644 --- a/source/carbonio/install/scenarios/redundant/manual.rst +++ b/source/carbonio/install/scenarios/redundant/manual.rst @@ -71,10 +71,16 @@ This Node features the *Mesh & Directory* and *Database* Components. .. _fr1-step4: -.. dropdown:: Step 4: Configure PostgreSQL +.. dropdown:: Step 4: Initialise and configure PostgreSQL + + .. rubric:: Initialisation .. include:: /_includes/_installation/step-conf-db-single-cb.rst + .. rubric:: Configuration + + .. include:: /_includes/_installation/_repo/pg-access.rst + .. _fr1-step5: .. dropdown:: Step 5: Bootstrap |product| diff --git a/source/carbonio/install/scenarios/single/manual.rst b/source/carbonio/install/scenarios/single/manual.rst index df5da9990..59f931405 100644 --- a/source/carbonio/install/scenarios/single/manual.rst +++ b/source/carbonio/install/scenarios/single/manual.rst @@ -113,10 +113,16 @@ repositories. .. _n1-s4: -.. dropdown:: Step 4: Configure PostgreSQL +.. dropdown:: Step 4: Initialise and configure PostgreSQL + + .. rubric:: Initialisation .. include:: /_includes/_installation/step-conf-db-single-cb.rst + .. rubric:: Configuration + + .. include:: /_includes/_installation/_repo/pg-access.rst + .. _n1-s5: .. dropdown:: Step 5: Bootstrap |product|