最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Redis 單節(jié)點(diǎn)部署的實(shí)現(xiàn)

 更新時(shí)間:2022年06月27日 09:38:58   作者:EOPG  
本文主要介紹了Redis 單節(jié)點(diǎn)部署的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧

第一步 下載Redis

下載地址:http://www.redis.cn/download/

第二步 安裝Redis

[root@localhost /]# cd /home/logonuser/app/
[root@localhost app]# ll
總用量 2180
-rw-r--r--. 1 root root 2228781 12月 17 15:58 redis-6.0.6.tar.gz
[root@localhost app]# tar xzf redis-6.0.6.tar.gz 
[root@localhost app]# ll
總用量 2184
drwxrwxr-x. 7 root root    4096 7月  21 2020 redis-6.0.6
-rw-r--r--. 1 root root 2228781 12月 17 15:58 redis-6.0.6.tar.gz
[root@localhost app]# cd redis-6.0.6/
[root@localhost redis-6.0.6]# ll
總用量 260
-rw-rw-r--.  1 root root 80561 7月  21 2020 00-RELEASENOTES
-rw-rw-r--.  1 root root    51 7月  21 2020 BUGS
-rw-rw-r--.  1 root root  2381 7月  21 2020 CONTRIBUTING
-rw-rw-r--.  1 root root  1487 7月  21 2020 COPYING
drwxrwxr-x.  6 root root   124 7月  21 2020 deps
-rw-rw-r--.  1 root root    11 7月  21 2020 INSTALL
-rw-rw-r--.  1 root root   151 7月  21 2020 Makefile
-rw-rw-r--.  1 root root  6888 7月  21 2020 MANIFESTO
-rw-rw-r--.  1 root root 20806 7月  21 2020 README.md
-rw-rw-r--.  1 root root 83392 7月  21 2020 redis.conf
-rwxrwxr-x.  1 root root   275 7月  21 2020 runtest
-rwxrwxr-x.  1 root root   280 7月  21 2020 runtest-cluster
-rwxrwxr-x.  1 root root   679 7月  21 2020 runtest-moduleapi
-rwxrwxr-x.  1 root root   281 7月  21 2020 runtest-sentinel
-rw-rw-r--.  1 root root 10743 7月  21 2020 sentinel.conf
drwxrwxr-x.  3 root root  4096 7月  21 2020 src
drwxrwxr-x. 11 root root   182 7月  21 2020 tests
-rw-rw-r--.  1 root root  3055 7月  21 2020 TLS.md
drwxrwxr-x.  9 root root  4096 7月  21 2020 utils
[root@localhost redis-6.0.6]# make

make 編譯完成以后提示 Hint: It’s a good idea to run ‘make test’ ?? 則安裝成功

如若在安裝中出現(xiàn)報(bào)錯(cuò):例如:

解決方式:

[root@localhost redis-6.0.6]# gcc -v                             
[root@localhost redis-6.0.6]# yum -y install centos-release-scl  
[root@localhost redis-6.0.6]# yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
[root@localhost redis-6.0.6]# scl enable devtoolset-9 bash
[root@localhost redis-6.0.6]# echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

第三步 修改配置文件

[root@localhost redis-6.0.6]# gcc -v                             
[root@localhost redis-6.0.6]# yum -y install centos-release-scl  
[root@localhost redis-6.0.6]# yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
[root@localhost redis-6.0.6]# scl enable devtoolset-9 bash
[root@localhost redis-6.0.6]# echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

要修改的配置文件內(nèi)容:

? bind :

? port : 6385

? pidfile /var/run/redis_6385.pid

? daemonize yes 后臺(tái)運(yùn)行

第四步 啟動(dòng)服務(wù)

[root@localhost redis-6.0.6]# cd src/
[root@localhost src]# ls
[root@localhost src]# ./redis-server ../redis.conf 
13385:C 17 Dec 2021 17:28:01.835 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
13385:C 17 Dec 2021 17:28:01.835 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=13385, just started
13385:C 17 Dec 2021 17:28:01.835 # Configuration loaded
[root@localhost src]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      690/rpcbind         
tcp        0      0 192.168.209.129:6385    0.0.0.0:*               LISTEN      13386/./redis-serve 
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1767/dnsmasq        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1184/sshd           
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1183/cupsd          
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1541/master         
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      3239/sshd: root@pts 
tcp6       0      0 :::111                  :::*                    LISTEN      690/rpcbind         
tcp6       0      0 :::22                   :::*                    LISTEN      1184/sshd           
tcp6       0      0 ::1:631                 :::*                    LISTEN      1183/cupsd          
tcp6       0      0 ::1:25                  :::*                    LISTEN      1541/master         
tcp6       0      0 ::1:6010                :::*                    LISTEN      3239/sshd: root@pts 

檢測(cè)Redis是否安裝成功

[root@localhost src]# ./redis-cli -h 192.168.209.129 -p 6385
192.168.209.129:6385> set xiaohong hello-redis
OK
192.168.209.129:6385> get xiaohong
"hello-redis"
192.168.209.129:6385> 

