centos 6.7 下安裝 redis-3.2.5的步驟
前期準(zhǔn)備:
1. 操作系統(tǒng)需要安裝 gcc 包 與 TCL 庫, 通過配置本地 yum 源 ,yum -y install gcc 、 yum -y install tcl安裝
2. 下載 redis 安裝包,上傳至 linux 下。 網(wǎng)址: http://download.redis.io/releases/
[root@mysql ~]# ll redis-3.2.5.tar.gz -rw-r--r--. 1 root root 1544040 Jun 1 22:57 redis-3.2.5.tar.gz
說明:centos7配置本地yum源的方法,請參考 http://www.dbjr.com.cn/article/108594.htm
正式安裝
3. 解壓
[root@mysql ~]# tar -xzvf redis-3.2.5.tar.gz
4. 編譯安裝
[root@mysql ~]# cd redis-3.2.5 [root@mysql redis-3.2.5]# make && make install
說明:逐次執(zhí)行上述命令,這樣 Redis 會安裝在/usr/local/bin/路徑下。
5. 修改配置文件
在 redis-3.2.5路徑下有一個 redis.conf 文件,需要拷貝并創(chuàng)建到/etc 路徑下,命令如下
所示:
[root@mysql redis-3.2.5]# mkdir -p /etc/redis [root@mysql redis-3.2.5]# mv redis.conf /etc/redis/
6. 修改配置文件
[root@mysql redis-3.2.5]#vim /etc/redis/redis.conf [root@mysql redis-3.2.5]# cat /etc/redis/redis.conf daemonize yes pidfile /var/run/redis_6379.pid port 6379
7. 運行/ 停止 Redis
-- 啟動
[root@mysql redis-3.2.5]# redis-server /etc/redis/redis.conf [root@mysql redis-3.2.5]# ps -ef|grep redis root 5845 1 0 23:29 ? 00:00:00 redis-server *:6379 root 5854 2553 0 23:30 pts/1 00:00:00 grep redis
說明:第一條命令表示啟動 redisserver,第二條命令表示查看 redis 服務(wù)是否啟動正常。
-- 關(guān)閉
[root@mysql redis-3.2.5]# redis-cli shutdown [root@mysql redis-3.2.5]# ps -ef|grep redis root 5861 2553 0 23:31 pts/1 00:00:00 grep redis
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
Linux加入windows ad域步驟詳解(winbindsamba方案)
本文主要實驗centos加入windows AD的方法,大家參考使用2013-12-12