Installation steps for Linux under Memcached

Source: Internet
Author: User

first, the installation of GCC
# yum-y Install GCC

Second, installation libevent
# wget http://www.monkey.org/~provos/libevent-2.0.12-stable.tar.gz
# tar zxf libevent-2.0.12-stable.tar.gz
# CD Libevent-2.0.12-stable
#./configure --prefix=/usr/local/lib
# make && make install

Third, install make
# yum-y Install make

Iv. Download and install the latest version: Http://memcached.org/downloads
# wget http://memcached.org/files/memcached-1.4.20.tar.gz

# CD memcached-1.4.20

#./configure--prefix=/usr/local/memcached--with-libevent=/usr/local/lib && make && make install


V. Configuration startup

# vi/etc/rc.local

#!/bin/sh
#
# This script is executed *after* all and the other init scripts.
# can put your own initialization stuff in here if you don ' t
# want to does the full Sys V style init stuff.
Touch/var/lock/subsys/local

/usr/sbin/ntpdate ntpupdate.tencentyun.com >/dev/null 2>&1 &
/usr/local/agenttools/agent/startagent.sh/usr/local/agenttools/agent/dev/null

#secu-tcs-agent Bootstart, install at Tue APR 17:21:38 CST 2014.
/usr/local/sa/agent/secu-tcs-agent-mon-safe.sh >/dev/null 2>&1

/usr/local/memcached/bin/memcached-p 12677-u 0-d-r-u root-m 2040-c 1024-t 4


Quit after saving, start service manually

#/usr/local/memcached/bin/memcached-p 12677-u 0-d-r-u root-m 2040-c 1024-t 4

Note: If the/usr/local/memcached/bin/memcached:error while loading shared libraries:libevent-2.0.so.5:cannot open shared Object File:no such file or directory exception in/etc/ld.so.conf add/usr/local/lib this line, save, then run:/sbin/ldconfig–v update the configuration.

# vi/etc/ld.so.conf

#/sbin/ldconfig-v

VI. Test memcached

# telnet 127.0.0.1 12677

The following message appears indicating a successful start
Trying 127.0.0.1 ...
Connected to 127.0.0.1.
Escape character is ' ^] '.

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.