Skip to main content
English
Source Link
Gilles 'SO- stop being evil'
  • 865.3k
  • 205
  • 1.8k
  • 2.3k

Access PgSQL executables from anywhere in the SO

I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command "pg_dump"pg_dump: for that I need to change from "actual_path"(actual path) to /usr/pgsql-9.1/bin/usr/pgsql-9.1/bin and then execute as ./pg_dump./pg_dump even if I'm root user. I think in make a symlink for each executable under /usr/pgsql-9.1/bin/usr/pgsql-9.1/bin in /bin/bin but doesn'tI don't know if this is the best way. Also I think in add this PATH="/usr/pgsql-9.1/bin:$PATH"PATH="/usr/pgsql-9.1/bin:$PATH" to /.bashrc but didn't know the right way to do this. Any help on this?

Cheers and thanks in advance

Access PgSQL executables from anywhere in the SO

I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command "pg_dump" for that I need to change from "actual_path" to /usr/pgsql-9.1/bin and then execute as ./pg_dump even if I'm root user. I think in make a symlink for each executable under /usr/pgsql-9.1/bin in /bin but doesn't know if this is the best way. Also I think in add this PATH="/usr/pgsql-9.1/bin:$PATH" to /.bashrc but didn't know the right way to do this. Any help on this?

Cheers and thanks in advance

Access PgSQL executables from anywhere

I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command pg_dump: for that I need to change from (actual path) to /usr/pgsql-9.1/bin and then execute as ./pg_dump even if I'm root user. I think in make a symlink for each executable under /usr/pgsql-9.1/bin in /bin but I don't know if this is the best way. Also I think in add this PATH="/usr/pgsql-9.1/bin:$PATH" to /.bashrc but didn't know the right way to do this. Any help on this?

Source Link
ReynierPM
  • 833
  • 4
  • 13
  • 24

Access PgSQL executables from anywhere in the SO

I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command "pg_dump" for that I need to change from "actual_path" to /usr/pgsql-9.1/bin and then execute as ./pg_dump even if I'm root user. I think in make a symlink for each executable under /usr/pgsql-9.1/bin in /bin but doesn't know if this is the best way. Also I think in add this PATH="/usr/pgsql-9.1/bin:$PATH" to /.bashrc but didn't know the right way to do this. Any help on this?

Cheers and thanks in advance