?
Solved

Need help to set environment variables

Posted on 2008-01-29
4
Medium Priority
?
1,640 Views
Last Modified: 2013-12-16
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.
0
Comment
Question by:isitdev
  • 3
4 Comments
 
LVL 10

Expert Comment

by:Pétur Ingi Egilsson
ID: 20770289
#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
 

Author Comment

by:isitdev
ID: 20770815
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
 
LVL 10

Accepted Solution

by:
Pétur Ingi Egilsson earned 1000 total points
ID: 20770890
Have you tired to add all that to the bottom of your /etc/profile ? ( note: /etc/profile is for non-root users only )
0
 
LVL 10

Expert Comment

by:Pétur Ingi Egilsson
ID: 20770993
So it worked?
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This installment of Make It Better gives Media Temple customers the latest news, plugins, and tutorials to make their Grid shared hosting experience that much smoother.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month6 days, 17 hours left to enroll

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question