Cara Install Redis dan PHP Redis di Centos Web Panel CWP

Cara Install Redis dan PHP Redis di Centos Web Panel CWP. 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 di Centos Web Panel CWP

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 di Centos Web Panel CWP

Ekstensi Redis PHP tidak tersedia sehingga kami akan menginstal ekstensi Redis PHP.

cd /root
git clone https://github.com/phpredis/phpredis.git
cd phpredis
make clean
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make install

Tambahkan baris berikut ke php.ini navigate ke PHP Setting >> Edit PHP.ini Configuration

extension=redis.so

Di tulis oleh: