溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

怎么在linux系統(tǒng)中安裝memcached服務(wù)

發(fā)布時(shí)間:2021-02-24 17:03:19 來(lái)源:億速云 閱讀:142 作者:Leah 欄目:開(kāi)發(fā)技術(shù)

這篇文章給大家介紹怎么在linux系統(tǒng)中安裝memcached服務(wù),內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。

系統(tǒng):Ubuntu 13.10
第一步:安裝libevent-dev

$aptitude search libevent-dev
$aptitude install libevent-dev

第二步:下載memcached并安裝
官網(wǎng)地址:http://memcached.org/

$wget -c http://www.memcached.org/files/memcached-1.4.17.tar.gz
$tar -zxvf memcached-1.4.17.tar.gz
$cd memcached-1.4.17
$./configure --prefix=/usr/local/memcached
$ make
$ sudo make install

第三步:啟動(dòng)memcached

$cd /usr/local/memcached
$./memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 -P /tmp/memcached.pid

第三步:檢查是否安裝成功

$ps -aux | grep memcache #法1
$netstat -antu | grep 11211 #法2
$telnet localhost 11211 #法3

常用命令
啟動(dòng)memcached服務(wù)

#./memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 -P /tmp/memcached.pid

關(guān)閉memcached服務(wù)

#kill `cat /tmp/memcached.pid`

下面是其它網(wǎng)友的補(bǔ)充:

1、安裝memcached

memcached依賴(lài)libevent可以編譯安裝也可以使用系統(tǒng)自帶
tar -zxvf memcached-1.4.21.tar.gz
cd memcached-1.4.21
./configure –prefix=/usr/local/memcached –with-libevent=/usr
make && make install

2、啟動(dòng)memcached

/usr/local/memached/bin/memcached -d -m 128 -n 20 -f 1.25 -u nobody
    -d  以后臺(tái)守護(hù)進(jìn)程方式啟動(dòng)
    -m 128 最大使用128MB內(nèi)存
    -n  20 指定內(nèi)存塊大小為20字節(jié)
    -f 1.25  設(shè)定內(nèi)存塊增長(zhǎng)的倍數(shù)
    -u nobody 以nobody用戶(hù)啟動(dòng)

3、使用memadmin進(jìn)行監(jiān)控管理

memadmin-1.0.12.tar.gz
直接解壓安裝包到php程序目錄,可以通過(guò)頁(yè)面進(jìn)行訪(fǎng)問(wèn)

怎么在linux系統(tǒng)中安裝memcached服務(wù)

怎么在linux系統(tǒng)中安裝memcached服務(wù)

關(guān)于怎么在linux系統(tǒng)中安裝memcached服務(wù)就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI