Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»General Articles»How to Compile and Install Redis Latest Version on a Linux VPS

    How to Compile and Install Redis Latest Version on a Linux VPS

    RahulBy RahulMarch 17, 20182 Mins ReadUpdated:December 24, 2019

    As of today, the Redis 5.0 is the latest version available for installation. The preferred way of Redis server installation is by compiling it using the source. It only requires GCC and GLIBC packages to be installed on your system to build Redis from Source.

    Redis server is available under the default package repository on most of the popular Linux platforms. If you don’t want to compile Redis from source code. You can use one of the below tutorials to install Redis using the package manager.

    • Install Redis on Ubuntu using Apt-Get
    • Install Redis on CentOS using Yum

    Install Redis on Linux VPS

    Redis only required GCC and GLIBC packages to build from Source. So its the most recommended way for the Redis installation on a VPS. Run below set of commands to download the latest source code and install Redis latest version on the Linux system.

    wget http://download.redis.io/redis-stable.tar.gz
    tar xvzf redis-stable.tar.gz
    cd redis-stable
    

    Run below commands to compile redis from source and install.

    make
    make install
    

    A Redis configuration file is also available in the current directory. You can copy this file to a better location and customize Redis.

    mkdir /etc/redis
    cp redis.conf /etc/redis/
    

    Start Redis Server

    You can start the Redis server without any configuration file. In that situation, Redis uses its inbuilt configuration. If you need to customize, Update changes to /etc/redis/redis.conf and start your Redis server as below.

    redis-server /etc/redis/redis.conf &
    

    Run command redis-cli ping on your system terminal. On successful execution, you will get string PONG in response.

    redis-cli ping
    
    PONG
    

    Using Redis Server

    Start working with the Redis server by inserting some key and value pairs manually. Type redis-cli on terminal and press enter. This will provide your Redis service prompt, Here you can run commands directory to Redis.

    redis-cli      
                                                              
    redis 127.0.0.1:6379> ping
    PONG
    
    redis 127.0.0.1:6379> set keyname datavalue
    OK
    
    redis 127.0.0.1:6379> get mykey
    "datavalue"
    
    redis 127.0.0.1:6379> set website tecadmin.net
    OK
    
    redis 127.0.0.1:6379> get website
    "tecadmin.net"
    
    cache nosql redis
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Change Hostname (Computer Name) on Fedora & CentOS
    Next Article How to Install Apache Maven on Debian 10/9/8

    Related Posts

    How to Install Sublime Text 4 on Ubuntu 22.04

    2 Mins Read

    How to Find Django Install Location in Linux

    Updated:April 27, 20221 Min Read

    (Resolved) – ReactJS 404 Error on Page Reload

    2 Mins Read

    Adding a New SSH Key in GitHub

    Updated:April 1, 20223 Mins Read

    13 Best Linux Terminal Emulators and Bash Editors

    8 Mins Read

    How To Install Oracle VirtualBox on Debian 11

    2 Mins Read

    3 Comments

    1. Peter Jaffray on December 24, 2019 3:44 am

      Easy to follow and simple Redis tutorial. Hi from Canada!

      I jumped through a few of your tuts and was wondering if you would use redis or memcached on WordPress (with buddy press etc… can’t cache the pages)

      Reply
    2. Santosh on June 10, 2019 1:39 pm

      Thanks a lot to share this articles. it is very straight forward and helpful.

      Reply
      • Peter Jaffray on December 24, 2019 3:45 am

        ^^ what he said 🙂

        Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.