NoSQL的总体介绍
http://www.apelearn.com/bbs/forum.php?mod=viewthread& tid=8660,突出=NoSQL
, memcached介绍
1.3, memcached安装
http://www.apelearn.com/bbs/thread - 9285 - 1 - 1. - html
yum安装- y epel-release
, rpm qa epel-release
yum安装- y livevent memcached libmemcached
/etc/init。d/memcached开始
netstat, lnp
ps辅助| grep memcached
, vi/etc/init.d/猫/etc/sysconfig/memcached memcached
- l监听的服务器ip
, memcached-tool 127.0.0.1:11211统计
memstat——服务器=127.0.0.1:11211
1.4, memcached基本操作
telnet 127.0.0.1 11211
key3 123 200 123
替换key3 123 210 1234
得到key3
php连接memcached cd/usr/local/src/
http://www.lishiming.net/data/p_w_upload/forum/memcache-2.2.3.tgz
<>之前,http://cn2.php.net/get/php-5.4.45.tar.bz2/from/this/mirror
<>之前运行/usr/本地/网络服务器/php/bin/phpize时出现: Configuring 为: PHP Api 版本:,,,,,,,,,20041225 Zend Module  Api 没有:,,,,,,20060613 Zend Extension  Api 没有:,,,220060519 Cannot find  autoconf只Please check your autoconf installation 以及 美元PHP_AUTOCONF environment 变量又是;然后,rerun 却;能够脚本。 解决方法 #,yum install  m4 #,yum install  autoconf
,。/configure——with-php-config=/usr/地方/php/bin/php-config
,使,,使安装
, ls/usr/local/php/lib/php/extensions/no -调试-非zt型- 20100525/
vim/usr/local/php/etc/php.ini
cp/usr/local/php/lib/php/extensions/no -调试-非zt型- 20100525/memcache。所以/usr/local/php/ext
ls ! $
vim/usr/local/php/etc/php.ini
,/usr/地方/php/bin/php - m
www.apelearn.com/study_v2/.memcache.txt
Memcached共享会话
1.7,复述,介绍和安装
http://www.apelearn.com/bbs/thread - 9286 - 1 - 1. - html
cd/usr/local/src https://codeload.github.com/antirez/redis/tar.gz/2.8.21
yum安装- y epel-rele
使
让PREFIX=/usr/地方/redis ,安装
, mkdir/usr/local/redis/etc
http://www.apelearn.com/study_v2/.redis_conf - o/usr/local/redis/etc/redis. wget配置2在/dev/null
猫/usr/local/redis/etc/redis.conf
, wget http://www.apelearn.com/study_v2/.redis_init - o/usr/local/redis/etc/redis.配置2在/dev/null
useradd - s/sbin/nologin复述,
, mkdir/usr/local/redis/var
chmod 755/etc/init.d/复述,
chkconfig,添加服务复述,复述,
开始复述,数据结构
,/usr/地方/复述,/bin/redis-cli
别名redis-cli=/usr/地方/复述,/bin/redis-cli
vi .bshre
cp/etc/skel/.bashrc .bashre(没有就拷贝
,
#。bashre
#用户特定allases和函数
别名rm=rm -我的
别名cp=cp -我的
别名mv=癿v -我”
别名redis-cli=/usr/地方/复述,/bin/redis-cli
#源全球定义
如果[- f/etc/bashrc];然后
,,,,。/etc/bashrc fi
redis-cli
,集key1 aminglinux
127.0.0.1:6379>可以;得到key1
“aminglinux”
127.0.0.1:6379>mset key1 aminglinux key2你好key3爱
127.0.0.1:6379>可以;mget key1 key2 key3
1)“aminglinux”
2)“你好”
3)“爱”
redis-cli得到key1
那儿离复述,查看文件路径,安装地址
, lrange list1 0 1
1)“123年456”
2)“aaa”
127.0.0.1:6379>lpop list1
456年“123”
127.0.0.1:6379>rpush list1 aaa
(整数)2
127.0.0.1:6379>lrange list1 0 1
1)“aaa”
2)“aaa”
设置
, zadd myset2 12“abc”
(整数)1
127.0.0.1:6379>zadd myset2 12“abc 123”
(整数)1
127.0.0.1:6379>zadd myset2 12“123 - aaa”
(整数)1
127.0.0.1:6379>zrange myset2 0 1,,,正序
zrevrange myset2 0 1,,,,,倒序
, hset hash3名字aaa
(整数)1
127.0.0.1:6379>10岁hset hash3
(整数)1
127.0.0.1:6379>设置hash3性南
错误语法错误(错误)
127.0.0.1:6379>hset hash3性南
(整数)1
127.0.0.1:6379>hgettall hash3
(错误)犯错未知的命令“hgettall”
127.0.0.1:6379>hgetall hash3
1)“名称”