14-11-2023
This commit is contained in:
92
docs/macos/webserver/redis.md
Normal file
92
docs/macos/webserver/redis.md
Normal file
@@ -0,0 +1,92 @@
|
||||
|
||||
|
||||
# redis
|
||||
|
||||
|
||||
|
||||
### Installation:
|
||||
|
||||
```bash
|
||||
$ brew install redis
|
||||
```
|
||||
|
||||
### Redémarrer:
|
||||
|
||||
```bash
|
||||
$ brew services restart redis
|
||||
```
|
||||
|
||||
### Le fichier de config:
|
||||
|
||||
```bash
|
||||
/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
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user