搭建Redis服务器 (Linux),redislinux
[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! //安装成功