Centos 7 uses shell for rapid Redis installation

Source: Internet
Author: User
Tags install redis

Using the shell to write a quick install Redis service
#!/bin/bashyum Install CPP binutils glibc-kernheaders glibc-common glibc-devel gcc make wget #安装依赖库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 it configuration) Sed-i ' 69s/127.0. 0.1/0.0.0.0/'/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 profile in default profile path) Ln-s/usr/lo CAL/REDIS/UTILS/REDIS_INIT_SCRIPT/ETC/INIT.D/REDISD # (Configure the initialization file to the system self-initiated folder, REDISD as the service name, you can modify it yourself) service REDISD start # ( Turn on Redis service, service name: REDISD) #redis-cli netstat-ntpl|grep Redisecho "Redis deployment complete! "Echo" "echo" If your system is CentOS 7 after installation, watch out for the firewall and execute the following command to release the Redis external communication. "echo" Firewall-cmd--zone=public--add-port=6379/tcp--permanent "echo" Firewall-cmd--reload "echo" firewall-cmd--zone= public--query-port=6379/tcp " 

Centos 7 uses the shell for rapid Redis installation

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.