Redis Cache fully automatic shell script installation

Source: Internet
Author: User
Tags create directory

I just put the command in the shell file, easy to install, the code is as follows:

#!/bin/bash# Shell Execution Options: #-N reads only the shell script, but does not actually execute #-x Enter the tracking mode, showing each command executed #-C"string"read command from strings # download directory Downloadsdir=/root/downloads# installation directory Appdir=/usr/local/redis# determine if the backup directory exists, and create a new directory when not in storage [! -D $downloadsDir] && mkdir-p $downloadsDircd $downloadsDir # Download, unzip, compile wget http://download.redis.io/redis-stable.tar.gzTar xvzf redis-STABLE.TAR.GZCD Redis-Stablemake&&make test# if prompted for Tcl or later # yum install-y tcl# make test is generally recommended, I prompt you need TCL when make test8.5or newerinchorder to run the Redis test# wget http://prdownloads.sourceforge.net/tcl/tcl8.6.0-src.tar.gz# After downloading, go to the installation directory, go to UNIX, and then execute"./configure"And make , then make install# copy execution file cp src/redis-server/usr/local/bin/CP src/redis-cli/usr/local/bin/# Create directory mkdir/etc/Redismkdir/var/Redismkdir/var/redis/Logmkdir/var/redis/Runmkdir/var/redis/port# Copy Redis solution in the configuration file template in the directory CP redis.conf/etc/redis/redis.conf# Modifying the configuration file echo"################################ zhaoxiace DEFINE ##############################">>/etc/redis/Redis.confecho"daemonize Yes">>/etc/redis/Redis.confecho"Pidfile/var/redis/run/redis.pid">>/etc/redis/Redis.confecho"Logfile/var/redis/log/redis.log">>/etc/redis/Redis.confecho"Dir/var/redis/port">>/etc/redis/redis.conf# running Redisredis-server/etc/redis/redis.conf

Redis Cache fully automatic shell script 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.