搭建Redis服務器 (Linux)

在這裏插入圖片描述

[root@redis redis]# yum -y install  gcc                   //安裝gcc編譯器

在這裏插入圖片描述

 [root@redis redis]# ls                                        
    redis-4.0.8      redis-4.0.8.tar.gz
 [root@redis redis]# cd redis-4.0.8/                   //進入目錄

在這裏插入圖片描述

[root@redis redis]#   make &&  make install                  //進行編譯

在這裏插入圖片描述
[root@redis redis]# [root@redis redis-4.0.8]# ./utils/install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379]
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]
Selected default - /var/lib/redis/6379
Please select the redis executable path [/usr/local/bin/redis-server]
Selected config:

Port : 6379 //端口號
Config file : /etc/redis/6379.conf //配置文件目錄
Log file : /var/log/redis_6379.log //日誌目錄
Data dir : /var/lib/redis/6379 //數據庫目錄
Executable : /usr/local/bin/redis-server //啓動程序的目錄
Cli Executable : /usr/local/bin/redis-cli //命令行的連接工具
Is this ok? Then press ENTER to go on or Ctrl-C to abort. //回車完成配置
Copied /tmp/6379.conf => /etc/init.d/redis_6379 //服務啓動腳本

Installing service…
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server…
Installation successful! //安裝成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章