Redis standalone version installation and startup

Source: Internet
Author: User
Tags redis version

1. Create a Reids user first

[Email protected] ~]# yum-y install TCL

[Email protected] ~]# Useradd Redis

[Email protected] ~]# passwd Redis

Changing password for user Redis.

New Password:

Bad password:it are too short

Bad Password:is too simple

Retype new Password:

Passwd:all authentication tokens updated successfully.

[Email protected] ~]#

2. Download the installation package

[Email protected] ~]# Su-redis

[Email protected] ~]$ wget

Http://120.52.72.46/download.redis.io/c3pr90ntcsf0/releases/redis-3.0.6.tar.gz

--2016-01-31 21:47:42--

Http://120.52.72.46/download.redis.io/c3pr90ntcsf0/releases/redis-3.0.6.tar.gz

Connecting to 120.52.72.46:80 ... Connected.

HTTP request sent, awaiting response ... OK

length:1372648 (1.3M) [Application/x-gzip]

Saving to: "Redis-3.0.6.tar.gz"

100%[==========================================================================

=================>] 1,372,648 12.5k/s in 1m 58s

2016-01-31 21:49:41 (11.3 kb/s)-"redis-3.0.6.tar.gz" saved [1372648/1372648]

3. Unzip the installation

[email protected] ~]$ LL

Total 1344

-rw-rw-r--1 Redis 1372648 Dec 23:24 redis-3.0.6.tar.gz

[Email protected] ~]$ TAR-ZXF redis-3.0.6.tar.gz

[Email protected] ~]$ CD redis-3.0.6

[[email protected] redis-3.0.6]$ ls

00-releasenotes contributing Deps Makefile README runtest

Runtest-sentinel src utils

BUGS COPYING INSTALL MANIFESTO redis.conf runtest-cluster

SENTINEL.CONF Tests

[[email protected] redis-3.0.6]$ make

LINK redis-check-aof

Hint:it ' s a good idea to run ' make test ';)

MAKE[1]: Leaving directory '/HOME/REDIS/REDIS-3.0.6/SRC '

[[email protected] redis-3.0.6]$ make test

...

...

\o/all tests passed without errors!

Cleanup:may take some time ... Ok

MAKE[1]: Leaving directory '/HOME/REDIS/REDIS-3.0.6/SRC '

[Email protected] redis-3.0.6]$

4. Modify the configuration file

[Email protected] redis-3.0.6]$ vim/home/redis/redis-3.0.6/redis.conf

Daemonize Yes

Pidfile/home/redis/redis-3.0.6/redis.pid

Port 6379

Bind 127.0.0.1

Timeout 300

LogLevel verbose

LogFile "redis-3.0.6"

Databases 16

Save 900 1

Save 300 10

Save 60 10000

Rdbcompression Yes

Dir./

[Email protected] redis-3.0.6]$/home/redis/redis-3.0.6/src/redis-server

/home/redis/redis-3.0.6/redis.conf

[Email protected] redis-3.0.6]$ Cat/home/redis/redis-3.0.6/redis.log

_._

_.-' __ '-._

_.-`` `. `_. "-._ Redis 3.0.6 (00000000/0)

.-`` .-```. ' \ \ _.,_ '-._

(',.-' | ',) Running in standalone mode

| '-._ '-...-' __...-. '-._| ' ' _.-' | port:6379

| '-._ '. _/_.-' | pid:23060

'-._ '-._ '-./_.-' _.-'

| '-._ '-._ '-.__.-' _.-' _.-' |

| '-._ '-._ _.-' _.-' | Http://redis.io

'-._ '-._ '-.__.-' _.-' _.-'

| '-._ '-._ '-.__.-' _.-' _.-' |

| '-._ '-._ _.-' _.-' |

'-._ '-._ '-.__.-' _.-' _.-'

'-._ '-.__.-' _.-'

'-._ _.-'

'-.__.-'

23060:m Jan 22:20:40.538 # warning:the TCP Backlog setting of 511 cannot be enforced

Because/proc/sys/net/core/somaxconn is set to the lower value of 128.

23060:m Jan 22:20:40.538 # Server started, Redis version 3.0.6

23060:m Jan 22:20:40.538 # WARNING Overcommit_memory is set to 0! Background Save

May fail under low memory condition. To fix the issue add ' vm.overcommit_memory = 1 ' to

/etc/sysctl.conf and then reboot or run the command ' Sysctl Vm.overcommit_memory=1 ' for this

To take effect.

23060:m 22:20:40.538 * The server is now a ready-to-accept connections on port 6379

23060:m 22:20:40.538-0 clients connected (0 slaves), 757352 bytes in use

...

[Email protected] redis-3.0.6]$

[Email protected] ~]# vim/etc/sysctl.conf

Vm.overcommit_memory = 1

[Email protected] ~]# sysctl-p

[Email protected] ~]# echo 0 >/proc/sys/vm/overcommit_memory

[Email protected] ~]# echo >/proc/sys/vm/overcommit_ratio

To test with a client connection:

[Email protected] redis-3.0.6]$/home/redis/redis-3.0.6/src/redis-cli-p 6379

127.0.0.1:6379> Set username Liweiwei

Ok

127.0.0.1:6379> Get username

"Liweiwei"

127.0.0.1:6379> exit

[Email protected] redis-3.0.6]$


This article is from the "bjx1101" blog, make sure to keep this source http://lww2016.blog.51cto.com/3560553/1742363

Redis standalone version installation and startup

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.