Ubuntu Install Redis server side

Source: Internet
Author: User
Tags install redis redis server

Ubuntu Install Redis server side

1, enter the following command in the terminal:

sudo apt-get install redis-server after the installation is complete, the Redis server starts automatically and we check the Redis server program.

2, check the Redis server system process,

Input directive: Ps-aux|grep Redis

3. Check Redis server status by starting command.

Input instruction: Netstat-nlt|grep 6379

Using the command-line client to access Redis installation Redis server will automatically install the Redis command-line client program together.

The native Input redis-cli command can be started, and the client program accesses the Redis server.

Input directive: REDIS-CLI

Get the following output:

Redis 127.0.0.1:6379>

Help Entry directives:

Redis 127.0.0.1:6379> Help

4. Modify the configuration

1), modify profile Redis configuration file by default in/etc/redis/redis.conf:

Input instructions:

Vi/etc/redis/redis.conf

Find #requirepass foobared Remove the previous comment,

and modify it to the required password: Requirepass 123123 (where 123123 is the password to set)

Login method:

#redis-cli-h 127.0.0.1-p 6379-a 123123

2), let Redis server be remote access by default, the Redis server does not allow remote access and allows only native access, so we need to set the ability to turn on remote access.

Open the profile redis.conf of the Redis server with VI. Directive Ibid.

Note Bind (add # number) #bind 127.0.0.1

3), restart Redis if Redis is already configured as a service,

Can be restarted in the following ways: Service Redis restart

Ubuntu Install Redis server side

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.