how to set LIBPATH environment variable for root and bjpadm? - aix

where to set both "libpath" environment variables for root and bjpadm? my libpath they sent me is LIBPATH=/usr/lib:/lib:/usr/sap/BJP/SYS/exe/run:/usr/sap/BJP/SYS/exe/uc/rs6000_64:/oracle/client/11x_64/instantclient so how do i set up this or what file should I edit?

/etc/profile would be an option. You might try and make it human readable though:
export SAPEXEDIR=/usr/sap/BJP/SYS/exe
export ORACLE_HOME=/oracle/client/11x_64/instantclient
export LIBPATH=/usr/lib:$SAPEXEDIR/run:$SAPEXEDIR/uc/rs6000_64:$ORACLE_HOME

I would suggest /etc/environment. On AIX, variables like PATH and LIBPATH are appropriate to set there.

In addition to above answer I would advice to put the LIBPATH in each users .profiles if you only need this to be set for root and bjpadm.
/etc/environment and /etc/profile are system wide, and affect all users.

Related

Configure jboss AS7 to use multiple modules dirs

Is it possible (and if: how?) to set up JBoss AS7 to use his own modules dir and an additional custom modules.custom at the same time? If so, I would not have to mix my custom entries with the default entries.
you can do that by setting JBOSS_MODULEPATH env variable to include more than just your folder.
For instance configuration like this
set JBOSS_MODULEPATH=%JBOSS_HOME%/modules;/path/to/my/modules
it would add /path/to/my/modules to path of modules. But just make sure you still keep default folder in your module path.
for more you can take a look at standalone.sh/bat and look how this variable is used.
(if you are on mac or unix, use export and colons)
export JBOSS_MODULPATH=$JBOSS_HOME/modules:/path/to/my/modules

How to set variables on CVS

I've been tasked with logging into a cvs repository hosted by someone else. I do not know much about cvs. I am supposed to change so option under my .cshrc file, such as:
setenv CVSEDITOR
setenv CVSROOT
setenv CVS_RSH
I am using bash on Mac OSX and I believe I found a file called csh.cshrc, but I cannot edit it and I'm not even sure if that is the correct file I am looking for. Thanks for any help you can offer.
This question isn't really specific to CVS. It's about setting environment variables. The file .cshrc is for the C shell. Given that you said you are using bash, the file you need is .bashrc in your home directory.
At it's simplest, you can set the relevant environment variables like so:
export CVSEDITOR=...
export CVSROOT=...
export CVS_RSH=...
Those are probably the only ones you will need, but you should refer to the full list if you want something more.

Setting environment variables in Rails

I'm trying to make my project OSS, and I'd like to remove any sensitive info from the configs. I'm trying to have ENV['DB_PASS'] = mypassword. Where would I set this? I've tried export DB_PASS=mypassword in my .bashrc file. But that's not working.
Are you sure export isn't working? Have you tried echo $DB_PASS? (Also, changes to .bashrc won't take effect until the next time you log in.)
A more common way to handle this problem is to create a separate config file that is not tracked in your repository, and then provide a config.sample file demonstrating the common configuration options but with dummy values.

How do I configure Mercurial to use environment variables in mercurial.ini

How can I modify the mercurial.ini file to include an environment variable such as %userprofile%.
Specific situation:
I am learning to use Mercurial. I have modified the [ui] section of Mercurial.ini (in my home path) to include:
ignore = c:\users\user\.hgignore
Where user is my username literal. The .hgignore file includes filename filters that are used to ignore files during commit. How can I alter it from being the a literal user to an environment variable $user?
It won't interpolate environment variables in the hgrc, but I do believe that tilda expands to your home/profile directory correctly even on windows.
So:
ignore = ~/.hgignore
should work on windows and elsewhere (even the slashes get spun the wrong way automatically for you).
For other variables you'd need to get a little tricker and write a batch/cmd file that does the interpolation in advance and then hands the result off to mercurial for processing.
The mercurial.ini parses the environment variables just fine.
From my mercurial.ini:
[ui]
ignore = %USERPROFILE%/.hgignore
Works like a charm. Windows 7 Ultimate x64, Mercurial 1.5 (binary installation). The hgignore file is honored both my the command line hg.exe, and tortoiseHG.

Error When Using Make

I'm learning Objective-C using GNUStep in my Windows(Cygwin) and i have two files, one source and one make file:
include $(GNUSTEP_MAKEFILES)/common.make
APP_NAME = HelloWorld
HelloWorld_HEADERS =
HelloWorld_OBJC_FILES = main.m
HelloWorld_RESOURCE_FILES =
include $(GNUSTEP_MAKEFILES)/application.make
But when i run make in the directory i'm getting this errors:
GNUmakefile:1: /common.make: No such file or directory
GNUmakefile:8: /application.make: No such file or directory
make: *** No rule to make target `/application.make'. Stop.
What is wrong?
The GNUSTEP_MAKEFILES variable needs to be set to point to the directory
that has that commmon.make file in it.
K
You haven't set the value of the GNUSTEP_MAKEFILES variable. You have two ways to achieve this:
Use an environment variable: export GNUSTEP_MAKEFILES=/the/path/you/want.
Set it directly in the Makefile: put a line GNUSTEP_MAKEFILES = /the/path/you/want in the Makefile somewhere before you use it.
Debian Linux provides /usr/share/GNUstep/Makefiles/GNUstep.sh script that sets and exports all the appropriate GNUSTEP_* environment variables. Perhaps there is something similar in your Windows GNUstep distribution package?