1. Install using Yum

1.1 Installing the EPEL (Extral Package for Enterprise Linux) library

# install epel yum install epel-release -yCopy the code

1.2 installation Redis

# yum install redis-yCopy the code

1.3 Start test Redis

Redis Redis -cli pingCopy the code

2. Compile and install

1.1 Pre-Dependency

# yum install centos-release-scl # yum install devtoolset-8- GCC devtoolset-8- GCC c++ /opt/rh/devtoolset-8/enable >>/etc/profile source /etc/profile gcc --versionCopy the code

1.2 download

# # download stable version of wget http://download.redis.io/redis-stable.tar.gz extract tar - ZXF redis - XXX - xx. Tar. Gz - / usr/local/CCopy the code

1.3 Compilation and Installation

Cp./ SRC /redis-server /usr/local/bin cp /usr/local/bin: /usr/local/bin: /usr/local/bin: /usr/local/bin: /usr/local/bin /utils/redis_init_script /etc/init.d/redis_6379 Pidfile /var/run/redis_6379.pid # pidfile dir /var/redis/6379 # data directory logfile /var/log/redis_6379.log # log bind 127.0.0.1 192.168.200.100 # log bind 127.0.0.1 192.168.200.100Copy the code

1.4 start

Chkconfig --add redis_6379 --add redis_6379Copy the code

1.5 Systemctl Management Mode

/usr/lib/systemd/system/ &&touch redis Documentation=https://redis.io/topics/quickstart After=network.target After=syslog.target Wants=network.online.target [Install] WantedBy=multi-user. Target [Service] # add user =redis # add Group=redis Type=forking ExecStart=/usr/local/bin/redis-server /etc/redis/6379.conf RuntimeDirectory=redis RuntimeDirectoryMode=0755 LimitNOFILE=65536 # start Redis Server systemctl start Redis # Stop Redis Server systemctl stop Redis # start Redis Server systemctl enable redisCopy the code

Reference 3.

Redis. IO/switchable viewer/quic…