UPDATE

TEKNOLOGIINTERNET

Easy Way to Install and Secure Redis on Ubuntu 20.04

Redis for the changes to take effect.

sudo systemctl restart redis-server

Step 4: Install PHP Extension (Optional)

Next, if you need to use Redis with a PHP application, you need to install Redis PHP extension on your Ubuntu system. To install the Redis PHP extension, type:

sudo apt install php-redis

The installer will automatically enable the redis extension for all the pre-installed PHP versions. If your installer new PHP version after this, you can use the below command to help the redis module. Run the following command:

sudo phpenmod -v <Any PHP Version> -s ALL redis

Step 5: Connect to Redis Server

Redis provides redis-cli utility to connect to the Redis server. Run the following command:

redis-cli

Few more examples of the redis-cli command-line tool.

redis-cli info  redis-cli info stats  redis-cli info server

You can find more details about redis-cli here .

Step 6: Managing the Redis Service

Now that you have your service up and running, let’s go over basic management commands.

To stop your service, run this command:

sudo systemctl stop redis-server

To start your service, run this command:

sudo systemctl start redis-server

To disable your service, run this command:

sudo systemctl disable redis-server

To enable your service, run this command:

sudo systemctl enable redis-server

To status your service, run this command:

sudo systemctl status redis-server

Thank you  for reading this Tutotial!

image_print
1 2

Bagaimana reaksi Kamu?

Beri Komentar

Terkait

Tampilkan Lainnya Loading...Tidak ada lagi data informasi lainnya.