How to modify the redis default port
The method to modify the default port of redis is: first download the file, decompress, compile and install it. After installation, start it globally and set the password, then modify the port number, and finally specify the running configuration
【Recommended course: redis tutorial】
(1) Download through the link below, and then use the following commands to decompress, compile, and install
Download address: http://download.redis.io/redis-stable.tar.gz
tar xzf redis-4.0.9.tar.gz cd redis-4.0.9 make make install
(2) Start globally and set the password, modify the port
First enter the redis installation directory, find utils, there will be an initialization script redis_init_script below, copy it to /etc/init.d in the directory.
Secondly, name the redis_init_script file redis_port number (this port is redis_6879), where the port number represents the port number that you want Redis to listen to, and the client passes this port Connect to Redis. Then modify the value of the REDISPORT variable in the script to the same port number.
Next, copy the configuration file template redis-4.0.7/redis.conf to the /etc/redis directory and name it with the port number (such as 6879.conf), Then edit some of the parameters and modify the port number and password.
Finally specify the running configuration, redis-server /etc/redis/6879.conf
Summary: The above are all the steps to modify the default port of redis. I hope it will be helpful to everyone
The above is the detailed content of How to modify the redis default port. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics









