Getting started with installing redis and getting started with redis
Official redis Website: redis. io
Redis version is using redis-3.2.2
$ Wget http://download.redis.io/releases/redis-3.2.2.tar.gz
$ Tar xzf redis-3.2.2.tar.gz
$ Redis-3.2.2 cd
$ Make
$ Src/redis-server
$ Src/redis-cli
Redis> set foo bar
OK
Redis> get foo
"Bar"
Easy, redis getting started
Modify the redis. conf file:
1. Add the password. It is recommended to keep it long and add youpassword after requirepass.
2. Modify the bind, that is, the ip address you bind.
There are several problems: at startup,/path/to/redis will be searched by default. if the conf file cannot be found, an error will be reported. Solution: redis-server .. /redis. conf, manually specify the location where redis loads the conf at startup
When someone else's ip address needs to be able to access redis, it says on the Internet that the bind is replaced, but it is still divided into redis versions,Redis version problems, that is, when less than 3.0.1 does not produce this error, higher than production
This problem occurs.
Error: Creating Server TCP listening socket *: 6379: unable to bind socket
Specific solution:
A. Disable the IPv6 NIC (the specific method is Baidu, which is not described here)
B. Add bind 0.0.0.0 to redis. conf.
Specific reasons:
A. redis accepts IPv4 access mode. IPv6 does not accept
B. Add bind 0.0.0.0 (this is the end of the article)
Not complete...