Linux下安裝memecache快取程式

2022-03-27 23:00:28 字數 3310 閱讀 9703

memcache是乙個高效能的分布式的記憶體物件快取系統,通過在記憶體裡維護乙個統一的巨大的hash表,它能夠用來儲存各種格式的資料.簡單的說就是將資料呼叫到記憶體中,然後從記憶體中讀取,從而大大提高讀取速度。

安裝平台:centos4.7虛擬機器

環境:mysql+apache+php5

所用到的安裝包:

libevent安裝:

[root@localhost soft]# tar -zxf libevent-2.0.19-stable.tar.gz

[root@localhost soft]]# cd libevent-2.0.19-stable

[root@localhost libevent-2.0.19-stable]# ./configure --prefix=/usr

[root@localhost libevent-2.0.19-stable]# make

[root@localhost libevent-2.0.19-stable]# make install

安裝後使用ls -al /usr/lib |grep libevent檢視一下是否存在libevent。
memcache安裝:

[root@localhost soft]# tar -zxf memcached-1.4.15

.tar.gz

[root@localhost soft]]# cd memcached-1.4.15

[root@localhost memcached-1.4.15]# ./configure --with-libevent=/usr/[root@localhost memcached-1.4.15]# make && make install

驗證memcached是否安裝成功:

[root@localhost memcached-1.4.15]# ls -al /usr/local/bin/mem*

-rwxr-xr-x 1 root root 244827

11-05

21:45 /usr/local/bin/memcached

[root@localhost memcached-1.4.15

]# which memcached

/usr/local/bin/memcached

[root@localhost memcached-1.4.15]#

啟動memcache:

[root@localhost bin]# memcached -d -u root    //

開啟memcache命令

[root@localhost bin]# netstat -anp //

檢視memcache的預設埠11211是否啟動

active internet connections (servers and established)

proto recv-q send-q local address foreign address state pid/program name

tcp 00

0.0.0.0:3306

0.0.0.0:* listen 8031/mysqld

tcp 00

0.0.0.0:11211

0.0.0.0:* listen 20849/memcached

通過telnet連線memcache:

[root@localhost bin]# telnet 127.0.0.1 11211

trying 127.0.0.1...

connected to localhost (127.0.0.1).

escape character is '^]'.

stats

stat pid 20849

stat uptime 182

stat time 1352123775

stat version 1.4.15

stat libevent 2.0.19-stable

stat pointer_size 32

stat rusage_user 0.000000

stat rusage_system 0.005999

stat curr_connections 10

stat total_connections 11

stat connection_structures 11

stat reserved_fds 20

stat cmd_get 0

stat cmd_set 0

stat cmd_flush 0

stat cmd_touch 0

stat get_hits 0

stat get_misses 0

stat delete_misses 0

stat delete_hits 0

stat incr_misses 0

stat incr_hits 0

stat decr_misses 0

stat decr_hits 0

stat cas_misses 0

stat cas_hits 0

stat cas_badval 0

stat touch_hits 0

stat touch_misses 0

stat auth_cmds 0

stat auth_errors 0

stat bytes_read 7

stat bytes_written 0

stat limit_maxbytes 67108864

stat accepting_conns 1

stat listen_disabled_num 0

stat threads 4

stat conn_yields 0

stat hash_power_level 16

stat hash_bytes 262144

stat hash_is_expanding 0

stat bytes 0

stat curr_items 0

stat total_items 0

stat expired_unfetched 0

stat evicted_unfetched 0

stat evictions 0

stat reclaimed 0

end

Linux下Redis下安裝

redis安裝 檢查是否安裝redis ps ef grep redis2.檢查gcc服務是否安裝成功 rpm qa grep gcc注 安裝成功則顯示 mkdir redis5.解壓redis安裝包 tar zxvf redis 2.8.17 tar.gz c usr local redis 解壓...

Linux下安裝安裝arm linux gcc

1 tar指令解壓對應壓縮包到指定目錄,如arm linux gcc 4.3.2.tar.bz2壓縮包,sudo tar xvjf arm linux gcc 4.3.2.tar.bz2 c tar壓縮解壓縮 c 建立打包檔案,可搭配 v來觀察過程中被打包的檔名 filename t 檢視打包檔案的...

linux下安裝軟體

linux下安裝軟體有兩種方式 備註 linux 上面一般安裝 redhat 的rpm 包,在ubuntu 上一般安裝 deb的包 首先是rpm包的安裝教程 一是安裝二進位制的包,一般都是 rpm格式的了,常用 rpm ivh rpm 的方式來安裝了 rpm qa rpm命令。rpm安裝有時遇到依賴...