Redis configuration redis-static-server

Install Redis, Redis Stack

sudo apt install redis-server

https://redis.io/docs/getting-started/install-stack/linux/

Configure remote access:

1. Open the redis configuration file "redis.conf".

2. Comment out "bind 127.0.0.1".

3. Change "protected-mode yes" to "protected-mode no".

4. Add the following line of code.

daemonize no

5. Restart the redis service.

Prepare redisearch

sudo vim /etc/redis/redis.conf
loadmodule /opt/redis-stack/lib/redisearch.so

Restart the server:

 systemctl restart  redis-server

Take a look at the preparation effect: moudle list

127.0.0.1:6379> module list
1) 1) "name"
   2) "search"
   3) "ver"
   4) (integer) 20804
   5) "path"
   6) "/opt/redis-stack/lib/redisearch.so"
   7) "args"
   8) (empty array)

Use the command below to verify that the Redis server is listening on port 6379

ss -an | grep 6379

To verify that everything is set up, you can try to ping the Redis server from your remote machine using redis-cli.

redis-cli -h <REDIS_IP_ADDRESS> ping

Main command:

FT.CREATE
FT.ADD
FT.DEL
FT.SEARCH
FT.DROP

Guess you like

Origin blog.csdn.net/philosophyatmath/article/details/132697725