1. To let Redis run on a Linux virtual machine, you need to modify the redis.conf configuration file (usually using a backup file to avoid destroying the original configuration file).
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/94/DC/wKiom1kPHKzyhfmuAABR_6c1YEA118.png "title=" 28. PNG "alt=" Wkiom1kphkzyhfmuaabr_6c1yea118.png "/>
This paragraph of English means "the default Redis is not running in the background, if needed, modify to Yes"
That is daemonize yes.
2. Check if Redis is running in the background:
Using Ps-ef | grep redis Command (Ps-ef | grep Redis)
Description
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/94/DC/wKiom1kPHOORywnXAAAzKzGxOyI807.png "title=" 29. PNG "alt=" Wkiom1kphoorywnxaaazkzgxoyi807.png "/>
The PS command is for displaying a process,-EF is actually for-E and-f,-e as displaying all programs, and-F for displaying UID, PPID, C, and Stime fields.
grep command is to find, middle of | is the pipe command, which refers to the PS command and the grep command to execute simultaneously.
So Ps-ef | grep redis This command means that all relevant processes related to Redis are displayed.
The parameters correspond to:
UID---root (refers to which UID the program is owned by);
PID--2785 (ID number of this program);
PPID--2703 (the ID number of the program's parent program);
C--0 (percent of resources used by CPU);
Stime-05:34 (System boot time)
TTY---PTS/1 (TTY login terminal location)
Time-to-00:00:00 (CPU times used)
CMD--and grep--color=auto Redis (cmd-issued instructions)
3, check the query results, determine whether to run:
Because PS-EF is a message that shows all processes
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/94/DC/wKioL1kPHZrxnlaqAABnnMCPxBY026.png "title=" 30. PNG "alt=" Wkiol1kphzrxnlaqaabnnmcpxby026.png "/>
This includes both Redis and grep--color=auto Redis, while Gref is the row that looks for the output that contains the string you want, which means that grep redis is looking for output lines that contain the "Redis" string in all running processes.
That is, if the Redis background starts, three parts of the content are displayed, and its grep redis query is Redis-server *:6379, Redis-cli-p 6379, and grep--color=auto Redis.
4. How to start Redis:
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/94/DC/wKiom1kPHSPCK0cEAAA_jrkYrd0223.png "title=" 31. PNG "alt=" Wkiom1kphspck0ceaaa_jrkyrd0223.png "/>
Under root user permissions, in turn, enter redis-server/myredis/redis.conf in the terminal
Redis-cli-p 6379
The 3rd step method is then used to detect if it is started.
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/94/DC/wKiom1kPHgmATarzAABijFodlHU736.png "title=" 32. PNG "alt=" Wkiom1kphgmatarzaabijfodlhu736.png "/>
This article is from the "12392717" blog, please be sure to keep this source http://12402717.blog.51cto.com/12392717/1922955
To verify that Redis installed under Linux has been started in the background