Redis 개요 및 Liux 설치 redis 의 상세 한 튜 토리 얼
중국어 공식 사이트:Http://www.redis.cn/
기업 내 에서 레 디 스 개발 을 하 는데 99%가 리 눅 스 버 전의 운용 과 설치 이다.
첫 번 째 다운로드 redis
wget http://download.redis.io/releases/redis-4.0.6.tar.gz
두 번 째 압축 풀기 패키지
tar -zxvf redis-4.0.6.tar.gz
[root@iZwz991stxdwj560bfmadtZ local]# tar -zxvf redis-4.0.6.tar.gz
3 단계 yum 설치 gcc 의존yum install gcc
[root@iZwz991stxdwj560bfmadtZ local]# yum install gcc
선택 이 있 으 면 y 를 입력 하면 됩 니 다.네 번 째 단 계 는 redis 압축 해제 디 렉 터 리 로 넘 어 갑 니 다.
cd redis-4.0.6
[root@iZwz991stxdwj560bfmadtZ local]# cd redis-4.0.6
5 단계 컴 파일 설치make MALLOC=libc
[root@iZwz991stxdwj560bfmadtZ redis-4.0.6]# make MALLOC=libc
/usr/local/redis-4.0.6/src 디 렉 터 리 에 있 는 파일 을/usr/local/bin 디 렉 터 리 에 추가 합 니 다.cd src && make install
[root@iZwz991stxdwj560bfmadtZ redis-4.0.6]# cd src && make install
CC Makefile.dep
Hint: It's a good idea to run 'make test' ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
5.redis 시작리 디 스 를 직접 시작 하 는 방식
./redis-server
[root@iZwz991stxdwj560bfmadtZ src]# ./redis-server
18685:C 13 Dec 12:56:12.507 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18685:C 13 Dec 12:56:12.507 # Redis version=4.0.6, bits=64, commit=00000000, modified=0, pid=18685, just started
18685:C 13 Dec 12:56:12.507 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 4.0.6 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 18685
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
18685:M 13 Dec 12:56:12.508 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
18685:M 13 Dec 12:56:12.508 # Server initialized
18685:M 13 Dec 12:56:12.508 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
18685:M 13 Dec 12:56:12.508 # 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.
18685:M 13 Dec 12:56:12.508 * Ready to accept connections
위의 그림:redis 시작 에 성 공 했 지만 이 시작 방식 은 창 을 계속 열 어야 합 니 다.다른 작업 을 할 수 없어 서 불편 합 니 다.ctrl+c 를 누 르 면 창 을 닫 을 수 있 습 니 다.
방식 2 이후 데스크 톱 프로 세 스 방식 으로 redis 시작
첫 번 째 단계:redis.conf 파일 수정
장차
daemonize no
으로 변경
daemonize yes
두 번 째 단계:redis.conf 파일 시작 지정
redis-server /usr/local/redis-4.0.6/redis.conf
ps -aux | grep redis redis
이렇게 redis 가 Liux 에 설치 되 었 습 니 다.
6.redis 의 helloworld
여기 서 Redis 개술 및 Liux 설치 redis 에 관 한 상세 한 튜 토리 얼 에 관 한 글 은 여기까지 소개 되 었 습 니 다.더 많은 Liux 설치 redis 내용 은 예전 의 글 을 검색 하거나 아래 의 관련 글 을 계속 조회 하 시기 바 랍 니 다.앞으로 저 희 를 많이 사랑 해 주세요!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
용감한 바로 가기 및 우분투 응용 프로그램안녕하세요 여러분, 이 기사에서는 모든 사이트에서 pwa를 생성하고 실행기 응용 프로그램으로 추가하는 방법을 설명하고 싶습니다. 일부 웹사이트는 PWA로 설치를 허용하지 않지만 유사한 애플리케이션을 원합니다. 1. ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.