欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

centos7.8怎么安裝redis5.0.10

本篇內(nèi)容主要講解“centos7.8怎么安裝redis5.0.10”,感興趣的朋友不妨來看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“centos7.8怎么安裝redis5.0.10”吧!

成都創(chuàng)新互聯(lián)長(zhǎng)期為數(shù)千家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開放共贏平臺(tái),與合作伙伴共同營(yíng)造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為張灣企業(yè)提供專業(yè)的網(wǎng)站設(shè)計(jì)、做網(wǎng)站,張灣網(wǎng)站改版等技術(shù)服務(wù)。擁有10年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開發(fā)。

準(zhǔn)備

修改主機(jī)名

# hostnamectl set-hostname redishost

安裝redis

下載redis安裝包

# cd /opt
# wget https://download.redis.io/releases/redis-5.0.10.tar.gz

 解壓壓縮包

# cd /opt
# tar -zxf redis-5.0.10.tar.gz

 編譯安裝

# cd /opt
# cd redis-5.0.10
## 安裝gcc編譯器
# yum install gcc
# make MALLOC=libc
# # make install
cd src && make install
make[1]: Entering directory `/opt/redis-5.0.10/src'


Hint: It's a good idea to run 'make test' ;)


    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install
make[1]: Leaving directory `/opt/redis-5.0.10/src

修改系統(tǒng)參數(shù)

## 修改sysctl.conf
# (
cat <<EOF
net.core.somaxconn=1024
vm.overcommit_memory=1
EOF
) >> /etc/sysctl.conf

以上操作是解決redis-server默認(rèn)啟動(dòng)提示的前兩個(gè)警告的持久方案,附redis-server默認(rèn)啟動(dòng)的兩個(gè)警告信息如下:

  • The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

  • 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.

修改系統(tǒng)啟動(dòng)參數(shù)關(guān)閉TCP

## 修改/etc/default/grub
## 在指定行加 transparent_hugepage=never
# vi /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"


## 重新生成grub配置文件
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1127.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1127.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-385c7efe9475460c95c436866e593af3
Found initrd image: /boot/initramfs-0-rescue-385c7efe9475460c95c436866e593af3.img
done

以上操作是解決redis-server默認(rèn)啟動(dòng)提示的第三個(gè)警告的持久方案,附redis-server默認(rèn)啟動(dòng)的第三個(gè)警告信息如下:

  • you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix thisissue 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 thesetting after a reboot. Redis must be restarted after THP is disabled.

根據(jù)提示將’echo never > /sys/kernel/mm/transparent_hugepage/enabled’ 寫入/etc/rc.local 其實(shí)并沒有用,換成修改grub啟動(dòng)文件可以生效。

以后臺(tái)進(jìn)程方式啟動(dòng)redis

修改配置文件redis.conf

# cd /opt/redis-5.0.10
# mkdir /etc/redis
# cp redis.conf /etc/redis/redis.conf

在/etc/redis/redis.conf中修改以下3項(xiàng)

  • 以后臺(tái)進(jìn)程方式啟動(dòng)

修改daemonize no 為daemonize yes

  • 設(shè)置redis遠(yuǎn)程連接

注釋掉bind 127.0.0.1

  • 設(shè)置redis連接密碼

在requirepass foobard改為requirepass redis1234

設(shè)置systemctl啟動(dòng)程序

/usr/lib/systemd/system/redis.service

[Unit]
Description=Redis 6379
After=syslog.target network.target
[Service]
Type=forking
PrivateTmp=yes
Restart=always
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
User=root
Group=root
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=100000
[Install]
WantedBy=multi-user.target

配置自動(dòng)啟動(dòng)

systemctl daemon-reload  
systemctl enable redis

啟動(dòng)命令

systemctl enable redis 
systemctl start redis
systemctl restart redis

{{o.name}}

{{m.name}}

到此,相信大家對(duì)“centos7.8怎么安裝redis5.0.10”有了更深的了解,不妨來實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!

網(wǎng)頁(yè)名稱:centos7.8怎么安裝redis5.0.10
文章轉(zhuǎn)載:http://chinadenli.net/article44/jgjche.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供手機(jī)網(wǎng)站建設(shè)虛擬主機(jī)、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站維護(hù)、網(wǎng)站建設(shè)網(wǎng)站收錄

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)
性感少妇无套内射在线视频| 成人日韩在线播放视频| 中文字幕中文字幕一区二区| 欧美精品专区一区二区| 日韩国产精品激情一区| 在线观看国产午夜福利| 在线观看视频日韩精品| 亚洲av秘片一区二区三区| 99国产一区在线播放| 欧美日韩三区在线观看| 国产不卡的视频在线观看| 日韩欧美91在线视频| 国产美女网红精品演绎| 国内外免费在线激情视频| 一区二区日本一区二区欧美| 国内午夜精品视频在线观看| 91在线爽的少妇嗷嗷叫| 亚洲一区二区三区在线中文字幕| 亚洲男人的天堂就去爱| 日本理论片午夜在线观看| 日韩精品中文在线观看| 亚洲精品偷拍一区二区三区| 亚洲精品熟女国产多毛| 高潮少妇高潮久久精品99| 丰满人妻少妇精品一区二区三区| 午夜福利视频偷拍91| 中文字幕人妻日本一区二区| 伊人久久五月天综合网| 视频一区二区三区自拍偷| 欧美黑人精品一区二区在线| 很黄很污在线免费观看| 久久青青草原中文字幕| 精品女同在线一区二区| 国产a天堂一区二区专区| 国产一区二区三区精品免费| 国产成人精品99在线观看| 日本亚洲欧美男人的天堂| 国产高清精品福利私拍| 91欧美激情在线视频| 日本91在线观看视频| 在线播放欧美精品一区|