Redis 安装
前提:
找到一个虚拟机这台虚拟机必须连接外网
ping www.baidu.com
1.上传
2.解压
3.准备编译c++的环境
yum -y install gcc-c++
安装tcl
yum -y install tcl
4.进行编译进入安装目录
make && make install
编译成功的结果
5.修改配置文件
1.创建两个文件logs redisdata
-
mkdir -p /export/servers/redis-3.2.8/logs
-
mkdir -p /export/servers/redis-3.2.8/redisdata
2.修改redis.conf 修改一下内容
bind node01
daemonize yes
pidfile /var/run/redis_6379.pid
logfile "/export/servers/redis-3.2.8/logs/redis.log"
dir /export/servers/redis-3.2.8/redisdata
3.启动redis
-
cd /export/servers/redis-3.2.8/src
-
redis-server ../redis.conf
4.查看是否启动成功
-
ps -ef |grep redis
-
root 7236 1 0 00:29 ? 00:00:00 ./redis-server node01:6379
5.客户端连接
./redis-cli -h node01