add path variable permanently

Hi,

I have added the path variable as below

export LD_LIBRARY_PATH=/opt/oracle/product/1020/ctx/lib:/opt/oracle/product/1020/lib:/usr/openwin/lib:/opt/oracle/product/1020/jdbc/lib:/opt/oracle/product/1020/Apache/jdk/jre/lib/sparc:/opt/oracle/product/1020/jdk/jre/lib/sparc:/usr/openwin/lib:/usr/local/lib:/opt/oracle/product/oas4.0.8/orb/4.0/lib:/opt/oracle/product/oas4.0.8/ows/4.0/lib:/opt/oracle/product/oas4.0.8/ows/4.0/jdk/jre/lib/sparc:/opt/oracle/product/oas4.0.8/ots/1.0/lib:/opt/oracle/product/oas4.0.8/lib:/opt/oracle/product/1020/bin:/opt/oracle/product/1020/lib:/opt/oracle/product/1020/ctx/lib:/opt/app/gp/greenplum-db-6.00.0154/lib:/opt/oracle/product/1020/jdbc/lib:/opt/oracle/product/1020/Apache/jdk/jre/lib/sparc:/opt/oracle/product/1020/jdk/jre/lib/sparc:/opt/app/informatica861/server/bin:/opt/app/netezza465/lib:/opt/app/informatica861/ODBC5.2/lib:/usr/lib:/usr/openwin/lib:/usr/local/lib:/opt/app/gp/gp_driver_4.01/lib:/opt/app/gp/gp_driver_4.01/ext/python/lib:.

After I logout the session and login again, I did not find the changes done earlier.

Can anyone please help me to resolve it.

Thanks,
Burton

---------- Post updated at 05:06 AM ---------- Previous update was at 04:55 AM ----------

To add more detail

  1. Initially it was like below,
LD_LIBRARY_PATH=/opt/oracle/product/1020/ctx/lib
  1. After export the new path,
LD_LIBRARY_PATH=/opt/oracle/product/1020/ctx/lib:/opt/oracle/product/1020/lib:
command :
export LD_LIBRARY_PATH=/opt/oracle/product/1020/ctx/lib:/opt/oracle/product/1020/lib:
  1. After re-logging to the session again it is like
LD_LIBRARY_PATH=/opt/oracle/product/1020/ctx/lib

How to make the changes permanently?

What hardware?
What unix system?

That will determine the login file(s) that could be modified to make this permanent.

SunOS sdc-infoapp1-e3 5.10 Generic_142900-12 sun4v sparc SUNW,SPARC-Enterprise-T5120

Actaully I sudo to a user called crminfo and make the changes.

The value of LD_LIBRARY_PATH at the top of this post is utterly ridiculously long. It contains 22 unique directory paths (most of which contain nothing to do with Oracle) and the following paths are duplicated:

/opt/oracle/product/1020/Apache/jdk/jre/lib/sparc
/opt/oracle/product/1020/jdbc/lib
/opt/oracle/product/1020/jdk/jre/lib/sparc
/opt/oracle/product/1020/lib
/usr/local/lib
/usr/openwin/lib

Have you read the Oracle installation guide for your version of Oracle?

To answer the question about how to make the changes permanent in the account crminfo we need to know what default Shell that user uses. Then the commands (after correction?) go into the user's profile file for their Shell.

Don't forget to set ORACLE_SID .

Hi,

I have made the changes permanently,

For current user, i.e, crminfo there is a .profile file ( ls -la | grep profile)

I have added the path to the .profile file and logged out from the session and logged in to find the changes.

export PATH=$PATH:/new path

Thanks,
Burton

1 Like