main
Tran Hau 2020-05-09 23:16:00 +07:00
parent fc678ad58b
commit c92ea59e0f
3 changed files with 13 additions and 24 deletions

View File

@ -4,14 +4,10 @@ Assume you use Archlinux.
Read [Docker](https://wiki.archlinux.org/index.php/Docker). Read [Docker](https://wiki.archlinux.org/index.php/Docker).
Read [LinuxServer.io/Docs](https://docs.linuxserver.io/). Enable and start service:
Start/enable service:
```sh ```sh
systemctl start docker.service systemctl enable --now docker.service
systemctl enable docker.service
``` ```
Add your user to `docker` group: Add your user to `docker` group:
@ -37,7 +33,7 @@ Read [docker run](https://docs.docker.com/engine/reference/commandline/run/).
| `-t` | | Allocate a pseudo-TTY | | `-t` | | Allocate a pseudo-TTY |
| `-v` | `-v ~/abc:/abc` | Bind host directory : container directory | | `-v` | `-v ~/abc:/abc` | Bind host directory : container directory |
Run `ubuntu` image: Example run `ubuntu` image:
```sh ```sh
docker run --rm -it ubuntu docker run --rm -it ubuntu

View File

@ -8,6 +8,7 @@ Docker:
docker run -d \ docker run -d \
-p 9090:9090 \ -p 9090:9090 \
-v /path/to/config:/etc/prometheus \ -v /path/to/config:/etc/prometheus \
--name prometheus
prom/prometheus prom/prometheus
``` ```
@ -32,6 +33,7 @@ Docker:
```sh ```sh
docker run -d \ docker run -d \
-p 9091:9091 \ -p 9091:9091 \
--name pushgateway
prom/pushgateway prom/pushgateway
``` ```

View File

@ -1,32 +1,25 @@
# Redis # Redis
Assume you use Archlinux. Docker:
Read [Redis](https://wiki.archlinux.org/index.php/Redis).
Start/enable service:
```sh ```sh
systemctl start redis.service docker run -d \
-p 6379:6379 \
systemctl enable redis.service --name redis \
``` redis:alpine
Otherwise use docker:
```sh
docker run -d -p 6379:6379 --name redis redis:alpine
``` ```
## redis-cli ## redis-cli
`redis-cli` is included in [redis](https://www.archlinux.org/packages/community/x86_64/redis/).
Connect: Connect:
```sh ```sh
redis-cli -h localhost -p 6379 redis-cli -h localhost -p 6379
``` ```
### After connect ### [Commands](https://redis.io/commands)
Get all keys: Get all keys:
@ -39,5 +32,3 @@ Delete all keys:
```sh ```sh
FLUSHALL FLUSHALL
``` ```
Read [Commands](https://redis.io/commands).