Posts

Showing posts with the label NOSQL

NOSQL Basic Knowledge

Nosql: key-value Redis: one kind of nosql.  Data cachs in Memory, regular write into disk. Used in: 1. Get the latest N record 2. Get the top N record 3. Set expired date of record 4. Get unique data 5. Real time system .... redis vs mysql vs mongdb mysql: database; table; column mongodb: database;  aggregation;no column redis: database; no table; no column Redis  Installation 1. Download from redis.io  http://redis.io/download 2. unzip the package: tar xvf redis-3.0.2.tar.gz 3. install package: make MALLOC=libc 4. move the /tmp/redis-3.0.2 to /usr/local/redis 5. set path: vim /etc/profile.d/redis.sh export PATH=/usr/local/redis/src:$PATH 6. change config file vim /usr/local/redis/redis.conf A. Change from  daemonize no to  daemonize yes B. Change from  logfile "" to  logfile "/var/log/redis/redis.log" 7. set service: vim /etc/rc.d/init.d/redis #!/bin/bash #chkconfig: 2345 80 90 ...