Tuesday, January 1, 2019

Install Radis Server on Windows (WAMP Server)


Radius (Remote Dictionary Server) is an open-source advanced key-value database storage system like NoSQL. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, bitmaps and spatial indexes. radius is used for caching to speed up a web application.
If you want to install radios on Linux system than it's easy to install using command line and configure auto in any programming language. when you want to install in window server than manually make some changes for works perfectly.
Process below steps for installing & work redis on a window server.
  • Download redis setup file for window (32bit & 64bit) here. (You can also download files from here)
  • Install/Put redis in any location you want.
  • Run `redis-server.exe` file from instillation files for start radis server.
  • Now check your php version by running phpinfo(); command in any file.
  • Find redis version match your PHP version from PECL package here.
  • Download radis as php extension according to radis version from https://pecl.php.net/package/redis/RADISVERSION(from below point)/windows. (Ex. https://pecl.php.net/package/redis/4.1.1/windows)
  • Here download DLL files list accoring to your PHP version and Thread Safe / Non Thread Safe.
  • Copy the `php_redis.dll` and paste to following folder in Wamp Server `wamp\bin\php\phpVERSION\ext\`.
  • Open php.ini file add redis extension to extensions list as below `extension=php_redis.dll`
  • Restart wamp server & check phpinfo() which shows redis to confirm radis install successfully.
  • Here you can check radis using php code as below.
    
    try {
        $redis = new Redis();
        $redis->connect('localhost', 6379); //connect redis server
        $redis->set('variable', 'Redis Test'); //save data in server
        $redis->get('variable');  //get data from server
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    
    
  • Here for radis connection you must open redis-server.exe file which installed first(don't close radis server window).

No comments :

Post a Comment