Install memcached in Linux source code and memcached in linux source code
Basic steps:
1. Download the compressed file (wget File url)
2. Decompress (tar-zxvf file name)
3. configure (./configure -- prefix = installation directory)
4. make compilation (only if step 3 is correct; otherwise, go to step 1)
5. make install installation (after installation, remember to cd to the installation directory to check whether the corresponding file is generated)
6. Clear the temporary files and configuration files generated during installation (make clean & make distclean)
The following are all the commands used during installation.
[Root @ localhost ~] # Mkdir test
[Root @ localhost ~] # Cd test
[Root @ localhost test] # wget http://www.memcached.org/files/memcached-1.4.24.tar.gz
[Root @ localhost test] # tar-zxvf memcached-1.4.24.tar.gz
[Root @ localhost test] # mkdir memcached
[Root @ localhost test] # mkdir libevent
[Root @ localhost test] # wget https://github.com/downloads/libevent/libevent/libevent-1.4.14b-stable.tar.gz
[Root @ localhost test] # tar-zxvf libevent-1.4.14b-stable.tar.gz
[Root @ localhost test] # libevent-1.4.14b-stable cd
[Root@localhostlibevent-1.4.14b-stable] #./configure -- prefix =/root/test/libevent
[Root @ localhost libevent-1.4.14b-stable] # make
[Root @ localhost libevent-1.4.14b-stable] # make install
[Root @ localhost libevent-1.4.14b-stable] # cd ../memcached-1.4.24
[Root @ localhost memcached-1.4.24] #./configure -- prefix =/root/test/memcached -- with-libevent =/root/test/libevent
[Root @ localhost memcached-1.4.24] # make
[Root @ localhost memcached-1.4.24] # make install
[Root @ localhost memcached-1.4.24] # cd ../memcached
[Root @ localhost memcached] # ll
The files in the memcached directory are successfully installed. Note that libevent is required before memcached is installed. The two versions must be consistent. I created a temporary directory for testing, in actual installation, the directory may be/root/local/memcached. You 'd better specify the directory to facilitate management.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.