Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

Install Redis Server and PHP Redis on Ubuntu Server

  1. #1
    Moderator shunavi's Avatar
    Join Date
    Mar 2013
    Posts
    130
    Thanks
    10
    Thanked 29 Times in 15 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

Similar Threads

  1. Which is the best dedicated server for Magento?
    By phuc2x in forum Magento Dedicated server
    Replies: 16
    Last Post: 17-08-2016, 06:54 AM
  2. How to change default date and timezones for CentOS server?
    By shunavi in forum Magento Dedicated server
    Replies: 3
    Last Post: 20-07-2016, 06:36 PM
  3. How do I know if my server is compatible with Magento?
    By david in forum Installation & Configuration
    Replies: 1
    Last Post: 10-01-2015, 12:29 PM
  4. How to know why my server suddenly shutdown?
    By david in forum Installation & Configuration
    Replies: 2
    Last Post: 24-05-2013, 10:17 AM
  5. Install FileZilla in Ubuntu - Tutorial
    By david in forum PHP programming
    Replies: 0
    Last Post: 09-05-2013, 05:15 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
  •