Magento Expert Forum - Improve your Magento experience

Results 1 to 4 of 4

Install Redis Server and PHP Redis on Ubuntu Server

  1. #1
    Moderator shunavi's Avatar
    Join Date
    Mar 2013
    Posts
    124
    Thanks
    9
    Thanked 26 Times in 17 Posts

    Thumbs up Install Redis Server and PHP Redis on Ubuntu Server

    I tested on Ubuntu 12.10 64bit server edition, it should work well in other versions

    1) Install Redis server

    Earlier today I was looking for an alternative repository for Redis and luckily I ran into Dotdeb. They have a bunch of nice packages, always up to date with the very latest version.

    In order to get in on this goodness you must first add the Dotdeb repositories to your APT sources. Create a new list file in /etc/apt/sources.list.d/ and fill it with the following content.

    Create new file:

    Code:
    $ vi /etc/apt/sources.list.d/dotdeb.org.list
    Then add these lines to this file

    Code:
    # /etc/apt/sources.list.d/dotdeb.org.list
    deb http://packages.dotdeb.org squeeze all
    deb-src http://packages.dotdeb.org squeeze all
    Then you need to authenticate these repositories using their public key.
    Code:
    wget -q -O - http://www.dotdeb.org/dotdeb.gpg | sudo apt-key add -
    And finally, update your APT cache and install Redis.

    Code:
    $ sudo aptitude update
    $ sudo aptitude install redis-server
    You got Redis server working with these credentials:

    Code:
    Host: 127.0.0.1
    Port: 6379
    2) Preparation for install PHP Redis extension

    Code:
    $ sudo apt-get install php5-dev
    php5-dev provides the dev library as well as the phpize command which is required for the compiling step

    3) Get phpredis source code, should be pretty easy by running

    Install git

    Code:
    $ sudo apt-get install git
    Get phpredis source

    Code:
    $ git clone git://github.com/nicolasff/phpredis.git
    4) Compile and install

    Code:
    cd phpredis
    phpize
    ./configure
    make
    sudo -s make install
    5) Enable the phpredis extension

    Code:
    sudo -s
    echo "extension=redis.so">/etc/php5/conf.d/redis.ini
    exit
    6) Restart server

    To make sure everything is working well, you have to restart server/vps.

    Code:
    $ sudo reboot
    7) Write a simple php script to test (running on cli would be fine if php5-cli is installed)

    PHP Code:
    <?php
    $redis
    =new Redis() or die("Can not load redis.");
    $redis->connect('127.0.0.1');
    $redis->set('test_key'1);
    And now run this script, if it display blank page then you get success or just tell me

    View more threads in the same category:


  2. #2
    New member
    Join Date
    Apr 2015
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Then you need to authenticate these repositories using their public key.

    __________________
    Nawaz

  3. #3
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    228
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    May 30, 2018 - Update your nearby adept bundle reserve and introduce Redis by composing: sudo able update; sudo able introduce redis-server. This will download and introduce ...

  4. #4
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Step by step instructions to Install Redis on Ubuntu 18.04 and 16.04 LTS

    Stage 1 – Prerequsities. Sign in to your framework with sudo benefit account utilizing shell access, to which you have to introduce Redis.
    Stage 2 – Installing Redis.
    Stage 3 – Configure Redis.
    Stage 4 – Install Redis PHP Extension.
    Stage 5 – Test Connection to Redis Server.

Similar Threads

  1. Which is the best dedicated server for Magento?
    By phuc2x in forum Magento Dedicated server
    Replies: 25
    Last Post: 10-10-2023, 10:36 AM
  2. How to know why my server suddenly shutdown?
    By david in forum Installation & Configuration
    Replies: 5
    Last Post: 17-01-2022, 10:10 AM
  3. How to change default date and timezones for CentOS server?
    By shunavi in forum Magento Dedicated server
    Replies: 7
    Last Post: 04-06-2020, 06:59 AM
  4. How do I know if my server is compatible with Magento?
    By david in forum Installation & Configuration
    Replies: 2
    Last Post: 17-09-2019, 08:59 AM
  5. Install FileZilla in Ubuntu - Tutorial
    By david in forum PHP programming
    Replies: 1
    Last Post: 14-03-2019, 07:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •