redis基本安裝判斷、啟動(dòng)使用方法示例
本文實(shí)例講述了redis基本安裝判斷、啟動(dòng)使用方法。分享給大家供大家參考,具體如下:
1、Redis對(duì)否安裝(安裝好了會(huì)出現(xiàn)下面對(duì)應(yīng)的代碼)
[root]$ whereis redis-cli redis-cli: /usr/local/bin/redis-cli [root]$ [root]$ whereis redis-server redis-server: /usr/local/bin/redis-server
2、啟動(dòng)Redis
輸入代碼
redis-server &
30733:C 09 Dec 14:45:30.876 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
30733:M 09 Dec 14:45:30.879 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
30733:M 09 Dec 14:45:30.879 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
30733:M 09 Dec 14:45:30.879 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
[root]$ _._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.0 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 30733
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
30733:M 09 Dec 14:45:30.900 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
30733:M 09 Dec 14:45:30.900 # Server started, Redis version 3.2.0
30733:M 09 Dec 14:45:30.901 # 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.
30733:M 09 Dec 14:45:30.901 # 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.
30733:M 09 Dec 14:45:30.902 * The server is now ready to accept connections on port 6379
3.判斷Redis是否啟動(dòng)
[root]# redis-cli -p 6379 127.0.0.1:6379> ping PONG 127.0.0.1:6379>
希望本文所述對(duì)大家Redis數(shù)據(jù)庫程序設(shè)計(jì)有所幫助。
- 64位Windows下安裝Redis教程
- Linux下Redis的安裝和部署
- CentOS 6.6下Redis安裝配置記錄
- Redis數(shù)據(jù)庫的安裝配置方法
- Windows下Redis的安裝使用圖解
- windows 64位下redis安裝教程
- Django中redis的使用方法(包括安裝、配置、啟動(dòng))
- CentOS系統(tǒng)下Redis安裝和自啟動(dòng)配置的步驟
- 詳解linux下redis安裝、啟動(dòng)與停止,redis做成服務(wù)
- redis啟動(dòng)流程介紹
- Redis的配置、啟動(dòng)、操作和關(guān)閉方法
- 解決redis服務(wù)啟動(dòng)失敗的問題
- mac下設(shè)置redis開機(jī)啟動(dòng)方法步驟
相關(guān)文章
Redis優(yōu)化經(jīng)驗(yàn)總結(jié)(必看篇)
下面小編就為大家?guī)硪黄猂edis優(yōu)化經(jīng)驗(yàn)總結(jié)(必看篇)。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-03-03
Redis5之后版本的高可用集群搭建的實(shí)現(xiàn)
這篇文章主要介紹了Redis5之后版本的高可用集群搭建的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-04-04
Redis?抽獎(jiǎng)大轉(zhuǎn)盤的實(shí)戰(zhàn)示例
本文主要介紹了Redis?抽獎(jiǎng)大轉(zhuǎn)盤的實(shí)戰(zhàn)示例,文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-12-12
Redis快速實(shí)現(xiàn)分布式session的方法詳解
Session是客戶端與服務(wù)器通訊會(huì)話跟蹤技術(shù),服務(wù)器與客戶端保持整個(gè)通訊的會(huì)話基本信息。本文主要介紹了Redis快速實(shí)現(xiàn)分布式session的方法,感興趣的可以學(xué)習(xí)一下2022-01-01
解析高可用Redis服務(wù)架構(gòu)分析與搭建方案
我們按照由簡(jiǎn)至繁的步驟,搭建一個(gè)最小型的高可用的Redis服務(wù)。 本文通過四種方案給大家介紹包含每種方案的優(yōu)缺點(diǎn)及詳細(xì)解說,具體內(nèi)容詳情跟隨小編一起看看吧2021-06-06
Redis中Redisson布隆過濾器的學(xué)習(xí)
布隆過濾器是一個(gè)非常長(zhǎng)的二進(jìn)制向量和一系列隨機(jī)哈希函數(shù)的組合,可用于檢索一個(gè)元素是否存在,本文就詳細(xì)的介紹一下Redisson布隆過濾器,具有一定的參考價(jià)值,感興趣的可以了解一下2022-05-05
基于redis實(shí)現(xiàn)世界杯排行榜功能項(xiàng)目實(shí)戰(zhàn)
前段時(shí)間,做了一個(gè)世界杯競(jìng)猜積分排行榜。對(duì)世界杯64場(chǎng)球賽勝負(fù)平進(jìn)行猜測(cè),猜對(duì)+1分,錯(cuò)誤+0分,一人一場(chǎng)只能猜一次。下面通過本文給大家分享基于redis實(shí)現(xiàn)世界杯排行榜功能項(xiàng)目實(shí)戰(zhàn),感興趣的朋友一起看看吧2018-10-10