到此這篇關(guān)于Redis 單節(jié)點(diǎn)部署的實(shí)現(xiàn)的文章就介紹到這了,更多相關(guān)Redis 單節(jié)點(diǎn)部署內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Redis持久化方式之RDB和AOF的原理及優(yōu)缺點(diǎn)

    Redis持久化方式之RDB和AOF的原理及優(yōu)缺點(diǎn)

    在Redis中,數(shù)據(jù)可以分為兩類,即內(nèi)存數(shù)據(jù)和磁盤(pán)數(shù)據(jù),Redis?提供了兩種不同的持久化方式,其中?RDB?是快照備份機(jī)制,AOF?則是追加寫(xiě)操作機(jī)制,本文將詳細(xì)給大家介紹Redis?持久化方式RDB和AOF的原理及優(yōu)缺點(diǎn),感興趣的同學(xué)可以跟著小編一起來(lái)學(xué)習(xí)
    2023-06-06
  • Redis如何使用樂(lè)觀鎖(CAS)保證數(shù)據(jù)一致性

    Redis如何使用樂(lè)觀鎖(CAS)保證數(shù)據(jù)一致性

    本文主要介紹了Redis如何使用樂(lè)觀鎖(CAS)保證數(shù)據(jù)一致性,文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • window下創(chuàng)建redis出現(xiàn)問(wèn)題小結(jié)

    window下創(chuàng)建redis出現(xiàn)問(wèn)題小結(jié)

    這篇文章主要介紹了window下創(chuàng)建redis出現(xiàn)問(wèn)題總結(jié),本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2020-10-10
  • 基于Redis過(guò)期事件實(shí)現(xiàn)訂單超時(shí)取消

    基于Redis過(guò)期事件實(shí)現(xiàn)訂單超時(shí)取消

    這篇文章主要介紹了基于Redis過(guò)期事件實(shí)現(xiàn)訂單超時(shí)取消,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-05-05
  • 詳解三分鐘快速搭建分布式高可用的Redis集群

    詳解三分鐘快速搭建分布式高可用的Redis集群

    這篇文章主要介紹了詳解三分鐘快速搭建分布式高可用的Redis集群,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2021-02-02
  • Redis批量刪除KEY的方法

    Redis批量刪除KEY的方法

    這篇文章主要介紹了Redis批量刪除KEY的方法,本文借助了Linux xargs命令實(shí)現(xiàn),需要的朋友可以參考下
    2014-11-11
  • Redis高性能的原因及說(shuō)明

    Redis高性能的原因及說(shuō)明

    這篇文章主要介紹了Redis高性能的原因及說(shuō)明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-10-10
  • 深入探究RedisJSON模塊的工作原理以及使用操作

    深入探究RedisJSON模塊的工作原理以及使用操作

    Redis推出了RedisJSON模塊,它允許開(kāi)發(fā)者在Redis數(shù)據(jù)庫(kù)中直接存儲(chǔ)、查詢和處理JSON數(shù)據(jù),本文將詳細(xì)介紹RedisJSON的工作原理、關(guān)鍵操作、性能優(yōu)勢(shì)以及使用場(chǎng)景,需要的朋友可以參考下
    2024-05-05
  • Redis內(nèi)存滿了的幾種原因和最佳解決方案

    Redis內(nèi)存滿了的幾種原因和最佳解決方案

    Redis是一款高性能的內(nèi)存數(shù)據(jù)庫(kù),被廣泛應(yīng)用于緩存、消息隊(duì)列、計(jì)數(shù)器等場(chǎng)景,然而,由于Redis是基于內(nèi)存的數(shù)據(jù)庫(kù),當(dāng)數(shù)據(jù)量過(guò)大或者配置不合理時(shí),就有可能導(dǎo)致Redis的內(nèi)存滿,本文將介紹Redis內(nèi)存滿的幾種原因,并提供相應(yīng)的解決方案,需要的朋友可以參考下
    2023-11-11
  • 淺談Redis的異步機(jī)制

    淺談Redis的異步機(jī)制

    命令操作、系統(tǒng)配置、關(guān)鍵機(jī)制、硬件配置等會(huì)影響 Redis 的性能,還要提前準(zhǔn)備好應(yīng)對(duì)異常的方案,本文主要介紹了Redis的異步機(jī)制,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2022-05-05

最新評(píng)論

镶黄旗| 改则县| 沽源县| 合水县| 万州区| 滨海县| 许昌市| 大余县| 榆林市| 大新县| 固原市| 福贡县| 杭锦旗| 桂阳县| 成武县| 资阳市| 双辽市| 连州市| 武平县| 仙游县| 玛曲县| 共和县| 汾西县| 铜梁县| 平昌县| 康乐县| 金川县| 昔阳县| 霞浦县| 长沙市| 黔东| 哈尔滨市| 宁津县| 厦门市| 铁力市| 宝清县| 涿鹿县| 临西县| 渭南市| 清徐县| 侯马市|