$ sudo add-apt-repository ppa:redislabs/redis $ sudo apt-get update $ sudo apt-get install redis
$ redis-server $ redis-cli --version
- short keys
- separation for the keys
- string < 512 mb
- list => queues
- hashes = objects
- sets and sorted sets => unordered collections of binary safe things
- key / value => to store data
- list of commands $ redis-cli -h
- connect to a remote server $ redis-cli -h
- connect to a specific port $ redis-cli -p 6380
- some info $ redis-cli info
- name of the db $ config get dbfilename
- configuration sudo nano /etc/redis/redis.conf
config get dir => give back 2 rows, parameter name and value of the parameter config set config get dbfilename => give back name of the DB config get * => all parameters config set {name parameter} {value parameter} => in run-time config set loglevel => values in parameter loglevel ie: config set loglevel verbose => set verbose
$ sudo apt install python3-pip $ pip3 install redis $ pip3 install hiredis
$ sudo apt install python $ pip install redis $ pip install python==2.7.4 $ pip install hiredis
https://redis-py.readthedocs.io/en/stable/genindex.html
sudo apt install python3-virtualenv
virtualenv ev -p python3
virtualenv ev -p python source ev/bin/activate
deativate
Traceback (most recent call last): File "", line 1, in AttributeError: module 'redis' has no attribute 'Redis' solution: not name redis.py another file
$ redis-server
$ redis-cli
$ exit