Installation of CentOS 6.5 deployment memcached

Source: Internet
Author: User

1. Yum Install memcache find memcached

Yum Search memcached

This command can query the Yum Library for memcached installation package information, the following is the search results:

Installing memcached

Yum-y Install memcached

This command is used to install memcached and does not care about dependencies among the individual installation packages. The command execution results are as follows:

(Note: If you perform yum–y install memcached network parsing exception, it is not currently networked, or the DNS server is not configured correctly, if because the DNS is not configured for reasons, you can pass the vi/etc/resolv.conf

Add nameserver 192.98.18.20 (DNS server address) to configure DNS mapping)

Verifying the installation memcached

Memcached–h

> Note: If you do not have the-u root, you will be reported: Can ' t run as root without the-u switch solution: with-u root on the line!

Memcached-u root-h

The main function of the command is to provide memcached help information, which lists the interface and interface parameters of the memcached command. For specific information, refer to:

Modifying the memcached configuration file

Chkconfig--level 2345 memcached on execute this command to add memcached to the Linux service. Once added, you can use commands such as service memcached Start|stop|restart to start, shut down, and restart the memcached service.

Modify memcached parameters, mainly related to memcached start bound port, user, maximum connection, maximum memory, command: vi/etc/sysconfig/memcached command response results such as:

The above parameters can be modified by the VI command. Port, the service startup ports. User, the service starts the users. Maxconn, the service configuration supports the maximum number of connections. CACHESIZE, the maximum memory supported by the service, in M.

Restart memcached Service

After modifying the above parameters, the memcached service needs to be restarted, otherwise the parameters will not be effective immediately. To restart the service, simply execute: Service memcached restart. After the service restarts, you can use Memcached-tool to detect the status of the memcached service.

Using Memcached-tool to detect memcached services

Perform memcached-tool 127.0.0.1:11211 stats to detect memcached service status. If the error is not connected, then the memcached is not properly installed or not started. Execution is normal, as shown in the following:

Reprint: http://www.cnblogs.com/likehua/p/4224066.html

Installation of CentOS 6.5 deployment memcached

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.