1. Download the installation package from the redis official website
2. Upload the installation package to FianlShell
3. Create the corresponding file path and switch to the folder where the installation package is located
Input command: (the path inside will be changed according to the actual situation)
tar -zvxf redis-6.0.5.tar.gz -C /urs/local/redis
4. Compile: (need to use gcc, if linux has not installed gcc, you need to install it first)
Use command :
yum install gcc-c++
5, then enter redis-6.0.5, then execute make
6, then enter the installation command:
make PREFIX=/urs/local/redis install
7, the command to start redis on the client ( Enter redis-6.0.5, then enter src and type the following command inside):
./redis-cli
8. The command to start redis in the background (also type the command under src):
./redis-server
can be modified The configuration of redis.conf allows redis to start as a daemon process:
Enter:
vim redis.conf
Enter the configuration file, find daemonize no, change no to yes, so that there will be no problem after startup Graphical interface.
If you need to connect remotely, you can cancel the protected mode, set protected-mode to no, and comment bind at the same time, so that there will be no restrictions on the connected host and you can connect remotely.
9. Check the running status of redis:
ps -ef|grep redis
The above is the detailed content of What are the relevant commands to start redis under server linux?. For more information, please follow other related articles on the PHP Chinese website!