Welcome! Log In Create A New Profile

Advanced

Memcached installation on CentOS

Posted by MarkB 
MarkB
Memcached installation on CentOS
September 21, 2010 12:20AM
I have a need for memcached on a server that is running CentOS. I
tried building and installing both libevent (version 1.4.14) and
memcached (version 1.4.5) from source, but I can't get it to work.
Make and 'make install' finish without errors, but 'make test' gives
me quite a few errors. To a layman those errors appear quite
uninsightful.

When someone else I work with does the same (on a Windows with cygwin
system) from the same source, the tests run with success.

Is there something particular for CentOS that needs to be done to make
it work?

Any help would be greatly appreciated.

Mark
Paul Lindner
Re: Memcached installation on CentOS
September 21, 2010 12:20AM
Which version of CentOS?

If you're running the latest version you can use the EPEL version of
memcached:

http://fedoraproject.org/wiki/EPEL


On Mon, Sep 20, 2010 at 3:06 PM, MarkB <[email protected]> wrote:

> I have a need for memcached on a server that is running CentOS. I
> tried building and installing both libevent (version 1.4.14) and
> memcached (version 1.4.5) from source, but I can't get it to work.
> Make and 'make install' finish without errors, but 'make test' gives
> me quite a few errors. To a layman those errors appear quite
> uninsightful.
>
> When someone else I work with does the same (on a Windows with cygwin
> system) from the same source, the tests run with success.
>
> Is there something particular for CentOS that needs to be done to make
> it work?
>
> Any help would be greatly appreciated.
>
> Mark
>



--
Paul Lindner -- lindner@inuus.com -- linkedin.com/in/plindner
Aaron Fleming
Re: Memcached installation on CentOS
September 21, 2010 03:40AM
Hi Mark, what CentOS release are you using? On 5.4, I've run Memcached with no trouble.

This might help..

1. Install GCC

sudo yum install gcc build-essential

2. Install libevent:

cd /usr/local/src

sudo wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz

sudo tar -xvf libevent-1.4.13-stable.tar.gz

cd libevent-1.4.13-stable

../configure

make

sudo make install

Lastly, create a symlink to libevent:

sudo ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib

3. Install MemCached

cd /usr/local/src

sudo wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz

sudo tar xzvf memcached-1.4.5.tar.gz

cd memcached-1.4.5

../configure

make

sudo make install

4. Start MemCached

memcached -d -m 1536 -p 11211 -u nobody

Additional information can be retrieved by adding:
-v Be verbose during the event loop; print out errors and warnings.
-vv Be even more verbose; same as -v but also print client commands and responses.

5. Verify that memcached starts:

telnet localhost 11211

stats
Troubleshooting


1. Log into a node and check if Memcached is running:
ps aux | grep memcached

The results should appear similar to this:

31724_01 6440 0.0 0.4 64168 10304 ? Ssl 10:53 0:00 memcached -d -m 1536 -p 11211 -u nobody -v

2. From any web server telnet into each Memcached node on port 11211.

telnet 10.122.21.70 11211

If Memcached is running, you will connect quickly and see a blank screen. Type the word stats and hit enter. That will show you an overview of current Memcached statistics.

STAT pid 29742
STAT uptime 3180
STAT time 1274886917
STAT version 1.4.5
STAT pointer_size 32
STAT rusage_user 0.000999
STAT rusage_system 0.002999
STAT curr_connections 10
STAT total_connections 49
STAT connection_structures 11
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT get_hits 0
STAT get_misses 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 7
STAT bytes_written 0
STAT limit_maxbytes 1610612736
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT evictions 0
STAT reclaimed 0
END

Type quit and hit enter to return to the command prompt.

3. Log into a Memcached node and enter the following command:
echo stats | nc localhost 11211

If Memcached stats are not returned, ensure Memcached is running by issuing hte command in bullet point #1: ps aux | grep memcached
4. Restart Memcached
Stop by typing: pkill memcached
Start by typing: memcached -d -m 1536 -p 11211 -u nobody

5. Additional Memcached stats information:
http://lzone.de/articles/memcached.htm




