Ubuntu Server 下安装 Memcached
Ubuntu Server 下安装Memcached,输入如果系统找不到 memcache 安装包
更新软件源
您可以使用以下列表中的任何一个源镜像只要往您的 /etc/apt/sources.list 文件中像下面这样添加一行:进行重新安装一下
检验是否安装成功.
-----
1. 安装成功之后,memcache就自己启动了.通过进程查看一下会查到一条记录 然后输入 就显示出来当前memcached的各种参数了.. 3. 手动启动memcached 以root用户,分配最大2GM内存启动memcache
- sudo apt-get install memcache
更新软件源
您可以使用以下列表中的任何一个源镜像只要往您的 /etc/apt/sources.list 文件中像下面这样添加一行:
- deb http://security.ubuntu.com/ubuntu hardy-security main universe
- sudo apt-get update
- sudo apt-get install memcache
-----
1. 安装成功之后,memcache就自己启动了.通过进程查看一下
- ps -aux
- /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1
显示的就是 memcached 的端口11211 用户nobody 地址 127.0.0.1
2. 连接memcached 服务器
- telnet 127.0.0.1 11211
- stats
- sysadmin@ubuntu:/etc/apt$ telnet 127.0.0.1 11211
- Trying 127.0.0.1...
- Connected to 127.0.0.1.
- Escape character is '^]'.
- stats
- STAT pid 3065
- STAT uptime 170
- STAT time 1334121278
- STAT version 1.4.7
- STAT libevent 2.0.12-stable
- STAT pointer_size 64
- STAT rusage_user 0.004000
- STAT rusage_system 0.000000
- STAT curr_connections 5
- STAT total_connections 7
- STAT connection_structures 6
- STAT cmd_get 0
- STAT cmd_set 0
- STAT cmd_flush 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 auth_cmds 0
- STAT auth_errors 0
- STAT bytes_read 140
- STAT bytes_written 856
- STAT limit_maxbytes 67108864
- STAT accepting_conns 1
- STAT listen_disabled_num 0
- STAT threads 4
- STAT conn_yields 0
- STAT bytes 0
- STAT curr_items 0
- STAT total_items 0
- STAT evictions 0
- STAT reclaimed 0
- END
- memcached -d -m 128 -l 127.0.0.1 -p 11211 -u root
- memcached -d -m 128 -l 127.0.0.1 -p 11212 -u root
在另外一个端口11212启动另外一个memcache实例
相关推荐
IT之家 2020-03-11
graseed 2020-10-28
zbkyumlei 2020-10-12
SXIAOYI 2020-09-16
jinhao 2020-09-07
impress 2020-08-26
liuqipao 2020-07-07
淡风wisdon大大 2020-06-06
yoohsummer 2020-06-01
chenjia00 2020-05-29
baike 2020-05-19
扭来不叫牛奶 2020-05-08
hxmilyy 2020-05-11
黎豆子 2020-05-07
xiongweiwei00 2020-04-29
Cypress 2020-04-25
冰蝶 2020-04-20