Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed memcached and I want it to run by default on my Fedora LAMP server (Amazon EC2 Instance)

I've set it up in my init script doing the following:

chkconfig --level 4 memcached on

However, I have a bunch of parameters I'd like to set when memcached runs at boot time. Is there a way I can do this through chkconfig, or do I need to use a different approach?

share|improve this question
up vote 1 down vote accepted

First, startup scripts generally only accept 'stop' or 'start' as their only parameter. This is passed by the startup routine as it launches each startup/shutdown script.

The chkconfig, basically puts a symbolic link into the startup directory such that the startup/shutdown routines will look at it.

Thus you cannot pass parameters using this process.

-----preferred method 1

However, the way usually used to setup variable and parameters is to put the parameters into /etc/sysconfig/.

The script usually imports these configuration parameters early on in the execution of the service startup script (via a . /etc/sysconfig/).

---- not perferred method 2

You can edit the startup script that is usually located in /etc/init.d/ to do what you want. The problem with this approach is that if you happen to apply an update it is likely that any changes like this would disappear.


Another approach

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.