Last active
November 5, 2023 14:06
-
-
Save irfanfadilah/02d4d5775e187cc3e30a72eec334f9df to your computer and use it in GitHub Desktop.
Setup Simple Redis Cache Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install Redis | |
2. Start and Enable: | |
- sudo systemctl start redis-server | |
- sudo systemctl enable redis-server | |
3. Update Config: | |
- bind 0.0.0.0 | |
- protected-mode no | |
- maxmemory 100mb | |
- maxmemory-policy allkeys-lfu | |
4. Set ACL and disable default user in Config: | |
- user username on >password +@all ~* &* | |
- user default off | |
5. Set the Linux Kernel Overcommit Memory: | |
- Add vm.overcommit_memory = 1 to /etc/sysctl.conf | |
- Run sysctl vm.overcommit_memory=1 to apply | |
6. Restart Redis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment