My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
QuickStart  
Updated Dec 21, 2010 by anti...@gmail.com

We moved to Redis.io!

Redis home moved to http://redis.io, please visit our new home.

Comment by fjctlzy@gmail.com, Sep 14, 2009

i wrote a program like this, but sometimes it will report error, i use the phpredis(c edition). <?php $num = 100000; $action = "get"; $stime = microtime(true); for($i=0;$i<$num;$i++){ $redis = new Redis(); $redis->connect("127.0.0.1", 6379); //for($i=0;$i<$num;$i++){

if ($action=="get"){
$redis->get($i);
} else $redis->set($i,$i);
} $etime = microtime(true); echo "spent " . ($etime - $stime) . "\n";

?> Fatal error: Uncaught exception 'RedisException?' with message 'Can't connect to 127.0.0.1:6379' in /opt/websites/blog.intra.iqwer.com/htdocs/phpredis/test.php:7 Stack trace: #0 /opt/websites/blog.intra.iqwer.com/htdocs/phpredis/test.php(7): Redis->connect('127.0.0.1', 6379) #1 {main} thrown in /opt/websites/blog.intra.iqwer.com/htdocs/phpredis/test.php on line 7

Comment by fjctlzy@gmail.com, Sep 14, 2009

i have a question, is the redis object persistent? or every connection needs a new redis object, for example, if i have 1000 concurrency / s, will 1000 redis object be allocated?

Comment by golotyuk, Oct 6, 2009

Hey guys, take a look at php-redis platform: http://code.google.com/p/php-redis/. It contains basic functionality needed for standard data development needs.

Comment by paul.ros...@gmail.com, Dec 16, 2009

I've written up a detailed how-to for getting up and running on CentOS, in case anyone is looking for installation help: http://blog.rosania.org/installing-redis-on-centos-4

Comment by biruk...@gmail.com, Dec 17, 2009

Thank you, Paul, this is awesome tutorial!

Comment by jairtr...@gmail.com, Feb 18, 2010

¡Hello! It might be nice to explain how to cleanly stop the redis server.

Comment by grosser....@gmail.com, Feb 22, 2010

Simple installation guide for ubuntu jaunty via deb package http://pragmatig.wordpress.com/2010/02/22/installing-redis-server-on-ubuntu-jaunty/

Comment by macten...@gmail.com, Jul 2, 2010

It would be good to note that the redis server needs to be running for "make test" to work. Otherwise, you get a connection refused error.

Comment by alex...@gmail.com, Jul 6, 2010

Another php implementation at http://code.google.com/p/php5-redis/ Easy to extend and add the new commands as redis develops

Comment by saik...@gmail.com, Aug 2, 2010

You should change the line:

"In order to test if the Redis server is working well in your computer make sure to run make test and check that all the tests are passed."

to

"In order to test if the Redis server is working well in your computer make sure to run ./redis-server in one terminal window and then, in another, run make test and check that all the tests are passed."

Comment by yuridraw...@gmail.com, Sep 28, 2010

I follow saikat1 suggestion but I still get this error:

dbmspare02:redis-2.0.2 root# make test tclsh8.5 tests/test_helper.tcl --tags "" /bin/sh: tclsh8.5: command not found make: test? Error 127

I still can run the redis server and work on the client.

Any ideas?

Comment by nilo.tei...@gmail.com, Oct 1, 2010

@yuridrawing Seems like you don't have tcl8.5

Try, under Ubuntu:

sudo apt-get install tcl8.5

then run the make test again.

HTH

Comment by yuridraw...@gmail.com, Oct 4, 2010

Thanks for your response Nilo, I'm using Mac OS X Leopard.

Comment by rowan%wo...@gtempaccount.com, Dec 8, 2010

To start redis server without a conf file and specifying configuration arguments from the command line use this echo -e "maxmemory 500M\npidfile /tmp/redis-test.pid\ndaemonize yes" | redis-server -

Note the -e on echo which translates the \n into new lines and the - at the end of redis-server which tells it to read the configuration from stdin.

Comment by nikolay....@gmail.com, Aug 9, 2011

This is nice trick!!! I knew it is possible to do so, but never try it.


Sign in to add a comment
Powered by Google Project Hosting