Cara Install Redis dan PHP Redis di cPanel

Redis adalah singkatan dari Remote DIctionary Server dan itu adalah basis data NoSQL nilai-kunci. Hampir semua bahasa program termasuk PHP memiliki Redis bindings. Dalam panduan ini, kami akan menunjukkan cara menginstal server Redis dan Redis ekstensi PHP pada server berbasis cPanel sehingga Anda dapat menggunakan Redis sebagai backend cache untuk WordPress, Laravel, Drupal, atau aplikasi berbasis PHP lainnya.

 

1. Install Redis server

Redis tidak tersedia dari bawaan CentOS repositories, jadi kita memerlukan EPEL repository dan install Paket Redis.

2. Install EPEL Repository di CentOS 6

To install the EPEL repository please run the following command:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

3.  Install Paket Redis Dengan Yum

Once the repository is enabled, you can install the redis package using Yum:

sudo yum install redis

4. Jalankan dan Configure Redis service

Start the Redis service and enable it to start on boot with the following commands:

service redis restart
chkconfig --level 345 redis on

5. Install EPEL Repository di CentOS 7

Same as with CentOS 6 first install the EPEL repository:

yum install epel-release

Once the repository is enabled, install the Redis package using Yum:

yum install redis

Start the Redis service and enable it to start on boot with the following commands:

systemctl restart redis
systemctl enable redis

6. Install Redis PHP extension

Redis PHP extension is not available in EasyApache so we will install the Redis PHP extension using the pecl command. We will also enable Igbinary support which is a drop in replacement for the standard PHP serializer.

7. Install Redis PHP Extension melalui EasyApache 3

To install the Redis PHP extension issue the following command:

yes | pecl install igbinary igbinary-devel redis

once the build process is completed, verify the installation using the following command:

php -m | grep redis

and you should see redis, if there is no output, it means that Redis extension is not installed/loaded.

8. Install Redis PHP Extension melalui EasyApache 4

EasyApache 4 supports multiple versions of PHP so we need to install the Redis PHP extension on each PHP version.

Run the following commands to install and enable the Redis PHP extension on each PHP version you have installed on your server:

9. Install dan Enable Redis PHP Extension untuk PHP 5.4

yes | /opt/cpanel/ea-php54/root/usr/bin/pecl install igbinary igbinary-devel redis
/opt/cpanel/ea-php54/root/usr/bin/php -m | grep redis

10. Install dan Enable Redis PHP Extension untuk PHP 5.5

yes | /opt/cpanel/ea-php55/root/usr/bin/pecl install igbinary igbinary-devel redis 
/opt/cpanel/ea-php55/root/usr/bin/php -m | grep redis

11. Install dan Enable Redis PHP Extension untuk PHP 5.6

yes | /opt/cpanel/ea-php56/root/usr/bin/pecl install igbinary igbinary-devel redis 
/opt/cpanel/ea-php56/root/usr/bin/php -m | grep redis

12. Install dan Enable Redis PHP Extension untuk PHP 7.0

yes | /opt/cpanel/ea-php70/root/usr/bin/pecl install igbinary igbinary-devel redis 
/opt/cpanel/ea-php70/root/usr/bin/php -m | grep redis

13. Install dan Enable Redis PHP Extension untuk PHP 7.1

yes | /opt/cpanel/ea-php71/root/usr/bin/pecl install igbinary igbinary-devel redis 
/opt/cpanel/ea-php71/root/usr/bin/php -m | grep redis

Itu dia. Anda telah berhasil menginstal server Redis dan Redis ekstensi PHP pada VPS cPanel Anda

Instalasi Redis dan Redis PHP di cPanel adalah tugas yang mudah jika Anda memiliki VPS cPanel Hosting dengan kami. Jangan ragu untuk meminta Administrator Linux ahli kami untuk menginstal Redis dan Redis PHP di cPanel untuk Anda, dan itu akan segera diurus. Mereka tersedia 24 × 7, sehingga Anda bisa mendapatkan bantuan yang Anda butuhkan kapan saja.

PS. Jangan ragu untuk membagikan blog ini tentang cara Menginstal Redis dan Redis PHP di cPanel, posting jika Anda menyukainya dengan menggunakan pintasan jaringan sosial – Anda juga dapat meninggalkan komentar sebagai gantinya, yang ditemukan di bawah tombol bagikan.


Di tulis oleh: