First, the environment
1. Operating system: Redhat Linux 5.5
2, libevent:libevent-2.0.21-stable.tar.gz
Memcached:memcached-1.4.21.tar.gz
Second, installation
1, because memcached relies on libevent, it is necessary to install Libevent first.
2, the source installation, enter the directory where the installation package, execute the following command:
TAR-ZXVF libevent-2.0.21-stable.tar.gz
Unzip the installation package, then go to the extracted directory and execute the installation command:
./configure--prefix/usr/local/libevent/make Cleanmakemake Install
3, install memcached, execute command:
TAR-ZXVF memcached-1.4.21.tar.gz./configure--prefix/usr/local/memcached/--with-libevent=/usr/local/libevent/ Make Cleanmakemake Install
Note the second command because Memcached relies on libevent, so with the--with-libevent parameter, specify the path where the libevent is located.
Otherwise, an error occurs when you execute the./configure command.
Third, testing
1. Start the memcached daemon process
Enter the memcached installation directory and execute the memcached command:
cd/usr/local/memcached/bin./memcached-d-U Root
You can execute the memcached-h command to view the specific parameter description.
2. Connect using Telnet
telnet localhost 11211stats
If the connection is successful and the statistics appear, the installation succeeds.
Redhat Linux Installation memcached