濮阳杆衣贸易有限公司

主頁 > 知識(shí)庫 > CentOS6.4 安裝Redis 教程詳解

CentOS6.4 安裝Redis 教程詳解

熱門標(biāo)簽:竹間科技AI電銷機(jī)器人 最簡(jiǎn)單的百度地圖標(biāo)注 小紅書怎么地圖標(biāo)注店 地圖標(biāo)注費(fèi)用 百度商家地圖標(biāo)注怎么做 太原營(yíng)銷外呼系統(tǒng) 西藏教育智能外呼系統(tǒng)價(jià)格 地圖標(biāo)注如何即時(shí)生效 玄武湖地圖標(biāo)注

按照下面步驟依次執(zhí)行

1.檢查依賴,安裝依賴

[root@ecs-3c46 ~]# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz
[root@ecs-3c46 ~]# whereis tc
tc: /sbin/tc /usr/lib64/tc /usr/share/tc /usr/share/man/man8/tc.8.gz
[root@ecs-3c46 ~]# whereis wget
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz
[root@ecs-3c46 ~]# yum -y install tcl 

2.進(jìn)入/user/local/src/

[root@ecs-3c46 ~]# cd /user/local/src/ 

3.wget下載redis

[root@ecs-3c46 src]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz 

4.解壓

[root@ecs-3c46 src]tar zxvf redis-3.0.7.tar.gz 

5.將文件轉(zhuǎn)存到/usr/local/redis

[root@ecs-3c46 src]mkdir /usr/local/redis
[root@ecs-3c46 src]mv redis-3.0.7 /usr/local/redis
[root@ecs-3c46 src]ll /usr/local/redis 

6.編譯安裝

[root@ecs-3c46 src]cd /usr/local/redis
[root@ecs-3c46 redis]make  make install 

 7.在etc目錄下創(chuàng)建redi文件夾并創(chuàng)建配置文件,并修改配置文件

[root@ecs-3c46 redis]mkdir -p /etc/redis
[root@ecs-3c46 redis]pwd
[root@ecs-3c46 redis]cp -fr /usr/local/redis/redis.conf /etc/redis/ 

8.vim編輯/etc/redis/redis.conf,修改daemonize屬性為yes

[root@ecs-3c46 redis]# vim /usr/local/redis/redis.conf
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes 

 9.執(zhí)行/usr/loal/bin/redis-server /etc/redis/redis.conf來啟動(dòng)redis服務(wù)器

[root@ecs-3c46 redis]# /usr/loal/bin/redis-server /etc/redis/redis.conf
-bash: /usr/loal/bin/redis-server: No such file or directory
[root@ecs-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf
73449:M 13 May 10:56:00.839 * Increased maximum number of open files to 10032 (it was originally set to 1024).

                _._                                                 
           _.-``__ ''-._                                            
      _.-``    `.  `_.  ''-._           Redis 3.0.7 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 73449
  `-._    `-._  `-./  _.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                 
 |    `-._`-._        _.-'_.-'    |           http://redis.io       
  `-._    `-._`-.__.-'_.-'    _.-'                                  
 |`-._`-._    `-.__.-'    _.-'_.-'|                                 
 |    `-._`-._        _.-'_.-'    |                                 
  `-._    `-._`-.__.-'_.-'    _.-'                                  
      `-._    `-.__.-'    _.-'                                      
          `-._        _.-'                                          
              `-.__.-'                                              

 10.再打開一個(gè)終端,切換至redis的安裝目錄執(zhí)行redis-cli

[root@ecs-3c46 bin]# redis-cli
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> 

以上所述是小編給大家介紹的CentOS6.4 安裝Redis 教程,希望對(duì)大家有所幫助!

標(biāo)簽:澳門 景德鎮(zhèn) 香港 揚(yáng)州 廣東 贛州 唐山 林芝

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《CentOS6.4 安裝Redis 教程詳解》,本文關(guān)鍵詞  CentOS6.4,安裝,Redis,教程,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《CentOS6.4 安裝Redis 教程詳解》相關(guān)的同類信息!
  • 本頁收集關(guān)于CentOS6.4 安裝Redis 教程詳解的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    秦皇岛市| 遵化市| 印江| 伊川县| 平和县| 濮阳市| 望谟县| 凤翔县| 岑溪市| 绥芬河市| 望都县| 宝丰县| 奇台县| 赣州市| 清徐县| 筠连县| 泰州市| 额敏县| 天镇县| 许昌县| 吉首市| 嘉禾县| 沙湾县| 银川市| 德江县| 酒泉市| 二连浩特市| 县级市| 甘谷县| 赤城县| 陇川县| 九龙县| 班玛县| 迭部县| 喀什市| 上杭县| 古田县| 巴里| 应用必备| 黎城县| 绩溪县|