Files
mkdocs/docs/macos/webserver/redis.md
2024-04-06 09:54:09 +02:00

93 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# redis
### Installation:
```bash
$ brew install redis
```
### Redémarrer:
```bash
$ brew services restart redis
```
### Le fichier de config:
```bash
$ nano /opt/homebrew/etc/redis.conf
```
### Tester redis:
```bash
$ redis-server
30766:C 25 Jul 2022 11:46:58.611 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
30766:C 25 Jul 2022 11:46:58.611 # Redis version=7.0.3, bits=64, commit=00000000, modified=0, pid=30766, just started
30766:C 25 Jul 2022 11:46:58.611 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
30766:M 25 Jul 2022 11:46:58.612 * Increased maximum number of open files to 10032 (it was originally set to 256).
30766:M 25 Jul 2022 11:46:58.612 * monotonic clock: POSIX clock_gettime
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 7.0.3 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 30766
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | https://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
30766:M 25 Jul 2022 11:46:58.613 # WARNING: The TCP backlog setting of 511 cannot be enforced because kern.ipc.somaxconn is set to the lower value of 128.
30766:M 25 Jul 2022 11:46:58.613 # Server initialized
30766:M 25 Jul 2022 11:46:58.613 * Ready to accept connections tcp
```
### Démarrer redis:
```bash
brew services start redis
==> Successfully started `redis` (label: homebrew.mxcl.redis)
```
### Si le service est actif:
```bash
brew services info redis
redis (homebrew.mxcl.redis)
Running: ✔
Loaded: ✔
Schedulable: ✘
User: bruno
PID: 31087
```
### Se connecter à redis:
```bash
redis-cli
127.0.0.1:6379> lpush demos redis-macOS-demo
(integer) 1
127.0.0.1:6379> rpop demos
"redis-macOS-demo"
127.0.0.1:6379> ping
PONG
```