Need help to set environment variables

Hi,

       We have a custom application running on our RHEL 4 machines. The app works with apache 2.2. What i am trying to do is set the environment variable for the application at boot. As of yet i have only been able to get them to work for root users.  As well using the envvars file, it does work when using the apachectl script, but only for root users. If you try to start apache using sudo, it doesnt load them.

I need these variable to load for every user and to be loaded when using httpd to start/stop apache.
I hope my question isn't to confusing, without seeing what the actual issue is.
isitdevAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
#Add this to the end of your /etc/profile
#this will add /your/path to PATH of every user.

PATH=$PATH:/your/path
export PATH

0
isitdevAuthor Commented:
I have tried this but the paths use variables. as shown below. I'd like these to be set system wide at boot.

NETE_WA_ROOT=/apps/siteminder/webagent
export NETE_WA_ROOT
NETE_WA_PATH=${NETE_WA_ROOT}/bin
export NETE_WA_PATH

LD_LIBRARY_PATH=${NETE_WA_ROOT}/bin:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

PATH=${NETE_WA_PATH}:${PATH}
export PATH
0
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
Have you tired to add all that to the bottom of your /etc/profile ? ( note: /etc/profile is for non-root users only )
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
So it worked?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.