这边用的是centos6.4的环境
首先因为redis要用到gcc编译,还会用到tcl工具所以先挂载ios镜像,然后安装对应的rpm包
具体安装如下
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh cpp-4.4.6-4.el6.x86_64.rpm
rpm -ivh gcc-4.4.6-4.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.6-4.el6.x86_64.rpm
rpm -ivh tcl-8.5.7-6.el6.x86_64.rpm
rpm -ivh tcl-pgtcl-1.6.2-3.el6.x86_64.rpm
rpm -ivh tcl-devel-8.5.7-6.el6.x86_64.rpm
用WinSCP把包拷到linux下
解压包命令
tar xzf redis-2.8.22.tar.gz
make MALLOC=libc 编译
make install 安装 会在/usr/local/bin目录下生成本个可执行文件,分别是 redis-server、redis-cli、redis-benchmark、redis-check-aof 、redis-check-dump
/sbin/iptables -I INPUT -p tcp --dport 6379 -j ACCEPT 开端口 (博主是直接把防火墙禁掉)
切换到/usr/local/bin 启动服务器
也可以加配置文件启动 /usr/local/bin/redis-server /usr/redis/redis-2.8.22/redis.conf