Home  >  Article  >  Operation and Maintenance  >  How to compile and install redis under Linux system?

How to compile and install redis under Linux system?

不言
不言Original
2018-09-15 17:10:521413browse

The content of this article is about how to compile and install redis under Linux system? It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Redis is an open source, BSD licensed, advanced key-value storage system that can be used to store strings, hash structures, linked lists, and collections. Therefore, it is often used to provide data structure services.

Unique features of redis compared with memcached:

1: redis can be used for storage, while memccached is used for cache. This feature is mainly due to its "persistence" Function.

2: The stored data has "structure". For memcached, there is only one type of stored data - "string", while redis can store strings, linked lists, and hashes. Structure, collection, ordered collection.

Install redis: Go to the official website to download the stable version

##

cd /usr/local/src
wget http://download.redis.io/releases/redis-4.0.11.tar.gztar zxvf redis-4.0.11.tar.gz
make test  #此处注意,redis不需要configure,使用直接make test即可

Prompt for lack of tcl support, use yum to install tcl

=/usr/local/redis install  cp /usr/local/src/redis/redis.conf ./  

Start redis:

cd /usr/local/redis./bin/redis-server ./redis.conf

After starting, if you see the picture below, it means the startup is successful:

If you want redis to run in the background, you need to modify daemonize in the redis.conf file and change no to yes. It can run in the background.

To connect to redis, you can use the command:/usr/local/redis/bin/redis-cli

Set a name key and get the try Try:

Related recommendations:

Compile and install the memcached service under linux, linuxmemcached

Detailed explanation of the steps to install MySQL under Linux system

The above is the detailed content of How to compile and install redis under Linux system?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn