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

Centos7 install redis and set boot up

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Install redis first

Tar xzf redis-3.0.0.tar.gz

Cd redis-3.0.0/

Make

Make install PREFIX=/usr/local/redis

Create a directory to store redis and copy files

Mkdir-p / usr/local/redis

Cd src/

Cp. / redis-server / usr/local/redis/

Cp. / redis-cli / usr/local/redis/

Cd..

Cp redis.conf / usr/local/redis/

Back-end startup

Copy the redis.conf configuration file in the redis source package to / usr/local/redis/bin/ (above)

Modify redis.conf to change daemonize from no to yes

Start when you are finished:

. / redis-server redis.conf

Set up boot boot

Create a redis folder under the / etc directory

Cd / etc/

Mkdir redis

Copy the / usr/local/redis/redis.conf file to the / etc/redis directory and name it 6379.conf

Cp / usr/local/redis/redis.conf / etc/redis/6379.conf

Make a copy of the startup script of redis and put it in the / etc/init.d directory

Cp / redis-3.0.0/utils/redis_init_script / etc/init.d/redisd

Set redis Boot self-boot

Cd / etc/init.d/

Vi redisd

Modify the path, save and exit vi

EXEC=/usr/local/redis/redis-server

CLIEXEC=/usr/local/redis/redis-cli

Execute the boot command

Chkconfig redisd on

Start and shut down redis

Service redisd start

Service redisd stop

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