Install Memcached in CentOS 6.6

Source: Internet
Author: User

Install Memcached in CentOS 6.6

1. Environment Introduction

1) CentOS 6.6

2) memcached-1.4.24

Ii. Deployment and Installation

Specific deployment steps:

Step 1: Install

Step 2: Configure

Step 3: Run

Step 4: Check

Start now:

1) Installation

$ Yum install-y wget gcc

$ Wget http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz

$ Tar zxvf libevent-2.0.21-stable.tar.gz

$ Libevent-2.0.21-stable cd

$./Configure -- prefix =/usr/local/libevent

$ Make & make install

$ Wget http://www.memcached.org/files/memcached-1.4.24.tar.gz

$ Tar zxvf memcached-1.4.24.tar.gz

$ Memcached-1.4.24 cd

$./Configure -- prefix =/usr/local/memcached -- with-libevent =/usr/local/libevent

$ Make & make install

$ Ln-s/usr/local/memcached/bin/memcached/usr/local/bin/

2) Configuration

$ Touch/etc/init. d/memcached

$ Chmod 755/etc/init. d/memcached

$ Vi/etc/init. d/memcached

#! /Bin/sh

#

# Memcached: MemCached Daemon

#

# Chkconfig:-90 25

# Description: MemCached Daemon

#

# Source function library.

./Etc/rc. d/init. d/functions

./Etc/sysconfig/network

Start ()

{

Echo-n $ "Starting memcached :"

Daemon/usr/local/bin/memcached-u daemon-d-m 2048-l 0.0.0.0-c 4096-p 11211

Echo

}

Stop ()

{

Echo-n $ "Shutting down memcached :"

Killproc memcached

Echo

}

[-F/usr/local/bin/memcached] | exit 0

# See how we were called.

Case "$1" in

Start)

Start

;;

Stop)

Stop

;;

Restart | reload)

Stop

Start

;;

Condrestart)

Stop

Start

;;

*)

Echo $ "Usage: $0 {start | stop | restart | reload | condrestart }"

Exit 1

Esac

Exit 0

3) Run

$/Etc/init. d/memcached start

$ Chkconfig memcached on

4) Check

# Check processes and ports

$ Ps aux | grep memcached

$ Netstat-ntlp | grep memcached

$ Echo "stats settings" | nc 127.0.0.1 11211

Memcached installation and startup script

Performance problems of using Memcached in PHP

Install Memcached in Ubuntu and its command explanation

Install and apply Memcached

Use Nginx + Memcached's small image storage solution

Getting started with Memcached

For details about Memcached, click here
Memcached: click here

This article permanently updates the link address:

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.