Redis installation for Linux systems (Windows/Linux)

1. Redis installation under Windows (comparison):

    Download address: https://redis.io/download

Find the installation package of window, decompress redis-latest.zip directly, and configure the path.

Start the server first, then open another window and open the client redis-cli.



success!

2. Installation under Linux:

After tossing for a whole morning, I found that my network configuration was not configured properly. Since I didn't learn the network address before, I checked the file /etc/.../ifcfg-eth0 and there is no address. (The solution is to reinstall it, select the NAT mode, and understand several modes.)

1. The installation environment, since redis is developed in C, the compilation depends on the gcc environment

2. Upload files with FileZ

3. Unzip the file, then enter the file, make compile it

4. Install it, and put the decompressed configuration file in the installation file, and modify the configuration file to start as backend startup

5. Open redis


1. Install and decompress  tar -zxvf redis-4.0.9, cd, make

   



2. Install, enter the file, copy redis.conf, change the parameter daemonize to yes, and start it in the bin file.





3. When finally starting the server, not only start the server, but also add a configuration file. It will check to see how the startup was successful and how to close it.




4. Open redis-cli and use redis:



3. Simple installation of Jedis:

A basic connection operation for the Java language.

For the first time, this port of 6379 may not be opened.


As you can see, only port 22 is opened, then copy yy and paste p. Change to 6379. Change it and restart the firewall

The first sentence opens the firewall, the second sentence restarts.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325935553&siteId=291194637