麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 數(shù)據(jù)庫 > Redis > 正文

Redis 5.05 單獨模式安裝及配置方法

2020-10-28 21:28:55
字體:
供稿:網(wǎng)友

操作系統(tǒng)Centos7 

1、下載redis 

wget http://download.redis.io/releases/redis-5.0.5.tar.gztar xzf redis-5.0.5.tar.gzcd redis-5.0.5make

2、啟動服務(wù) 

命令執(zhí)行完成之后,既可以啟動Redis 服務(wù)

[root@zk02 redis]# src/redis-server 5265:C 23 Oct 2019 16:58:04.682 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo5265:C 23 Oct 2019 16:58:04.682 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=5265, just started5265:C 23 Oct 2019 16:58:04.682 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf5265:M 23 Oct 2019 16:58:04.683 * Increased maximum number of open files to 10032 (it was originally set to 1024).  _._         _.-``__ ''-._       _.-`` `. `_. ''-._  Redis 5.0.5 (00000000/0) 64 bit .-`` .-```. ```// _.,_ ''-._      ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 5265 `-._ `-._ `-./ _.-' _.-'      |`-._`-._ `-.__.-' _.-'_.-'|      | `-._`-._ _.-'_.-' |  http://redis.io  `-._ `-._`-.__.-'_.-' _.-'      |`-._`-._ `-.__.-' _.-'_.-'|      | `-._`-._ _.-'_.-' |      `-._ `-._`-.__.-'_.-' _.-'      `-._ `-.__.-' _.-'       `-._ _.-'        `-.__.-'       5265:M 23 Oct 2019 16:58:04.684 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.5265:M 23 Oct 2019 16:58:04.684 # Server initialized5265:M 23 Oct 2019 16:58:04.684 # 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.5265:M 23 Oct 2019 16:58:04.684 # 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.5265:M 23 Oct 2019 16:58:04.684 * Ready to accept connections

3、通過內(nèi)置的客戶端與redis 交互

[root@zk02 redis]# src/redis-cli 127.0.0.1:6379> set foo bar OK127.0.0.1:6379> get foo"bar"127.0.0.1:6379>

日志的打開文件數(shù),可通過如下命令設(shè)置

ulimit -n 10032

ps:下面看下Redis 5.0.5 單節(jié)點 安裝配置

下載

http://download.redis.io/releases/redis-5.0.5.tar.gz

解壓

tar -C /usr/local -xvf redis-5.0.5.tar.gz

編譯安裝

cd /usr/local/redis-5.0.5make install 

使用make install 安裝,默認安裝目錄是/usr/local/bin/

Redis配置文件

將示例配置文件拷貝到/etc/redis/639.conf

mkdir /etc/rediscp /usr/local/redis-5.0.5/redis.conf /etc/redis/6379.conf

關(guān)閉保護模式

protected-mode no

開放其他主機訪問,注釋掉bind 127.0.0.1

bind 127.0.0.1

更改為后臺啟動

daemonize yes

日志記錄,需要先創(chuàng)建目錄/var/applogs/redis

logfile "/var/applogs/redis/redis.log"

數(shù)據(jù)存儲目錄

mkdir -p /var/redis-data/dir /var/redis-data

設(shè)置密碼

requirepass xxxx

Redis配置開機啟動服務(wù)

使用Redis自帶的啟動腳本

cp /root/share/deploy-ready/redis-5.0.5/utils/redis_init_script /etc/init.d/redisd

配置開啟自啟動

chkconfig redisd on

設(shè)置開機自啟動

chkconfig redisd on

防火墻開發(fā)6379端口

firewall-cmd --permanent --add-port=6379/tcpfirewall-cmd --reload

客戶端連接Redis

redis-cli -h 192.168.43.197 -p 6379 -a xxxx

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 欧美一级做性受免费大片免费 | 成人在线观看一区二区 | 日本网站在线播放 | 天天躁狠狠躁夜躁2020挡不住 | 国产亚洲综合精品 | 暴力肉体进入hdxxxx0 | 成人免费观看毛片 | 中文在线观看www | 日韩毛片网 | 国产精品99久久久久久久女警 | 成人毛片在线免费观看 | 免费黄色在线观看网站 | 午夜精品小视频 | 99爱福利视频在线观看 | 国产在线久 | 一级黄色免费电影 | 黄色大片在线免费观看 | 蜜桃视频在线入口www | 免费看黄色一级片 | 欧美成人一二三区 | 日日草视频| 久久久久国产一区二区三区不卡 | 久久精品视频亚洲 | 黄色片网站在线看 | 主人在调教室性调教女仆游戏 | 国产一区二区三区精品在线观看 | 免费网站看v片在线a | 欧美日韩成人一区二区 | omofun 动漫在线观看 | 久久精品一区二区三区国产主播 | 免费在线观看国产精品 | 精品久久久av | 国产一区在线视频观看 | 成人性生活视频 | 国产精品入口夜色视频大尺度 | 一区二区久久电影 | 色婷婷a | 国产午夜精品一区二区三区四区 | 亚洲一区二区三区视频免费 | 一起草av在线 | 久久久久久久久久久久久久国产 |