Installation settings
Download tar package:
wget -c http://download.redis.io/releases/redis-3.2.4.tar.gz
Unzip and install
tar zxvf redis-3.2.4.tar.gz
mkdir /usr/local/redis
make PREFIX=/usr/local/redis install
Set environment variables
vim /etc/profile
export REDIS_HOME=/usr/local/redis
export PATH=$PATH:$REDIS_HOME/bin
:wq
source /etc/profile or . /etc/profile
Create redis service
cd /root/redis-3.2.4/utils
./install_server.sh
Just hit Enter all the way
The default service name in the /etc/init.d directory is redis_6379
service redis_6379 status
service redis_6379 start
service redis_6379 stop
remote access
Add firewall
firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --reload Restart the firewall
vim /etc/redis/6379.conf
Password requirepass 123456
Comments bind 127.0.0.1
Modify protected-mode no
The above is the detailed content of Redis installation and setup operation guide on CentOS7. For more information, please follow other related articles on the PHP Chinese website!