Written in front: blogger server system CentOS7
Used in this blog:
The radis installation package is in my network disk
radis visualization tool in my network disk
Link: https://pan.baidu.com/s/1biKKTpkgp3peEWFyQDgWTA
extraction code: nljg
1. Download and upload the installation package
2. Unzip the installation package
tar zxvf redis-5.0.8.tar.gz -C ./
3. Enter the folder and compile
cd redis-5.0.8
make && make install
4. Enter utils to execute the installation script
cd utils
./install_server.sh
The script execution will ask you to configure. Click Enter directly to use the default configuration. If you have special needs, you can replace it. If not, it is recommended to use the default.
5. Service commonly used commands
Check service status
systemctl status redis_6379.service
start up
systemctl start redis_6379.service
termination
systemctl stop redis_6379.service
Reboot
systemctl restart redis_6379.service
Normal operating state
6. Local test, start redis-cli client
redis-cli
Then there is the syntax of Radis, which is stored in key-value
set test helloworld
取key-value
get test
So far, the local test is over
7. Configure remote connection
1. Edit the configuration file of redis
vim /etc/redis/6379.conf
Modify bind 127.0.0.1 to bind 0.0.0.0
2. Set the access password
Find the #requirepass foobared line content, remove the #, you can search with vim if you can't find it, (/string can be searched)
set your own password
Save and restart Radis service
3. Open port 6379 on the server console
8. Test the remote connection