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

Centos 7 uses shell to achieve rapid installation of redis

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

Share

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

Use shell to write a quick install Redis service #! / bin/bashyum install cpp binutils glibc-kernheaders glibc-common glibc-devel gcc make wget # install the dependent library wget http://download.redis.io/releases/redis-4.0.1.tar.gzif [- f / root/redis-4.0.1.tar.gz] Then tar zxvf redis-4.0.1.tar.gz mv redis-4.0.1 / usr/local/redis cd / usr/local/redis make cd src/ make install else echo "File does not exist!" Exit Fised-I '136s/daemonize no/daemonize yes/' / usr/local/redis/redis.conf # (edit redis service profile Modify the configuration) sed-I '69sAccording 127.0.0.1 to 0.0.0 88s/protected-mode yes/protected-mode no/'' / usr/local/redis/redis.conf sed-I '88s/protected-mode yes/protected-mode no/' / usr/local/redis/redis.conf mkdir-p / etc/redis ln-s / usr/local/redis/redis.conf / etc/redis/6379.conf # (place the configuration file in the default profile Road Power) ln- S / usr/local/redis/utils/redis_init_script / etc/init.d/redisd # (configure initialization files in the system's self-booting folder Redisd is the service name, which can be modified by yourself) service redisd start # (enable redis service, service name: redisd) # redis-cli netstat-ntpl | grep redisecho "Redis deployment complete!" Echo "echo" if your system is Centos 7, pay attention to the firewall after installation, you can execute the following command to release redis external communications. " Echo "firewall-cmd-zone=public-add-port=6379/tcp-permanent" echo "firewall-cmd-reload" echo "firewall-cmd-zone=public-query-port=6379/tcp"

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