????Memcached??????????
???????????
?????? /etc/rc.d/rc.local ???????????????
????/usr/local/memcached/bin/memcached  -u root -d -m 2048 -l 192.168.137.99 -p 11211 -P /tmp/memcached.pid
???????????IP??????????????
????/usr/local/memcached/bin/memcached  -u deamon -d -m 2048 -p 11211 -P /tmp/memcached.pid
??????????? apache ?? deamon
????????????
????#д???????
????vim /etc/init.d/memcached
??????????′???
#!/bin/sh
#
# memcached:    MemCached Daemon
#
# chkconfig:    - 90 25
# description:  MemCached Daemon
#
# Source function library.
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
#[ ${NETWORKING} = "no" ] && exit 0
#[ -r /etc/sysconfig/dund ] || exit 0
#. /etc/sysconfig/dund
#[ -z "$DUNDARGS" ] && exit 0
MEMCACHED="/usr/local/memcached/bin/memcached"
SERVER_IP="192.168.137.98"
SERVER_PORT="11211"
[ -f $MEMCACHED ] || exit 1
start()
{
echo -n $"Starting memcached: "
daemon $MEMCACHED -u daemon -d -m 2048 -l $SERVER_IP -p $SERVER_PORT -P /tmp/memcached.pid
echo
}
stop()
{
echo -n $"Shutting down memcached: "
killproc memcached
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 3
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0