Redis: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 59: Line 59:
* [https://www.baeldung.com/spring-data-redis-pub-sub Redis PubSub with Spring Data Redis]
* [https://www.baeldung.com/spring-data-redis-pub-sub Redis PubSub with Spring Data Redis]
* [https://unix.stackexchange.com/questions/200239/ SSH Sessions Prevent From Freezing]
* [https://unix.stackexchange.com/questions/200239/ SSH Sessions Prevent From Freezing]
* [https://docs.servicestack.net/redis-mq Redis MQ Implement with C#]
* [https://redis.io/docs/manual/config/ Redis Cache Configuration]
* [https://redis.io/docs/manual/client-side-caching/ Redis Client Side Caching]
* [https://redis.io/docs/manual/data-types/data-types-tutorial/ Redis Data Types Tutorial]
* [https://redis.io/docs/manual/data-types/ Redis Data Types]
* [https://redis.io/docs/manual/pubsub/ Redis Pub/Sub]
* [https://redis.io/docs/manual/cli/ Redis CLI]


| valign="top" |
| valign="top" |

Revision as of 17:24, 30 May 2022

sudo apt install redis-server
sudo vim /etc/redis/redis.conf

Redis Config

# If you run Redis from upstart or systemd, Redis can interact with your
# supervision tree. Options:
#   supervised no      - no supervision interaction
#   supervised upstart - signal upstart by putting Redis into SIGSTOP mode
#   supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
#   supervised auto    - detect upstart or systemd method based on
#                        UPSTART_JOB or NOTIFY_SOCKET environment variables
# Note: these supervision methods only signal "process is ready."
#       They do not enable continuous liveness pings back to your supervisor.
supervised systemd
sudo mkdir /var/run/redis
sudo chown -R redis:redis /var/run/redis
sudo systemctl restart redis-server
sudo systemctl status  redis-server

###################<OR>###################
sudo vim /etc/systemd/system/redis.service
[Service]
Type=forking
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
ExecStop=/bin/kill -s TERM $MAINPID
ExecStartPost=/bin/sh -c "echo $MAINPID > /var/run/redis/redis.pid"
PIDFile=/run/redis/redis-server.pid
sudo systemctl daemon-reload
sudo systemctl restart redis-server
sudo systemctl status  redis-server

References