CentOS Memcached安装系统能提高电脑更方便的使用性能。下面就这就来讲术CentOS Memcached安装。CentOS Linux使用了RHEL的源代码,但是由于这些源代码是Red Hat公司自由发布的,因此CentOS Linux的发布是完全合法的,CentOS Linux的使用者也不会遇到任何的版权问题。CentOS系统上CentOS Memcached安装。
1.CentOS Memcached安装前需要先安装Libevent:
# curl -O http://www.monkey.org/~provos/libevent-1.4.9-stable.tar.gz
# tar zxf libevent-1.4.9-stable.tar.gz
# cd libevent-1.4.9-stable
# ./configure
# make
# make install
2.继续CentOS Memcached安装:
# curl -O http://www.danga.com/memcached/dist/memcached-1.2.7.tar.gz
# tar zxf memcached-1.2.7.tar.gz
# cd memcached-1.2.7
# ./configure
# make
# make install
3.CentOS Memcached安装接着在当前用户的.bash_profile中添加
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
4.CentOS Memcached运行
# memcached -m 512 -u nobody -vv
测试时候发现会出现以下错误信息:
“/usr/local/memcached/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory”
错误的原因是未在系统中注册Libevent. 解决方法如下:
# vi /etc/ld.so.conf.d/libevent-i386.conf
在VI中输入以下一行内容:
/usr/local/lib/
最后不要忘了
# ldconfig
5.CentOS Memcached运行
# memcached -m 512 -u nobody -vv
<6 server listening
<7 server listening
<8 send buffer was 109568, now 268435456
<8 server listening (udp)
<9 send buffer was 109568, now 268435456
<9 server listening (udp)
CentOS Memcached运行正常。
以上介绍CentOS Memcached安装及运行检测。
【编辑推荐】