Home  >  Article  >  Database  >  What is the method to compile and install redis from ubuntu source code?

What is the method to compile and install redis from ubuntu source code?

PHPz
PHPzforward
2023-05-26 12:10:071609browse

1. Download the relevant dependency packages

If the server does not allow networking, you can prepare the relevant dependency packages in advance.

apt -y install lrzsz gcc make wget

2. Download the redis source code package and unzip it

1 http://download.redis.io/releases
cd /data
wget http://download.redis.io/releases/redis-5.0.3.tar.gz
tar -zxvf redis-5.0.3.tar.gz

3. Enter the decompressed redis directory and compile

1 cd redis-5.0.3/
2 make

4. Specify the installation directory. Personally, I habitually install it under apps

1 mkdir apps
2 make install PREFIX=/apps/redis

5. Start in the background

Copy the redis.conf file in the redis source directory to /apps/redis/bin, and then modify redis .conf configuration file

Change daemonize no to daemonize yes

1 cd /apps/redis/bin
2 cp /data/redis-5.0.3/redis.conf .
3 vim /apps/redis/bin/redis.conf
 daemonize yes
4 ./redis-server redis.conf

Sixth, start redis

1 ./redis-server redis.conf

What is the method to compile and install redis from ubuntu source code?

The above is the detailed content of What is the method to compile and install redis from ubuntu source code?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete