安裝memcached依賴包
[root@localhost tools]# yum install -y libevent libevent-devel nc -y
將memcached包上傳至服務(wù)器
[root@localhost tools]# ls
memcached-1.4.13.tar.gz
安裝memcached
[root@localhost tools]# ls
memcached-1.4.13.tar.gz
[root@localhost tools]# tar xf memcached-1.4.13.tar.gz
[root@localhost tools]# ls
memcached-1.4.13 memcached-1.4.13.tar.gz
[root@localhost tools]# cd memcached-1.4.13/
[root@localhost memcached-1.4.13]# ./configure
[root@localhost memcached-1.4.13]# make
[root@localhost memcached-1.4.13]# make install
啟動(dòng)memcached
[root@localhost ~]# memcached -m 16 -p 33211 -d -u root -c 8192
查看結(jié)果
[root@localhost ~]# lsof -i:33211
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
memcached 6373 root 26u IPv4 39764 0t0 TCP *:33211 (LISTEN)
memcached 6373 root 27u IPv6 39765 0t0 TCP *:33211 (LISTEN)
memcached 6373 root 28u IPv4 39768 0t0 UDP *:33211
memcached 6373 root 29u IPv6 39769 0t0 UDP *:33211
總結(jié)
這樣memcached就安裝成功了!