The First step: Query memcached Installation resource bundle information
Yun Search memcached
The directive can query the Yum Library for memcached installation package information. As shown in the screenshot below:
Step Two: CentOS Execute installation instructions, install memcached resource bundle
This directive is used to install memcached so that users do not have to worry about dependencies between each installation package. Screenshot below information:
Step Three: Detect whether the memcached server is successfully installed
Memcached-h
Fourth Step: memcached configuration file Information modification
Chkconfig--level 2345 memcached on #执行该命令将memcached加入linux服务.
After you add success, you can use the service memcached Start|stop|restart and other commands to start, shut down, restart the memcached service.
Modify memcached parameters, mainly related to memcached boot bound port, user, maximum connection, maximum memory, etc.
Vi/etc/sysconfig/memcached
Command response results such as screenshot:
The above parameters can be modified by the VI command. Port, service boot ports. User, the service starts users.
Maxconn, the service configuration supports the maximum number of connections. CACHESIZE, the maximum memory supported by the service, in M.
Step Fifth: Restart memcached Modify memcached
Configuration parameters, the memcached service needs to be restarted, otherwise the related parameter information modified will not take effect. Only need to perform: service memcached start
We can check the service status of memcached by using Memcached-tool.
Sixth step: Detect memcached Memcached-tool 192.168.159.128:11211
This instruction mainly realizes the detection memcached service state, if the error, the connection is not on. That means memcached is not installed properly or is not started. As shown in the screenshot below:
memcache server-Side Local installation method: 1. Install Libevent
Tar zxvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure --prefix=/usr
make Make
Install
2. Install memcached
Tar zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5.tar.gz
./configure --with-libevent=/usr
Configure need to add Libevent installation path make make
install
When the installation is complete, the memcached will be placed on the/usr/local/bin/memcached
Start:
/usr/local/bin/memcached-d-M 512-u root- p 11211-c 10000 -m-f 1.1-p