Install the new Redis

Source: Internet
Author: User
Tags redis server

http://redis.io/

# wget http://download.redis.io/redis-stable.tar.gz

Tar zxvf redis-stable.tar.gz-c/usr/local/

Cd/usr/local/redis

Make MALLOC=LIBC

==========================================================

To force compiling against libc malloc, use:

% make MALLOC=LIBC

To compile against Jemalloc in Mac OS X systems, use:

% make Malloc=jemalloc

Allocator ALLOCATOR,LIBC is not the default allocator, the default is Jemalloc, because Jemalloc is proven to have fewer fragmentation problems than libc.

=======================================================================

Make MALLOC=LIBC

CD src

yum-y Install TCL //hint missing this thing

Make test //Here executes 2 times, do not know why, but all follow the prompts, until the following interface appears

167 Seconds-integration/replication

172 Seconds-integration/replication-psync

145 seconds-unit/obuf-limits

\o/all tests passed without errors!

Cleanup:may take some time ... Ok

# CD Utils

#./install_server.sh

Welcome to the Redis service installer

This script would help you easily set up a running Redis server

Please select the Redis port for this instance: [6379]

Selecting default:6379

Please select the redis config file name [/etc/redis/6379.conf]

Selected Default-/etc/redis/6379.conf

Please select the Redis log file name [/var/log/redis_6379.log]

Selected Default-/var/log/redis_6379.log

Please select the data directory for this instance [/var/lib/redis/6379]

Selected Default-/var/lib/redis/6379

Please select the Redis executable path [/usr/local/bin/redis-server]

Selected Config:

port:6379

Config File:/etc/redis/6379.conf

Log File:/var/log/redis_6379.log

Data dir:/var/lib/redis/6379

Executable:/usr/local/bin/redis-server

Cli executable:/USR/LOCAL/BIN/REDIS-CLI

Is this OK? Then press ENTER to go on or ctrl-c to abort.

copied/tmp/6379.conf =/etc/init.d/redis_6379

Installing service ...

Successfully added to chkconfig!

Successfully added to Runlevels 345!

Starting Redis Server ...

Installation successful!

#

#/usr/local/bin/redis-server/etc/redis/6379.conf

# NETSTAT-NLT

Active Internet connections (only servers)

Proto recv-q send-q Local address Foreign address state

TCP 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN

# cd/usr/local/bin/

# ls

Redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server

#./redis-cli

127.0.0.1:6379> Help

REDIS-CLI 3.2.1

To get help about Redis commands type:

"Help @<group>" to get a list of commands in <group>

"Help <command>" to help on <command>

"Help <tab>" to get a list of possible Help topics

"Quit" to exit

To set REDIS-CLI perferences:

": Set hints" Enable online hints

": Set nohints" Disable online hints

Set your preferences in ~/.REDISCLIRC

127.0.0.1:6379>

127.0.0.1:6379> Exit

# more/etc/redis/6379.conf |grep requirepass //The default password is not enabled and can be found in

# If The master is password protected (using the "Requirepass" configuration

# Requirepass Foobared

Install the new Redis

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.