寻觅生命中的那一片浅草......

每日存档 四月 15th, 2010

Using yumdownloader To Download RPM Package Without Installing under CentOS

I would like to make a local yum Repository which only contains rpm packages I need.Copy packages from the CentOS DVD?That can’t resolve dependency problems between packages.We can use yumdownloader to download packages.

1、create directory to store packages
#mkdir /media/CentOS

2、install yum-utils which provides yumdownloader
#yum -y install yum-utils

3、download packages,–reolve option will resolve dependencies and download required packages
#cd /media/CentOS
#yumdownloader –resolve rsync telnet vixie-cron

memcached start error:event_queue_remove

I configure Nginx+MySQL+PHP+Memcached enviroment.I use my script to start memcached,then I type “netstat -tlnp” to see if memcached listens on 11211,I can see 11211,but when I type “netstat -tlnp” again,the 11211 port has disappeared.I type this command manually:

/usr/local/bin/memcached -m 128 -c 4096 -p 11211 -u www -t 10

It runs about three seconds,and then crash.the only message logged is:

[err] event_queue_remove: 0x60cfc0(fd -1) not on queue 1

I search “event_queue_remove” in Google. Some guys guess that there is something wrong with libevent.

I type LD_DEBUG=libs /usr/local/bin/memcached -m 128 -c 4096 -p 11211 -u www -t 10

The output of libevent is :
6283: calling init: /usr/lib64/libevent-1.1a.so.1

this shows that the version of libevent is “libevent-1.1a”,but the one I install from source code is “libevent-1.4.9-stable”.

rpm -qa |grep libevent
the result is :
libevent-devel-1.1a-3.2.1
libevent-1.1a-3.2.1
libevent-devel-1.1a-3.2.1
libevent-1.1a-3.2.1

Oh,my god,there is an old version libevent installed by rpm.I uninstall libevent with “yum -y remove libevent libevent-devel”,reinstall memcached,then memcached start normally.

Reference articles:http://www.serverphorums.com/read.php?9,108005

2010年四月
« 3月   5月 »
 1234
567891011
12131415161718
19202122232425
2627282930