tar -zxf memcached-1.2.8-repcached-2.2.tar.gz
二、编译:
系统应安装了libevent,libevent-1.4.13-stable.tar;
./configure --enable-replication --prefix=/home/taiyue/repcached --with-libevent=/home/taiyue/libevent
报错:checking build system type... Invalid configuration `i686-pc-linux-': machine `i686-pc-linux' not recognized
./configure --enable-replication --build=i686-pc-linux-gnu
报错:configure: error: no acceptable C compiler found in $PATH //缺乏gcc编译器
经过界面进行gcc的安装。
./configure --enable-replication --build=i686-pc-linux-gnu成功以后:make
报错:-bash: make: command not found;须要安装make。
make install(必须使用root才能安装???)
三、运行:
主:/home/taiyue/repcached/bin/memcached -v -d -u usd -p 11211
从:/home/taiyue/repcached/memcached -v -d -u usd -x 127.0.0.1 -p 11213
红色的目录必定要带上,由于使用非root帐户安装的软件没有在系统环境变量地下,于是直接使用memcached命令将提示command not
found。
主宕掉之后重启:
/home/taiyue/repcached/memcached -v -d -u usd -x 127.0.0.1 -p 11211