新聞中心
Redis是一個(gè)開(kāi)源的內(nèi)存數(shù)據(jù)庫(kù),擁有極致的讀寫(xiě)性能,是NoSQL類(lèi)型數(shù)據(jù)庫(kù)中擁有最多用戶(hù)的廠(chǎng)商,yum是一種Linux下的可視化安裝程序,可以幫助用戶(hù)快速地安裝軟件,以實(shí)現(xiàn)Redis服務(wù)器上線(xiàn)的方法介紹如下:

1. 準(zhǔn)備YUM源:登陸服務(wù)器,vim編輯/etc/yum.conf文件,在末尾添加以下源:
[redis repo]
name=Redis for CentOS
baseurl=http://download.redis.io/repo/6/rhel6
enabled=1
gpgcheck=0
2. 執(zhí)行以下指令,讓yum生效
[root@host~]# yum repolist
[root@host~]# yum clean all
[root@host~]# yum makecache
3. 運(yùn)行YUM安裝及配置
[root@host~]# yum install redis
[root@host~]# chkconfig redis on
[root@host~]# vi /etc/redis.conf
在配置文件中加入以下內(nèi)容:
# Redis運(yùn)行模式
daemonize yes
# 指定Redis端口號(hào)
port 6379
# 監(jiān)聽(tīng)的IP地址
bind 0.0.0.0
保存退出。
4.啟動(dòng)Redis服務(wù)
[root@host~]# service redis start
[root@host~]# ps -ef | grep redis
[root@host~]# netstat -ntlp
可以看到redis已經(jīng)正常啟動(dòng),并已經(jīng)監(jiān)聽(tīng)在0.0.0.0:6379上,證明Redis服務(wù)器上線(xiàn)成功。
此外,如果需要禁用Redis,可以執(zhí)行以下指令:
[root@host~]# chkconfig redis off
[root@host~]# service redis stop
通過(guò)YUM安裝Redis服務(wù)器,可以快速實(shí)現(xiàn)Redis的上線(xiàn),進(jìn)而實(shí)現(xiàn)數(shù)據(jù)庫(kù)的高速查詢(xún),為業(yè)務(wù)邏輯帶來(lái)巨大的提升。
成都網(wǎng)站設(shè)計(jì)制作選創(chuàng)新互聯(lián),專(zhuān)業(yè)網(wǎng)站建設(shè)公司。
成都創(chuàng)新互聯(lián)10余年專(zhuān)注成都高端網(wǎng)站建設(shè)定制開(kāi)發(fā)服務(wù),為客戶(hù)提供專(zhuān)業(yè)的成都網(wǎng)站制作,成都網(wǎng)頁(yè)設(shè)計(jì),成都網(wǎng)站設(shè)計(jì)服務(wù);成都創(chuàng)新互聯(lián)服務(wù)內(nèi)容包含成都網(wǎng)站建設(shè),小程序開(kāi)發(fā),營(yíng)銷(xiāo)網(wǎng)站建設(shè),網(wǎng)站改版,服務(wù)器托管租用等互聯(lián)網(wǎng)服務(wù)。
網(wǎng)站欄目:安裝 yum 實(shí)現(xiàn) Redis 服務(wù)器上線(xiàn)(yum redis 服務(wù))
網(wǎng)頁(yè)路徑:http://www.fisionsoft.com.cn/article/cdejees.html


咨詢(xún)
建站咨詢(xún)
