Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start Redis server due to config file error

Tags:

redis

I've just installed Redis by following the instructions here: http://redis.io/download

When I run redis-server redis.conf I get the following error:

*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 135
>>> 'slave-serve-stale-data yes'
Bad directive or wrong number of arguments

Thanks

like image 623
John Avatar asked Mar 20 '11 09:03

John


People also ask

How do I find my Redis config file?

The Redis configuration file is located at installdir/redis/etc/redis. conf.

How do I start a Redis server on port 6379?

Basic. Once you install Redis on your server, you can start the server using the redis-server command. The command will initialize the Redis cluster allowing you to connect to it and execute commands. By default, the Redis server will run on port 6379.


1 Answers

I had this problem, too, and had to manually copy files into place after the build.

cd ~/redis-2.4.15
mkdir redis-1.2.4-backup

sudo mv /usr/bin/redis-* ~/redis-2.4.15/redis-1.2.4-backup/ ;

sudo mv src/redis-benchmark /usr/bin/ ;
sudo mv src/redis-check-aof /usr/bin/ ;
sudo mv src/redis-check-dump /usr/bin/ ;
sudo mv src/redis-cli /usr/bin/ ;
sudo mv src/redis-server /usr/bin/ ;

sudo chown root /usr/bin/redis-* ;

I put the ; at the ends of the lines because sometimes I want to join things into a single line of shell commands.

Make sure the rest of your stuff is setup, like init.d, conf and log files.

like image 161
New Alexandria Avatar answered Oct 19 '22 00:10

New Alexandria