On 2010-09-20, at 6:13 PM, Paul Lindner <[email protected]> wrote:

> Which version of CentOS?
>
> If you're running the latest version you can use the EPEL version of memcached:
>
> http://fedoraproject.org/wiki/EPEL
>
>
> On Mon, Sep 20, 2010 at 3:06 PM, MarkB <[email protected]> wrote:
> I have a need for memcached on a server that is running CentOS. I
> tried building and installing both libevent (version 1.4.14) and
> memcached (version 1.4.5) from source, but I can't get it to work.
> Make and 'make install' finish without errors, but 'make test' gives
> me quite a few errors. To a layman those errors appear quite
> uninsightful.
>
> When someone else I work with does the same (on a Windows with cygwin
> system) from the same source, the tests run with success.
>
> Is there something particular for CentOS that needs to be done to make
> it work?
>
> Any help would be greatly appreciated.
>
> Mark
>
>
>
> --
> Paul Lindner -- lindner@inuus.com -- linkedin.com/in/plindner
Mark Boon
Re: Memcached installation on CentOS
September 21, 2010 06:50AM
Hello Aaron Fleming,

Thank you for the elaborate response. I am running CentOS 5.4 indeed.

When I follow the steps you outline to the letter, then when I try to
run memcached is tells me it cannot load the shared library
libevent-1.4.so.2. When instead I use yum to install libevent (with
yum install libevent) memcached does appear to work. When I telnet to
it and type stats I get the same list you sent me.

However, if in the src directory of memcached I type 'make test' I get
lots of errors. And when I try to use memcached in combination with
Tomcat it doesn't work.

Are you able to run 'make test' successfully?

Mark Boon


On Mon, Sep 20, 2010 at 12:30 PM, Aaron Fleming <[email protected]> wrote:
> Hi Mark, what CentOS release are you using? On 5.4, I've run Memcached with
> no trouble.
> This might help..
>
> 1. Install GCC
>
> sudo yum install gcc build-essential
>
> 2. Install libevent:
>
> cd /usr/local/src
> sudo wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
> sudo tar -xvf libevent-1.4.13-stable.tar.gz
> cd libevent-1.4.13-stable
> ./configure
> make
> sudo make install
>
> Lastly, create a symlink to libevent:
>
> sudo ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib
>
> 3. Install MemCached
>
> cd /usr/local/src
> sudo wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
> sudo tar xzvf memcached-1.4.5.tar.gz
> cd memcached-1.4.5
> ./configure
> make
> sudo make install
>
> 4. Start MemCached
>
> memcached -d -m 1536 -p 11211 -u nobody
>
> Additional information can be retrieved by adding:
>
> -v   Be verbose during the event loop; print out errors and warnings.
> -vv  Be even more verbose; same as -v but also print client commands and
> responses.
>
> 5. Verify that memcached starts:
>
> telnet localhost 11211
> stats
>
> Troubleshooting
>
> 1. Log into a node and check if Memcached is running:
>
> ps aux | grep memcached
>
> The results should appear similar to this:
>
> 31724_01  6440  0.0  0.4  64168 10304 ?        Ssl  10:53   0:00 memcached
> -d -m 1536 -p 11211 -u nobody -v
>
> 2. From any web server telnet into each Memcached node on port 11211.
>
> telnet 10.122.21.70 11211
>
> If Memcached is running, you will connect quickly and see a blank screen.
> Type the word stats and hit enter. That will show you an overview of current
> Memcached statistics.
>
> STAT pid 29742
> STAT uptime 3180
> STAT time 1274886917
> STAT version 1.4.5
> STAT pointer_size 32
> STAT rusage_user 0.000999
> STAT rusage_system 0.002999
> STAT curr_connections 10
> STAT total_connections 49
> STAT connection_structures 11
> STAT cmd_get 0
> STAT cmd_set 0
> STAT cmd_flush 0
> STAT get_hits 0
> STAT get_misses 0
> STAT delete_misses 0
> STAT delete_hits 0
> STAT incr_misses 0
> STAT incr_hits 0
> STAT decr_misses 0
> STAT decr_hits 0
> STAT cas_misses 0
> STAT cas_hits 0
> STAT cas_badval 0
> STAT auth_cmds 0
> STAT auth_errors 0
> STAT bytes_read 7
> STAT bytes_written 0
> STAT limit_maxbytes 1610612736
> STAT accepting_conns 1
> STAT listen_disabled_num 0
> STAT threads 4
> STAT conn_yields 0
> STAT bytes 0
> STAT curr_items 0
> STAT total_items 0
> STAT evictions 0
> STAT reclaimed 0
> END
>
> Type quit and hit enter to return to the command prompt.
>
> 3. Log into a Memcached node and enter the following command:
>
> echo stats | nc localhost 11211
>
> If Memcached stats are not returned, ensure Memcached is running by issuing
> hte command in bullet point #1: ps aux | grep memcached
>
> 4. Restart Memcached
>
> Stop by typing: pkill memcached
> Start by typing: memcached -d -m 1536 -p 11211 -u nobody
>
> 5. Additional Memcached stats information:
> http://lzone.de/articles/memcached.htm
>
>
>
>
> On 2010-09-20, at 6:13 PM, Paul Lindner <[email protected]> wrote:
>
> Which version of CentOS?
> If you're running the latest version you can use the EPEL version of
> memcached:
> http://fedoraproject.org/wiki/EPEL
>
> On Mon, Sep 20, 2010 at 3:06 PM, MarkB <[email protected]> wrote:
>>
>> I have a need for memcached on a server that is running CentOS. I
>> tried building and installing both libevent (version 1.4.14) and
>> memcached (version 1.4.5) from source, but I can't get it to work.
>> Make and 'make install' finish without errors, but 'make test' gives
>> me quite a few errors. To a layman those errors appear quite
>> uninsightful.
>>
>> When someone else I work with does the same (on a Windows with cygwin
>> system) from the same source, the tests run with success.
>>
>> Is there something particular for CentOS that needs to be done to make
>> it work?
>>
>> Any help would be greatly appreciated.
>>
>>    Mark
>
>
>
> --
> Paul Lindner -- lindner@inuus.com -- linkedin.com/in/plindner
>
Aaron Fleming
Re: Memcached installation on CentOS
September 21, 2010 03:40PM
What are the errors from make test?

