Skip to content

Commit 0b99c0d

Browse files
authored
Merge pull request mattermost#1184 from kjkeane/update_rhel71_postgres
Update RHEL7 Documentation
2 parents 857d436 + 97e2214 commit 0b99c0d

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

source/install/install-rhel-71-postgresql.rst

+16-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ Installing PostgreSQL Database
77

88
2. Download the PostgreSQL 9.4 Yum repository.
99

10-
``wget https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-3.noarch.rpm``
10+
For RHEL 7
11+
``curl -O https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-redhat94-9.4-3.noarch.rpm``
12+
For CentOS 7
13+
``curl -O https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm``
14+
For Scientific Linux
15+
``curl -O https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-sl94-9.4-3.noarch.rpm``
16+
For Oracle
17+
``curl -O https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-oraclelinux-9.4-3.noarch.rpm``
1118

1219
3. Install the Yum repository from the file that you downloaded.
1320

@@ -19,19 +26,19 @@ Installing PostgreSQL Database
1926

2027
5. Initialize the database.
2128

22-
``sudo service postgresql initdb``
29+
``sudo /usr/pgsql-9.4/bin/postgresql94-setup initdb``
2330

2431
6. Set PostgreSQL to start on boot.
2532

26-
``sudo systemctl enable postgresql``
33+
``sudo systemctl enable postgresql-9.4``
2734

2835
7. Start the PostgreSQL server.
2936

30-
``sudo systemctl start postgresql``
37+
``sudo systemctl start postgresql-9.4``
3138

3239
8. Switch to the *postgres* Linux user account that was created during the installation.
3340

34-
``sudo --login --user postgres``
41+
``sudo -iu postgres``
3542

3643
9. Start the PostgreSQL interactive terminal.
3744

@@ -62,7 +69,7 @@ Installing PostgreSQL Database
6269

6370
15. Allow Postgres to listen on all assigned IP Addresses.
6471

65-
a. Open ``/etc/postgresql/9.4/main/postgresql.conf`` as root in a text editor.
72+
a. Open ``/var/lib/pgsql/9.4/data/postgresql.conf`` as root in a text editor.
6673

6774
b. Find the following line:
6875

@@ -72,19 +79,19 @@ Installing PostgreSQL Database
7279

7380
``listen_addresses = '*'``
7481

75-
16. If the Mattermost server is on a separate machine, modify the file ``pg_hbe.conf`` to allow the Mattermost server to communicate with the database.
82+
16. If the Mattermost server is on a separate machine, modify the file ``pg_hba.conf`` to allow the Mattermost server to communicate with the database.
7683

7784
If the Mattermost server and the database are on the same machine, then you can skip this step.
7885

79-
a. Open ``/etc/postgresql/9.4/main/pg_hba.conf`` in a text editor.
86+
a. Open ``/var/lib/pgsql/9.4/data/pg_hba.conf`` in a text editor.
8087

8188
b. Add the following line to the end of the file, where *<mm-server-IP>* is the IP address of the machine that contains the Mattermost server.
8289

8390
``host all all <mm-server-IP>/32 md5``
8491

8592
17. Reload Postgres database
8693

87-
``sudo systemctl reload postgresql``
94+
``sudo systemctl reload postgresql-9.4``
8895

8996
18. Verify that you can connect with the user *mmuser*.
9097

0 commit comments

Comments
 (0)