Skip to content

Commit c6367eb

Browse files
committed
Add note about postgres symlinks
1 parent 6965a17 commit c6367eb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

install/centos/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,17 @@ Install `postgresql93-server` and the `postgreqsql93-devel` libraries:
372372

373373
yum install postgresql93-server postgresql93-devel
374374

375-
Rename the service script:
375+
The executables are installed in `/usr/pgsql-9.3/bin/`. In order to be able to run them,
376+
you have to either add this path to your `$PATH` or make symlinks. Here, we will make
377+
symlinks to the commands used by GitLab:
376378

377-
mv /etc/init.d/{postgresql-9.3,postgresql}
379+
ln -s /usr/pgsql-9.3/bin/pg_dump /usr/bin/pg_dump
380+
ln -s /usr/pgsql-9.3/bin/pg_restore /usr/bin/pg_restore
381+
ln -s /usr/pgsql-9.3/bin/psql /usr/bin/psql
378382

379-
Make a symlink for `pg_dump` otherwise backup will fail:
383+
Rename the service script:
380384

381-
ln -s /usr/pgsql-9.3/bin/pg_dump /usr/bin/pg_dump
385+
mv /etc/init.d/{postgresql-9.3,postgresql}
382386

383387
Initialize the database:
384388

@@ -392,6 +396,7 @@ Start the service and configure service to start on boot:
392396
Configure the database user and password:
393397

394398
su - postgres
399+
export PATH=$PATH:/usr/pgsql-9.3/bin/
395400
psql -d template1
396401

397402
psql (8.4.20)

0 commit comments

Comments
 (0)