Check whether gcc is installed.
gcc -v
If installed gcc will display the version
If not installed, install it online
yum –y install gcc-c++
Unzip
[root@localhost soft]# tar -zxvf redis-3.0.0
After decompression, you can see our redis folder
Enter our redis directory to compile make
cd redis-3.0.0 make
Create a folder
mkdir /usr/local/redis
Specify the directory for installation
make install PREFIX=/usr/local/redis
Enter the bin folder in our installation directory to start
cd /usr/local/redis/bin ./redis-server
Successful startup effect
Copy the redis.conf configuration file in the redis source package to /usr/local/ Under redis/bin/
First jump to the redis-3.0.0 we decompressed and then copy the configuration file redis.conf
cd soft redis-3.0.0.0 cp redis.conf /usr/local/redis/bin
Modify redis in our bin directory .conf file changes daemonize from no to yes
Jump to our /usr/local/redis/bin first and then modify it
cd /usr/local/redis/bin vi redis.conf
Start
./redis-server redis.conf ./redis-cli
The above is the detailed content of How to install redis in Linux centos7. For more information, please follow other related articles on the PHP Chinese website!