Installation Steps 1. Install Redis Download the redis image through 2. Create a new mount configuration folder Create two new folders, data and conf, in any location. mkdir -p /root/docker/redis/data mkdir -p /root/docker/redis/conf Note: Because of the default configuration of redis, you will find that you can only connect locally and cannot access remotely. Using 3. Add the configuration file redis.conf Create a new file redis.conf in the newly created redis/conf with the following content: #bind 127.0.0.1 //Allow remote connection protected-mode no appendonly yes //Persistence requirepass 123456 //Password 4. Create and start the redis container The execution command is as follows: docker run --name myredis -p 6379:6379 -v /root/docker/redis/data:/data -v /root/docker/redis/conf/redis.conf:/etc/redis/redis.conf -d redis redis-server /etc/redis/redis.conf The interpretation is as follows: –name: Give the container a name 5. Startup successful, check the status Check the startup status through docker ps to see if it is successful 6. Test the connection inside the container Execute Log in using The completed command is as follows: [root@*** conf]# docker exec -it myredis redis-cli 127.0.0.1:6379> set name jfaith (error) NOAUTH Authentication required. 127.0.0.1:6379> auth 123456 OK 127.0.0.1:6379> set name wangcai OK 127.0.0.1:6379> get name "jfaith" Note: If this error occurs: (error) NOAUTH Authentication required. Explanation: No password was entered for verification. Please enter: auth your password Summarize The above is the method of Linux environment deployment and Docker installation of redis introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
>>: How to use mqtt in uniapp project
The value of the background property in CSS backg...
Table of contents Concept Introduction Logical ru...
JDK download address: http://www.oracle.com/techn...
With the continuous development of the Internet ec...
First download the latest MySQL 5.7.17 Community ...
Recently, when I was working on a front-end vue.j...
Navicat reports errors 10060 and 1045 when connec...
1. Mobile selection of form text input: In the te...
Table of contents Import on demand: Global Import...
Please open the test page in a mainstream browser...
How to change the password in MySQL 5.7.18: 1. Fi...
Some web pages may not look large but may be very ...
Table of contents 1. Introduction 2. GitHub 3. Ba...
Preface: Sometimes, the session connected to MySQ...
The specific method is as follows: CSS Code Copy ...