

If not, make sure you have added the configuration to the wp-config.php file as above. Navigate to Settings => Redis and click on “Enable Object Cache” and make sure Status shows “Connected”. It installs a PHP script that helps WordPress communicate with Redis.Īfter installing the plugin you need to activate it. Next, install the Redis Object Cache Plugin.
YUM INSTALL REDIS CODE
We will use the Redis Object Cache Plugin for configuration.īefore installing, open the wp-config.php file and add the following code to authenticate the key. In this article, I only guide the configuration on WordPress using the Redis developer’s dedicated Plugin. Each source code will have a different configuration. Maxmemory-policy allkeys-lru Step 3: Install Redis cache on WordPressĪfter installing Redis, you can configure Redis on your website to work. Yum install php-redis -y Step 2: Configure Redis as Cache Server To install you do it quickly with the following command. If you do not install the Extension, you can still connect through Predis. To connect the communication between the Redis server and the website, you need to install the Redis PHP Extension. Redis-server -version Install Redis PHP Extension Step 1: Install Redis PHP Extension To check the Redis version, use the command below in the terminal. Systemctl status redis Step 7: Check Redis Version Now that Redis is installed and configured, the final step is to create a systemd unit file so that you can manage Redis services like a regular systemd service.ĮxecStart=/usr/local/bin/redis-server /etc/redis/nfĮxecStop=/usr/local/bin/redis-cli shutdown
简介与安装/5.png)
Then you find the supervised line and change it to supervised systemd as shown in the picture. Now that Redis is installed, the next step is to configure Redis as follows.Ĭp /usr/local/src/redis-6.2-rc2/nf /etc/redis/ The next step is to install Redis binaries with the make install commandĪdduser -system -g redis -no-create-home redisĬreate a directory to store the database for Redis.Ĭhmod 770 /var/lib/redis Step 5: Create Redis. Now run the make test command to make sure the build is correct.
YUM INSTALL REDIS DOWNLOAD
To install you need to download source Redis from the homepage and unzip the installation.Īfter you have extracted and moved into the directory, start compiling with the make command as follows.Īnd the build may take some time depending on your server resources, once completed you will get a message like the following. Yum install gcc make wget tcl Step 3: Install Redis 6 on CentOS 7
YUM INSTALL REDIS UPDATE
The first thing you should do is update the system with the following command.
YUM INSTALL REDIS HOW TO
If you do not know how to SSH, please refer to the following article:īecause the installation steps will take a long time, so to be safe, you should create a screen and run it on a backup screen when suddenly shutting down or losing an internet connection. To install Redis 6.2 on a CentOS 7 server you need to SSH into the server. Install Redis 6 on CentOS 7 Step 1: SSH into the Linux server

This version of Redis 6 can be divided into several different categories such as Security, performance, ease of use, and even some completely new functions such as: Installing Redis 6 on CentOS 7 improves the performance of Cache objects, the content generated by PHP, and the Database.
