Take the 2-minute tour ×

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
add comment

1 Answer

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
add comment

Your Answer


