Before installing memcached, determine if the system has gcc;1 installed, unzip the installation package:
TAR-ZXF memcached-1.2.8-repcached-2.2.tar.gz
2. Compiling:
The system should have Libevent,libevent-1.4.13-stable.tar installed;
--enable-replication--prefix=/home/taiyue/repcached--with-libevent=/home/taiyue/libevent
Error:checking build system Type ... Invalid configuration ' i686-pc-linux-': Machine ' i686-pc-linux ' not recognized
--prefix=/home/usd/repcached--with-libevent=/usr/lib
Error:configure:error:no acceptable C compiler found in $PATH//missing GCC compiler
Installation of GCC through the interface.
./configure--enable-replication--build=i686-pc-linux-gnu after success: make
Error:-bash:make:command not found; need to install make.
Make install ( must use root for installation?? Not the non-root user when compiling the named--prefix installation address, start the time do not directly memcached-。。。 Installation path must be added )
Make Error:error while loading shared Libraries:libmpc.so.2:cannot open Shared object file ....
Add: Export Ld_library_path=/usr/local/mpc-0.8.1/lib
Note: Make the error when
You need to modify the Memcached.c file:
/* FreeBSD 4.x doesn ' t has iov_max exposed. */#ifndef iov_max#if defined (__freebsd__) | | Defined (__apple__) # define Iov_max 1024#endif#endif changed to:/* FreeBSD 4.x doesn ' t have iov_max exposed. */#ifndef iov_max# define Iov_max 1024#endif
3. Operation:
main:/home/taiyue/repcached/bin/memcached-v-d-u usd-p 11211
from:/home/taiyue/repcached/memcached-v-d-u usd-x 127.0.0.1-p 11213
The red directory must be brought in, because the software installed using a non-root account is not under the system environment variable, so the direct use of the memcached command will prompt the
Found
Reboot after main outage:
/home/taiyue/repcached/memcached-v-d-u usd-x 127.0.0.1-p 11211
4, online Many of the parameters of the repcached start understanding is not correct, repcached newly added two parameters-X and x should be so understood:
-X for the ip,-x of the other machine to be listened to is the local copy port () (A and B must have the same copy port on both machines)
For example natively: 133.96.93.107, another machine for 133.96.93.108
so when the 133.96.93.107 starts: memcached-d-v-p 44444-x 133.96.93.108-x 66666
-P represents 133.96.93.107 external service address,-X 133.96.93.108 is the address to listen for replication,-X 66666 declaration to 133.96.93.107 Open this End statement assignment opens the port on the 133.96.93.107 or understands the copy port to be provided by 133.96.93.108 because the port must be the same.
Then 133.96.93.108 start: memcached-d-v-p 44444-x 133.96.93.107-x 66,666 only need to change the parameters of-X
Installation and experiment of repcached Memcache of two machines