From owner-freebsd-questions@FreeBSD.ORG Wed Jul 27 06:47:12 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BA9916A41F for ; Wed, 27 Jul 2005 06:47:12 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 441C343D45 for ; Wed, 27 Jul 2005 06:47:12 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (cpe-66-27-86-22.san.res.rr.com [66.27.86.22]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id j6R6lAbX021238 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO); Tue, 26 Jul 2005 23:47:11 -0700 Message-Id: <6.1.0.6.2.20050726233906.198d9de0@cobalt.antimatter.net> X-Sender: lists@cobalt.antimatter.net X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Tue, 26 Jul 2005 23:43:07 -0700 To: Lei Sun , freebsd-questions@freebsd.org From: Glenn Dawson In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: Subject: Re: how to run 2 instance of memcached from rc.conf? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2005 06:47:12 -0000 At 11:16 PM 7/26/2005, Lei Sun wrote: >Hi, > >I am trying to run 2 instance of memcached from rc.conf, but whenever >I try to start it the second time, it tells me that the instance is >already running. > >Please help... According to the documentation at http://www.danga.com/memcached running more than one instance on the same machine is only helpful if you have more than 4GB of RAM. To load another instance, you just have to tell it to listen on a different port, or a different IP address (if the machine you're running it one has more than one IP). -Glenn >my rc.conf >-------------------------------------------- >defaultrouter="192.168.0.1" >hostname="aphrodite.us.8po.com" >ifconfig_em0="inet 192.168.0.200 netmask 255.255.255.0" >sshd_enable="YES" >mysql_enable="YES" >mysql_limits="YES" >apache_enable="YES" >memcached_enable="YES" >memcached_flags="-m 1024 -l 127.0.0.1 -p 11211" >----------------------------------------------- > > >my /usr/local/etc/rc.d/memcached.sh >---------------------------------------------- >#!/bin/sh ># > ># PROVIDE: memcached ># REQUIRE: NETWORKING > ># ># Add the following lines to /etc/rc.conf to run memcached: ># ># memcached_enable="YES" ># memcached_flags="" ># >. /etc/rc.subr > >name="memcached" >rcvar=`set_rcvar` >command=/usr/local/bin/memcached >command_args="-du nobody ${memcached_flags}" > >load_rc_config $name >run_rc_command "$1" >-------------------------------------------------- >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"