Installation Environment
memcached version:1.4.31
System Environment: CentOS 6.8
because Linux systems are memcached dependent on libevent-dev, so install Libevent-dev First .
Libevent-dev
Connected Network installation:
- Debian/ubuntu: apt-get Install Libevent-dev
- Redhat/centos: yum install Libevent-devel
File Installation:
1, download the installation files. Recommendation:https://pkgs.org/
2. Required installation files include:
libevent-1.4.13-4.el6.x86_64.rpm
libevent-devel-1.4.13-4.el6.x86_64.rpm
libevent-doc-1.4.13-4.el6.noarch.rpm
libevent-headers-1.4.13-4.el6.noarch.rpm
3, switch to root, command:su
4, installation command:RPM-IVH libevent*. Since theheaders,doc, anddevel 3 packages are interdependent, they need to be installed together.
5. exit Root, command:exit
6. Test results, view installed packages, command:rpm-qa | grep libevent
memcached
Connected Network installation:
- Debian/ubuntu: apt-get install memcached
- Redhat/centos: yum install memcached
File Installation:
1. Download installation files: memcached-1.4.31.tar.gz
2. Execute the following commands, configure, edit, test:
TAR-ZXF memcached-1.4.31.tar.gz
CD memcached-1.4.31
./configure--prefix=/usr/local/memcached && make && make test
Although make test errors, ignore the following steps.
3, switch to root, command:su
4. Installation command: make install
5. exit Root, command:exit
6, test results, view memcached Help document, command:/usr/local/memcached/bin/memcached-h
Common Linux commands
Open a memcached service
/usr/local/memcached/bin/memcached-p 11211-d
View the memcahced service that has been opened
Ps-ef | grep memcached | Grep-v grep
See if the port is in use
netstat-a | grep 11211
memcached installation, Linux environment