Linux 伺服器 安裝 memcached,linuxmemcached

來源:互聯網
上載者:User

Linux 伺服器 安裝 memcached,linuxmemcached
一、memcached的安裝

1、下載 memcached-1.4.33.tar.gz、libevent-2.0.22-stable.tar.gz

  安裝 memcached 依賴  libevent

2、安裝 libevent

a、解壓 [root@iZ28b4kreuaZ webserver]# tar zxvf libevent-2.0.22-stable.tar.gz

b、安裝在 /usr/local/下

進入解壓目錄下:[root@iZ28b4kreuaZ libevent-2.0.22-stable]# ./configure --prefix=/usr/local/libevent

c、編譯並安裝 [root@iZ28b4kreuaZ libevent-2.0.22-stable]# make && make install

3、安裝memcached

a、解壓 [root@iZ28b4kreuaZ webserver]# tar zxvf memcached-1.4.33.tar.gz

b、安裝在 /usr/local/下

  進入解壓目錄下 [root@iZ28b4kreuaZ memcached-1.4.33]# ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent

c、編譯並安裝 [root@iZ28b4kreuaZ memcached-1.4.33]# make && make install

d、查看安裝目錄

表示安裝成功。

二、memcached基本操作

1、啟動 memcached

[root@iZ28b4kreuaZ memcached]# bin/memcached -d -u root -p 11211 -c 1024

-d:memcached作為後台進程運行

-u: 指定當前是root使用者

-p:指定連接埠 11211 是memcached的預設連接埠號碼

-c:最大支援的串連數

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.