environment variable can't set at reboot

uknet80
uknet80 used Ask the Experts™
on
under /etc/rc.local i have set below environment variable, when i restart redhat and essue (echo $KOHA_CONF), it is blank
any idea why is that

(((((((
touch /var/lock/subsys/local

export KOHA_CONF=/etc/koha/koha-conf.xml
export PERL5LIB=/usr/share/koha/lib
(((((
OS: RHEL5 (Red Hat Enterprise Linux Server release 5.4 (Tikanga))
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
It is
 /etc/rc.d/rc.local
Commented:
Generally we export environment variable globally via file.

/etc/profile

Top Expert 2011
Commented:
As root, create /etc/profile.d/koha.sh
---- /etc/profile.d/koha.sh ------
export KOHA_CONF=/etc/koha/koha-conf.xml
export PERL5LIB=/usr/share/koha/lib
--------

chmod +x /etc/profile.d/koha.sh

Author

Commented:
best way was to create create koha.sh under /etc/profile

thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial