Installation and configuration of Redis under Mac and CentOS

Source: Internet
Author: User
Tags install redis
Objective

Recently using Redis, here is a simple way to write the installation and configuration of Redis under Mac and CentOS.

Under Install Mac

installation command:brew intall redis
To run the command:brew services start redis

Centos

CentOS runs under the SU user, or add sudo
installation command:yum install redis
To run the command:service redis start

Configure Mac

Under Mac, its configuration file path is/usr/local/etc/redis.conf

Centos

Under CentOS, its configuration file path is/etc/redis.conf
Note that the SU Editor is used under CentOS.

Content

Redis mainly needs to configure the listening port and password, Mac and CentOS version of the configuration file content.
By default, Redis listens for 127.0.0.1, which can be changed to an IP address or 0.0.0.0 (which means listening for all IPs)

bind 127.0.0.1requirepass zch
Attention

Under CentOS, if you change your password, restarting directly with a command service redis restart will fail. The reason is because the authentication failed (I guess).

It ps -ef|grep redis would be nice to find the process and start it again.

Installation and configuration of Redis under Mac and CentOS

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.