Take the 2-minute tour ×  We have CentOS with Apache running on
it. Basically, I have a few variables in /etc/environment and
they're passed through to our Apache configs using PassEnv. The
issue is that because Apache is before /etc/environment the
variables are not found.  Is there a similar kind of
/etc/environment file that I can add my global environmental
variables into that is executed before apache (httpd) or do I
have to start editing runlevels?  Kind regards,   share|improve
this question I'm trying to figure this out as well. I'm not
convinced that CentOS uses /etc/environment at all. A search on
redhat.com and a search on RedHat's Kbase returns nothing. – 
Stefan Lasiewski Mar 17 '11 at 21:13  2 Answers 2  If these are
variables which apply to each and every user on the system, then
they should be added in /etc/enviornment - but IIRC this file is
not explicitly parsed by the init scripts.  So you'd need to add
a line in /etc/rc.d/init.d/functions, e.g.  # -*-Shell-script-*-
# functions     This fi