您的位置:首页 > 数据库 > Redis

安装Redis

2015-07-15 09:26 621 查看
yum install tcl
wget http://download.redis.io/releases/redis-3.0.0.tar.gz
tar xzf redis-3.0.0.tar.gz

vim /etc/sysctl.conf

#add for redis
vm.overcommit_memory = 1
net.core.somaxconn = 1024

#vim /etc/rc.local
echo never > /sys/kernel/mm/transparent_hugepage/enabled

如何设置开机启动 redis 服务

阅读自带的readme 文件设置

Installing Redis
-----------------

In order to install Redis binaries into /usr/local/bin just use:

% make install

You can use "make PREFIX=/some/other/directory install" if you wish to use a
different destination.

Make install will just install binaries in your system, but will not configure
init scripts and configuration files in the appropriate place. This is not
needed if you want just to play a bit with Redis, but if you are installing
it the proper way for a production system, we have a script doing this
for Ubuntu and Debian systems:

% cd utils
% ./install_server.sh

The script will ask you a few questions and will setup everything you need
to run Redis properly as a background daemon that will start again on
system reboots.

You'll be able to stop and start Redis using the script named
/etc/init.d/redis_<portnumber>, for instance /etc/init.d/redis_6379.

Code contributions
---

按照命令提示设置即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: