您好,登錄后才能下訂單哦!
本篇內(nèi)容主要講解“CentOS上安裝怎么Redis”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“CentOS上安裝怎么Redis”吧!
Redis 是一個(gè)高性能的key-value數(shù)據(jù)庫。 redis的出現(xiàn),很大程度補(bǔ)償了memcached這類keyvalue存儲的不足,在部 分場合可以對關(guān)系數(shù)據(jù)庫起到很好的補(bǔ)充作用。
Linux下載redis地址:
wget http://download.redis.io/releases/redis-5.0.8.tar.gz
先在opt目錄下建立一個(gè)軟件包上傳文件夾 :
mkdir /opt/software
把 redis-5.0.8.tar.gz 上傳到 /opt/software/
安裝gcc編譯環(huán)境,用來執(zhí)行make命令:
yum -y install gcc gcc-c++
tar -xzvf redis-5.0.8.tar.gz
mv /opt/software/redis-5.0.8 /usr/local/src/
make
make install PREFIX=/usr/local/redis
mkdir /etc/redis/
cp /usr/local/src/redis-5.0.8/redis.conf /etc/redis/
vim /etc/redis/redis.conf
bind 0.0.0.0protected-mode noport 6379tcp-backlog 511timeout 0tcp-keepalive 300daemonize yessupervised nopidfile /var/run/redis_6379.pidloglevel noticelogfile /var/log/redis/redis_master.logdatabases 16always-show-logo yessave 900 1save 300 10save 60 10000stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /opt/redis_datareplica-serve-stale-data yesreplica-read-only yesrepl-diskless-sync norepl-diskless-sync-delay 5repl-disable-tcp-nodelay noreplica-priority 100maxmemory 10000000kblazyfree-lazy-eviction nolazyfree-lazy-expire nolazyfree-lazy-server-del noreplica-lazy-flush noappendonly yesappendfilename "appendonly.aof"appendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mbaof-load-truncated yesaof-use-rdb-preamble yeslua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128latency-monitor-threshold 0notify-keyspace-events ""hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-size -2list-compress-depth 0set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64hll-sparse-max-bytes 3000stream-node-max-bytes 4096stream-node-max-entries 100activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit replica 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10dynamic-hz yesaof-rewrite-incremental-fsync yesrdb-save-incremental-fsync yes
可以把我的配置配置文件進(jìn)行復(fù)制到你的配置文件中。
mkdir /var/log/redis/mkdir /opt/redis_data
/usr/local/redis/bin/redis-server /etc/redis/redis.conf
ps -ef |grep redis
/usr/local/redis/bin/redis-cli
回車
redis-cli shutdown
kill -9 PID
(你的進(jìn)程ID,通過這個(gè)命令進(jìn)行查詢ps -ef |grep redis )
或者
pkill redis
到此,相信大家對“CentOS上安裝怎么Redis”有了更深的了解,不妨來實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。