日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

Linux服务器运行环境搭建(二)——Redis数据库安装

發(fā)布時(shí)間:2024/7/19 linux 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux服务器运行环境搭建(二)——Redis数据库安装 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

官網(wǎng)地址:http://redis.io/

官網(wǎng)下載地址:http://redis.io/download

?

1. 下載Redis源碼(tar.gz),并上傳到Linux

2. 解壓縮包:tar zxvf redis-2.8.17.tar.gz

3. 進(jìn)入解壓縮后的文件夾:cd redis-2.8.17

4. 編譯源碼:make

(1)若出現(xiàn)如下提示,則說明未安裝gcc,使用命令安裝gcc:yum install gcc

[root@localhost redis-2.8.17]# make cd src && make all make[1]: Entering directory `/root/redis-2.8.17/src' CC adlist.o /bin/sh: cc: command not found make[1]: *** [adlist.o] Error 127 make[1]: Leaving directory `/root/redis-2.8.17/src' make: *** [all] Error 2

(2)若出現(xiàn)如下提示,則將make改為make MALLOC=libc,推測是因?yàn)榫幾g庫的問題。

[root@localhost redis-2.8.17]# make cd src && make all make[1]: Entering directory `/root/redis-2.8.17/src' CC adlist.o In file included from adlist.c:34: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2: error: #error "Newer version of jemalloc required" make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/root/redis-2.8.17/src' make: *** [all] Error 2

5. 安裝編譯后的文件:make install,redis可執(zhí)行文件將被復(fù)制到/usr/local/bin/,但沒有配置,手動(dòng)復(fù)制配置:cp redis.conf /usr/local/bin

6. 設(shè)置Redis密碼,編輯剛剛復(fù)制的配置文件:vi redis.conf,解除requirepass參數(shù)的注釋,并設(shè)置值,例如:requirepass ljx520

7. 使用配置文件啟動(dòng)Redis數(shù)據(jù)庫:./redis-server redis.conf

如果看到如下的界面,那么恭喜你,Redis已安裝成功

轉(zhuǎn)載于:https://www.cnblogs.com/emberd/p/4689900.html

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)

總結(jié)

以上是生活随笔為你收集整理的Linux服务器运行环境搭建(二)——Redis数据库安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。