$ docker pull redis -d는 컨테이너를 백그라운드로 실행하라는 것 $ docker run --name myredis -d redis $ docker logs 809b11ac4b561:C 09 Jul 03:10:54.232 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo1:C 09 Jul 03:10:54.232 # Redis version=4.0.10, bits=64, commit=00000000, modified=0, pid=1, just started1:C 09 Jul 03:10:54.232 # Warning: no config file specified, using the default config. In order to specify a confi..
$ docker pull redis
-d는 컨테이너를 백그라운드로 실행하라는 것
$ docker run --name myredis -d redis
$ docker logs 809b11ac4b56
1:C 09 Jul 03:10:54.232 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 09 Jul 03:10:54.232 # Redis version=4.0.10, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 09 Jul 03:10:54.232 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 09 Jul 03:10:54.233 * Running mode=standalone, port=6379.
1:M 09 Jul 03:10:54.233 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 09 Jul 03:10:54.233 # Server initialized
1:M 09 Jul 03:10:54.233 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
1:M 09 Jul 03:10:54.233 * Ready to accept connections
redis-cli 용 컨테이너 실행
--link myredis:redis myredis container를 새로운 컨테이너에서 redis라는 이름으로 참조하라 (docker는 컨테이너 /etc/hosts에 redis를 위한 진입점을 생성하고 myredis의 IP를 가리키게 한다. 이로서 Redis container의 IP 주소를 전달하거나 찾을 필요없이 redis-cli에서 redis라는 호스트 명으로 접근 가능해진다. )
--rm 컨테이너가 종료되면 자동으로 컨테이너를 삭제한다. -d와는 같이 사용될수 없다.
-it interactive, pseudo tty mode
$ docker run --rm -it --link myredis:redis redis /bin/bash
root@06589652dbfd:/data# redis-cli -h redis -p 6379
redis:6379> ping
PONG
redis:6379> set "abc" 123
OK
redis:6379> get "abc"
"123"
redis:6379> exit
'Programming > Tools' 카테고리의 다른 글
google spread sheet에서 다른 파일의 내용을 import할 때 (0) | 2018.11.24 |
---|---|
docker-machine boot2docker sudo (0) | 2018.07.23 |
docker commands basic II (0) | 2018.07.09 |
docker command basic (756) | 2018.07.09 |
lombok.javac.apt.LombokProcessor could not be initialized. Lombok will not run during this compilation (0) | 2018.06.12 |
redis-cli에서 아래 명령어를 수행 config set stop-writes-on-bgsave-error yes References https://charsyam.wordpress.com/2013/01/28/%EC%9E%85-%EA%B0%9C%EB%B0%9C-redis-%EC%84%9C%EB%B2%84%EA%B0%80-misconf-redis-is-configured-to-save-rdb-snapshots-%EC%97%90%EB%9F%AC%EB%A5%BC-%EB%82%B4%EB%A9%B0-%EB%8F%99%EC%9E%91%ED%95%98%EC%A7%80/ https://stackoverflow.com/questions/19581059/misconf-redis-is-configured-to-save-..
redis-cli에서 아래 명령어를 수행
config set stop-writes-on-bgsave-error yes
References
'Programming > Redis' 카테고리의 다른 글
Redis Commands (0) | 2018.01.02 |
---|---|
Redis Keyspace 정보 확인 및 가용한 Key List 확인하기 (0) | 2017.11.01 |
Redis 설치하기 (0) | 2017.11.01 |
ConceptContainer Cluster Architecture : https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture Pods : https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pods-and-controllers Service : https://kubernetes.io/docs/concepts/services-networking/service/ Deployments : https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ TutorialsBasics : https://ku..
Concept
Tutorials
Examples
Spring Boot : https://github.com/saturnism/spring-boot-docker
Deploying PHP Guestbook application with Redis : https://kubernetes.io/docs/tutorials/stateless-application/guestbook/#start-up-the-redis-master
Articles
Related
'Programming > GCP' 카테고리의 다른 글
kubernetes pod의 redis-cli 접근하기 (0) | 2017.11.23 |
---|---|
pod restart하기 (0) | 2017.11.23 |
Java Application GKE Kubernetes 적용하기 (0) | 2017.11.14 |
GCP Instance에 ssh 연결하기 (0) | 2017.10.23 |
kent@rtest1:~/redis-4.0.2/src$ ./redis-cli INFO | grep ^db db0:keys=4,expires=0,avg_ttl=0 kent@rtest1:~/redis-4.0.2/src$ ./redis-cli INFO keyspace # Keyspace db0:keys=4,expires=0,avg_ttl=0 kent@rtest1:~/redis-4.0.2/src$ ./redis-cli keys "*" 1) "job_results:1234" 2) "job_status:1234" 3) "a1234" 4) "1234"
kent@rtest1:~/redis-4.0.2/src$ ./redis-cli INFO | grep ^db
db0:keys=4,expires=0,avg_ttl=0
kent@rtest1:~/redis-4.0.2/src$ ./redis-cli INFO keyspace
# Keyspace
db0:keys=4,expires=0,avg_ttl=0
kent@rtest1:~/redis-4.0.2/src$ ./redis-cli keys "*"
1) "job_results:1234"
2) "job_status:1234"
3) "a1234"
4) "1234"
'Programming > Redis' 카테고리의 다른 글
Redis Commands (0) | 2018.01.02 |
---|---|
MISCONF Redis is configured to save RDB snapshots error 발생시 (0) | 2017.11.23 |
Redis 설치하기 (0) | 2017.11.01 |
Pre Installations$ sudo apt install make $ sudo apt install gcc $ cd deps $ make hiredis jemalloc linenoise lua Installationshttps://redis.io/download $ make$ src/redis-server Referenceshttps://redis.io/topics/quickstarthttps://redis.io/topics/confighttps://stackoverflow.com/questions/19091087/open-redis-port-for-remote-connections
Pre Installations
$ sudo apt install make
$ sudo apt install gcc
$ cd deps
$ make hiredis jemalloc linenoise lua
Installations
$ make
$ src/redis-server
References
https://stackoverflow.com/questions/19091087/open-redis-port-for-remote-connections'Programming > Redis' 카테고리의 다른 글
Redis Commands (0) | 2018.01.02 |
---|---|
MISCONF Redis is configured to save RDB snapshots error 발생시 (0) | 2017.11.23 |
Redis Keyspace 정보 확인 및 가용한 Key List 확인하기 (0) | 2017.11.01 |
- Total
- Today
- Yesterday
- Spring Boot
- docker
- IntelliJ
- Elasticsearch
- pymongo
- spring #lombok
- Python
- zsh
- X-Pack
- Netty
- xpath
- Paw
- ansible-container
- AWS
- PubSub
- mecab
- 은전한닢
- kubernetes
- PIP
- TDD
- pycharm
- MacOS
- Ansible
- scrapy
- GCP
- MongoDB
- git
- boot2docker
- docker-machine
- Redis
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |