1# Linux Installation
2# GIST https://gist.github.com/Artistan/d9288f8e12c4027096e66bd331d4e4fd
3# copy each of these line into your bash terminal in the directory that you would like to install sources
4
5# wget will download the setup.sh script to your current directory
6wget https://gist.githubusercontent.com/Artistan/d9288f8e12c4027096e66bd331d4e4fd/raw/setup.sh
7# this will create the sources directory, download redis_cli_install_update.sh, and run redis_cli_install_update.sh to install redi-cli
8/bin/bash setup.sh
9
10### just redis install, not sources
11
12# download
13wget https://gist.githubusercontent.com/Artistan/d9288f8e12c4027096e66bd331d4e4fd/raw/redis_cli_install_update.sh
14# install
15/bin/bash ./redis_cli_install_update.sh
16
17# !!!! If it is not executable you may need to change the redis_cli_install_update.sh script /usr/bin location based on your path, or add it to your $PATH
18
19
20# Mac Installation and health check
21brew install redis
22redis-cli ping
23edis-cli -h redis.0001.euc1.cache.amazonaws.com -p 6390 ping
24redis-cli
25
26# Delete all Keys
27FLUSHALL
28
29# Get and Set Keys
30GET myKey
31SET myKey "Hello"
32MGET key1 key2
33
34#Scan all keys
35redis-cli --scan | head -10
36KEYS *
37
38# Others
39redis-cli dbsize
40
41# Stats
42redis-cli INFO
43
44# View expiry date of entries
45redis-cli TTL sess:DAmfQLNWB9Nrx9U64qXoMZJb8XuyNepY
46
47# NodeJS Config for localhost (development)
48redis: {
49 host: 'localhost',
50 port: 6379
51}
Created on 1/8/2018