Installation and configuration of Redis under Linux

Source: Internet
Author: User
Tags redis server

Redis is an open source API that is written in ANSI C, supports the web, can be persisted in memory, key-value databases, and provides multiple languages.

Redis is a member of the NoSQL technology camp.

When it comes to NoSQL, what is NoSQL?

NoSQL is a new type of database, not just SQL, which is not like a relational database,--sql by a common operating language, and each NoSQL database has its own API and syntax.

Redis Official website: https://redis.io/

Chinese Civil Service Network: http://redis.cn/

After introducing Redis, the following details the construction of the REDIS environment:

The latest version of Redis is 4.0, but the stable version is 3.2. We use 3.2 as an example.

1. Download

wget http://download.redis.io/releases/redis-3.2.8.tar.gz

2. Unzip

TAR-ZXVF redis-3.2.8.tar.gz

3. Copying

Put it in the/usr/local/directory (pure personal habits)

sudo mv./redis-3.2.8/usr/local/redis/

4. Go to the Redis directory

cd/usr/local/redis/

5. Build

sudo make

6. Testing

sudo make test

7. Installation

The tutorial I saw in this step says it will be installed in the/usr/bin/directory, but I run it in the/usr/local/bin/directory

sudo make install

8. The installation is completed into the installation directory can be seen as follows:

which

      • Redis-server Redis Server
      • REDIS-CLI Redis command-line Client
      • Redis-benchmark Redis Performance Testing Tool
      • Redis-check-aof aof File Repair Tool
      • Redis-check-rdb RDB File Retrieval Tool

9. Configuration

The extracted Redis folder has the original file of the configuration file: redis.conf

You can copy this file to another location, and then copy the file for modification.

Here, we copy to/etc/redis/

sudo cp/usr/local/redis/redis.conf/etc/redis/

At this point, Redis installation is complete, the following is the Redis configuration

Above we have copied a redis default profile under/etc/redis/, we can modify this profile, and then start the Redis service through this configuration file.

Describes several core configuration items:

Bind IP:

Bind 127.0.0.1

IP here if you want to remotely access, write the destination IP

Port:

Port 6379

6379 is the default port number for Redis

Whether to run as daemon:

Daemonize Yes

The value can be yes or no, if run as daemon, it will not block at the command line, similar to the service, if run as a non-daemon, it will block at the current terminal

Data files

Dbfilename Dump.rdb

The name of the data file

Data-piece Storage path

Dir/var/lib/redis

A. Part of a blog

Logfile/var/log/redis/redis-server.log

Database, with 16 default

Database 16

The above is a few common configuration items, as well as detailed configuration item information can refer to http://blog.csdn.net/ljphilp/article/details/52934933, which is detailed in this blog post.

Installation and configuration of Redis under Linux

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.