Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Setting method of installing Redis, background running and system self-starting in Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to install Redis, run in the background and start the system in Linux. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

Redis is an open source, free, high-performance distributed memory database written in C language, which runs on memory and supports persistent NoSQL database.

Installation

1) download redis package, such as redis-5.0.3.tar.gz, from the official website http://download.redis.io/releases/

2) upload the Linux server directory opt, decompress the package tar-zxvf redis-5.0.3.tar.gz, and the folder name redis-5.0.3

3) cut the directory mv redis-5.0.3 / usr/local/redis into the folder directory, execute the make command, and continue to execute make install after make is completed.

4) enter the src directory and execute. / redis-server.. / redis.conf   to start the service

5) Log in to the redis service,. / redis-clic

Redis does not have a login password and runs in the console window by default. Modify the requirepass password of the redis.conf file and the daemonize parameter to execute in the background.

The requirepass parameter is not enabled by default

Yes value is in background mode

System self-start

1) copy the configuration file redis.conf / etc/redis/ and rename it 6379.conf

2) Edit the configuration file, and run daemonize as yes in the background

3) copy the file cp utils/redis_init_script / etc/init.d/redis in the installation directory

4) Edit the redis file in the previous step, and modify the first few lines of the file according to the actual directory

Set file execution permissions chmod 777 / etc/init.d/redis

5) set it to boot: chkconfig redis on

    is set to power on and off: chkconfig redis off

6) start the service

Service redis start

Out of Service

Service redis stop

Other

Copy common commands to / usr/local/bin and shut down the service redis-cli shutdown

On "installing Redis in Linux, background running, system self-startup setting method" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report