linux停redis的安装
linux下redis的安装linux下redis的安装命令如下:wget http://code.google.com/p/redis/downloads/detail?n
linux下redis的安装
linux下redis的安装命令如下:
wget http://code.google.com/p/redis/downloads/detail?name=redis-2.0.4.tar.gz tar xvzf redis-2.0.4.tar.gz cd redis-2.0.4 make mkdir /home/redis cp redis-server /home/redis cp redis-benchmark /home/redis cp redis-cli /home/redis cp redis.conf /home/redis cd /home/redis
在安装过程中可能需要用到sudo命令,可能新装的redhat虚拟机中新用户还不能使用sudo命令,因此需要手动的修改/etc/sudoers文件,命令如下:
cd /etc su root ##切换为root用户,同时输入密码 chmod u+w sudoers ##放开sudoers文件的写权限 ##在root ALL = (ALL) ALL下面一行增加 "你的用户名" ALL = (ALL) ALL :wq ##保存退出 chmod u-w sudoers ##取消修改权限
启动 ./redis-server redis.conf
客户端连接 ./redis-cli -h IP -p Port
完毕!