Centos6 installed Redis

One, Redis installation

1. Download Redis

Two ways: First, open the terminal directly, and then enter the following command: wget http://download.redis.io/releases/redis-4.0.2.tar.gz

< p>      The second type, downloaded on this machine, copy the Redis compressed package to centos< /p>

When I use the first method, I will not be able to access the Redis download site.

So I chose to use the second method. This article will only describe the second method. Use of

To use the second method, you need to install VMware tools first to achieve the purpose of copying text and dragging files between the local machine and the virtual machine

How Install VMware tools: http://www.360kuai.com/pc/93011186c1f8c8b8b?cota=4&tj_url=xz&sign=360_57c3bbd1&refer_scene=so_1

Download Redis on this machine: http://download.redis.io/releases/redis-4.0.2.tar.gz

After the download is complete, copy and paste directly into centos

2 .Install Redis

The first step: yum installs gcc dependencies

First switch to root user, command: su, then enter the password.

Then enter the command :yum install gcc

When you encounter a choice, just enter y

Step 2: Unzip Redis

First open a new terminal: then find the directory where the Redis compressed package is located

Enter

Unzip command: tar -zxvf redis-4.0.6.tar.gz

Here are a few commands that will be used

# ############################################## ############################################## ####

ls Display directory or path

Share pictures

cd Switch directory (return to the previous one: “cd ..”, return to the root directory: “cd”)

Share a picture

ifconfig Network card configuration details

strong>

ping Test network connectivity

tar –xvf file.tar //Unzip the tar package

tar -xzvf file.tar.gz //Unzip tar.gz

Vim edit file content (Keyboard control document status , Ikey means editing state, esckey means exit editing state, enter :wp means save and exit: p means exit without saving :w means saving without exit)

For example: vim redis.conf

############################################## ##################################### ################

Step 3: Compile and install

After decompression is complete, click on the command line Enter: make MALLOC=libc

Step 4: Start Redis

Use the cd command to find the directory containing the Redis-server file

Then execute it directly

share picture

When you see the following content, it will start successfully

share picture

Step 5: Set the background process to start redis

1. Find the redis.conf Directory

2, enter the following command: vim redis.conf to open it

< p>3, switch to editing mode, press the letter i on the keyboard, and change

daemonize no to daemonize yes

and will

share picture

Change to

Share pictures

(This step is to prepare for connecting to the Redis desktop manager)

4, press the esc key to exit the editing mode, enter: wp to save And exit

Leave a Comment

Your email address will not be published.