Remember if using multiple or different port numbers, changes are to made to all the configuration files for respective port numbers. Now exit the file after saving the changes & restart the service for changes to take effect. We can either replace 127.0.0.1 with 0.0.0.0 or add IP address of our server to it. Open the configuration file for the instance, i.e. PONG Step 6 (OPTIONAL) Accessing redis from the remote systemīy default, redis is accessible from localhost but if you wish to access redis server from a remote location then we need to make some changes in the configuration file.
We can now issue 'Ping' command & if the redis service is up, we will get 'PONG ' as a response, To login to redis server & check if redis is working fine, open the terminal & run the command, Step 5- Checking if the Redis service is working If you are using more than one redis instance or have changed the port number for redis instance, then you can replace 6379 with the port number you have chosen to stop/start the redis service. To start the Redis service, the command is Note:- We can also set up a number of redis instances by running this script again & changing the port number for the new redis instance. Is this ok? Then press ENTER to go on or Ctrl-C to abort.Ĭopied /tmp/nf => /etc/init.d/redis_6379įor this installation, we have used all the default settings, but we can modify any settings as per our need. Please select the redis executable path Ĭli Executable : /usr/local/bin/redis-cli Please select the data directory for this instance Selected default - /var/log/redis_6379.log Please select the redis config file name
Please select the redis port for this instance: This script will help you easily set up a running redis server
#INSTALL REDIS SERVER UBUNTU INSTALL#
:~# apt install php-redisĠ upgraded, 2 newly installed, 0 to remove and 90 not upgraded.Īfter this operation, 805 kB of additional disk space will be used.Ĭheck the Redis version by using the following command.We will now be asked with some information regarding redis server, as shown below, Install the Redis PHP extension by using the following command. Synchronizing state of rvice with SysV service script with /lib/systemd/systemd-sysv-install.Įxecuting: /lib/systemd/systemd-sysv-install enable redis-server :~# systemctl start rviceĮnable the Redis server service by using the following command.
Start the Redis server service by using following command. Processing triggers for libc-bin (2.29-0ubuntu2). Processing triggers for man-db (2.8.5-2). Processing triggers for systemd (240-6ubuntu5). Ĭreated symlink /etc/systemd/system/rvice → /lib/systemd/system/rvice.Ĭreated symlink /etc/systemd/system//rvice → /lib/systemd/system/rvice. Libhiredis0.14 libjemalloc2 liblua5.1-0 lua-bitop lua-cjson redis-server redis-toolsĠ upgraded, 7 newly installed, 0 to remove and 90 not upgraded.Īfter this operation, 3,862 kB of additional disk space will be used. The following NEW packages will be installed: Libhiredis0.14 libjemalloc2 liblua5.1-0 lua-bitop lua-cjson redis-tools The following additional packages will be installed: Install the Redis 5 by using the following command. Get:2 disco-security InRelease ĩ0 packages can be upgraded. Installation processĬheck the Ubuntu version you use by using the following command. This tutorial covers Installation of Redis 5 on Ubuntu 19.04. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.