Cento OS7 compile and install redis-3.2.3

 

1 Download the installation package

wget http://download.redis.io/releases/redis-3.2.3.tar.gz

 2 Unzip

  

tar xzf redis-3.2.3.tar.gz

 3 Move

  

cp redis-3.2.3 /usr/local/redis-3.2.3

 4 Enter the main directory

cd /usr/local/redis-3.2.3

 5 Compile

make

 6 Create the installation directory

mkdir /usr/local/redis

 7 Installation

make PREFIX=/usr/local/redis install

 8 Set environment variables

you ~ / .bash_profile

    Make sure to add /usr/local/redis/bin:

PATH=/usr/local/redis/bin:$PATH:$HOME/bin

 9 Immediately effective environment variable settings

source ~/.bash_profile

 10 Switch to the installation package directory utils folder

cd /usr/local/redis-3.2.3/utils

 11 Perform installation setup

[root@192 utils]# ./install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server

Please select the redis port for this instance: [6379]
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]  /usr/local/redis/conf/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]  /usr/local/redis/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]  /usr/local/redis/data/6379
Please select the redis executable path [] /usr/local/redis/bin/redis-server
Selected config:
Port           : 6379
Config file    : /usr/local/redis/conf/6379.conf
Log file       : /usr/local/redis/log/redis_6379.log
Data dir       : /usr/local/redis/data/6379
Executable     : /usr/local/redis/bin/redis-server
Cli Executable : /usr/local/redis/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!

 12 Test, the terminal input the following command to test

redis-cli

 13 Allow remote access, open /usr/local/redis/conf/6379.conf and note out bind 127.0.0.1 and save

 

# bind 127.0.0.1
 

 

If you think my article helped you, please buy me a drink! I will be very grateful and insist to help you all more!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326868246&siteId=291194637