???? SSI ????????

欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php技巧
???? SSI ????????
首頁 > 網(wǎng)絡(luò)編程 > PHP編程 > php技巧 > linux下編譯安裝memcached服務(wù)

linux下編譯安裝memcached服務(wù)

投稿:hebedich

這篇文章主要介紹了linux下編譯安裝memcached服務(wù),需要的朋友可以參考下

系統(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依賴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)存塊增長的倍數(shù)
    -u nobody 以nobody用戶啟動(dòng)

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

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

您可能感興趣的文章:
閱讀全文
???? SSI ????????
???? SSI ????????