How can I do this? Im running RedHat x86_64 es5. I heard that a cron job is possible, and some other people talk about a script?
Note that my linux server knowledge is very limit, so please be thorough if you will kindly assist me.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
chkconfig --level 2345 memcached on
It is possible, that the --level bit isn't required, but does give finer control
chkconfig memcached on
should work too..
The first one will turn memcached on (ie, start the daemon) whenever runlevels 2,3,4,5 are entered. i.e. startup.
This assumes that /etc/init.d/memcached is in the right place, but if you installed it from packages, it should be fine.
A few options...First, cron is not the place for this.
If you have installed memcached from source (which there is little reason to do unless you have some very specific need), you can either:
chkconfig --add memcached chkconfig memcached on
In my opinion, the best and simplest option is to install the memcached package from the EPEL repository with yum, in which case, you run the chkconfig command above to enable it at start up. With the EPEL packages, you will edit /etc/sysconfig/memcached to control the memcached bucket settings instead of calling the memcached binary with parameters directly.