On Mon, Sep 20, 2010 at 10:15 PM, Mark Boon <[email protected]>wrote:

> Hello Aaron Fleming,
>
> Thank you for the elaborate response. I am running CentOS 5.4 indeed.
>
> When I follow the steps you outline to the letter, then when I try to
> run memcached is tells me it cannot load the shared library
> libevent-1.4.so.2. When instead I use yum to install libevent (with
> yum install libevent) memcached does appear to work. When I telnet to
> it and type stats I get the same list you sent me.
>
> However, if in the src directory of memcached I type 'make test' I get
> lots of errors. And when I try to use memcached in combination with
> Tomcat it doesn't work.
>
> Are you able to run 'make test' successfully?
>
> Mark Boon
>
>
> On Mon, Sep 20, 2010 at 12:30 PM, Aaron Fleming <[email protected]>
> wrote:
> > Hi Mark, what CentOS release are you using? On 5.4, I've run Memcached
> with
> > no trouble.
> > This might help..
> >
> > 1. Install GCC
> >
> > sudo yum install gcc build-essential
> >
> > 2. Install libevent:
> >
> > cd /usr/local/src
> > sudo wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gzhttp://www.monkey.org/%7Eprovos/libevent-1.4.13-stable.tar.gz
> > sudo tar -xvf libevent-1.4.13-stable.tar.gz
> > cd libevent-1.4.13-stable
> > ./configure
> > make
> > sudo make install
> >
> > Lastly, create a symlink to libevent:
> >
> > sudo ln -s /usr/local/lib/libevent-1.4.so.2 /usr/lib
> >
> > 3. Install MemCached
> >
> > cd /usr/local/src
> > sudo wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
> > sudo tar xzvf memcached-1.4.5.tar.gz
> > cd memcached-1.4.5
> > ./configure
> > make
> > sudo make install
> >
> > 4. Start MemCached
> >
> > memcached -d -m 1536 -p 11211 -u nobody
> >
> > Additional information can be retrieved by adding:
> >
> > -v Be verbose during the event loop; print out errors and warnings.
> > -vv Be even more verbose; same as -v but also print client commands and
> > responses.
> >
> > 5. Verify that memcached starts:
> >
> > telnet localhost 11211
> > stats
> >
> > Troubleshooting
> >
> > 1. Log into a node and check if Memcached is running:
> >
> > ps aux | grep memcached
> >
> > The results should appear similar to this:
> >
> > 31724_01 6440 0.0 0.4 64168 10304 ? Ssl 10:53
> 0:00 memcached
> > -d -m 1536 -p 11211 -u nobody -v
> >
> > 2. From any web server telnet into each Memcached node on port 11211.
> >
> > telnet 10.122.21.70 11211
> >
> > If Memcached is running, you will connect quickly and see a blank screen.
> > Type the word stats and hit enter. That will show you an overview of
> current
> > Memcached statistics.
> >
> > STAT pid 29742
> > STAT uptime 3180
> > STAT time 1274886917
> > STAT version 1.4.5
> > STAT pointer_size 32
> > STAT rusage_user 0.000999
> > STAT rusage_system 0.002999
> > STAT curr_connections 10
> > STAT total_connections 49
> > STAT connection_structures 11
> > STAT cmd_get 0
> > STAT cmd_set 0
> > STAT cmd_flush 0
> > STAT get_hits 0
> > STAT get_misses 0
> > STAT delete_misses 0
> > STAT delete_hits 0
> > STAT incr_misses 0
> > STAT incr_hits 0
> > STAT decr_misses 0
> > STAT decr_hits 0
> > STAT cas_misses 0
> > STAT cas_hits 0
> > STAT cas_badval 0
> > STAT auth_cmds 0
> > STAT auth_errors 0
> > STAT bytes_read 7
> > STAT bytes_written 0
> > STAT limit_maxbytes 1610612736
> > STAT accepting_conns 1
> > STAT listen_disabled_num 0
> > STAT threads 4
> > STAT conn_yields 0
> > STAT bytes 0
> > STAT curr_items 0
> > STAT total_items 0
> > STAT evictions 0
> > STAT reclaimed 0
> > END
> >
> > Type quit and hit enter to return to the command prompt.
> >
> > 3. Log into a Memcached node and enter the following command:
> >
> > echo stats | nc localhost 11211
> >
> > If Memcached stats are not returned, ensure Memcached is running by
> issuing
> > hte command in bullet point #1: ps aux | grep memcached
> >
> > 4. Restart Memcached
> >
> > Stop by typing: pkill memcached
> > Start by typing: memcached -d -m 1536 -p 11211 -u nobody
> >
> > 5. Additional Memcached stats information:
> > http://lzone.de/articles/memcached.htm
> >
> >
> >
> >
> > On 2010-09-20, at 6:13 PM, Paul Lindner <[email protected]> wrote:
> >
> > Which version of CentOS?
> > If you're running the latest version you can use the EPEL version of
> > memcached:
> > http://fedoraproject.org/wiki/EPEL
> >
> > On Mon, Sep 20, 2010 at 3:06 PM, MarkB <[email protected]> wrote:
> >>
> >> I have a need for memcached on a server that is running CentOS. I
> >> tried building and installing both libevent (version 1.4.14) and
> >> memcached (version 1.4.5) from source, but I can't get it to work.
> >> Make and 'make install' finish without errors, but 'make test' gives
> >> me quite a few errors. To a layman those errors appear quite
> >> uninsightful.
> >>
> >> When someone else I work with does the same (on a Windows with cygwin
> >> system) from the same source, the tests run with success.
> >>
> >> Is there something particular for CentOS that needs to be done to make
> >> it work?
> >>
> >> Any help would be greatly appreciated.
> >>
> >> Mark
> >
> >
> >
> > --
> > Paul Lindner -- lindner@inuus.com -- linkedin.com/in/plindner
> >
>
Sorry, only registered users may post in this forum.

Click here to login