how to make redis auto-start on linux?

19,252 views
Skip to first unread message

david kur

unread,
Jul 26, 2011, 1:51:09 AM7/26/11
to Redis DB
Hi, I installed redis...
but it's start only when I write "redis-server redis.conf"
And this is up to the next restart of the server....
Is there an auto start option or something?
I have linux server...

david kur

unread,
Jul 26, 2011, 3:11:52 AM7/26/11
to Redis DB
* centos

emre yılmaz

unread,
Jul 26, 2011, 4:38:23 AM7/26/11
to redi...@googlegroups.com


2011/7/26 david kur <dckur...@gmail.com>
* centos

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.


use this init script to make redis-server a service:
https://github.com/antirez/redis/blob/unstable/utils/redis_init_script

update your chkconfig for autostart:
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-services-chkconfig.html

--
web developer
http://www.emreyilmaz.me

Josiah Carlson

unread,
Jul 26, 2011, 4:03:37 AM7/26/11
to redi...@googlegroups.com
IIRC, Redis comes with a sample init.d that you should put into
/etc/init.d/ (if "make install" doesn't add the entry already, it
probably should). As for the second question...

http://tinyurl.com/3v748oo

;)

- Josiah

Running Turtle

unread,
Jul 26, 2011, 5:14:41 AM7/26/11
to Redis DB
On ubuntu, mint and probably other distros :

go to StartUp Applications and add a command to start the redis-
server.
Logout, log back in and the server should be started.

david kur

unread,
Jul 26, 2011, 6:11:12 AM7/26/11
to Redis DB
I added init script
and than wanted to do
chkconfig --add redis

it returnes me

Dienst redis unterst�¼tzt chkconfig nicht

I don't understand the language lol, but it is some kind of error...
if I do manually /etc/rc.d/init.d/redis start , it starts... so the
script is ok...

On Jul 26, 11:38 am, emre yılmaz <m...@emreyilmaz.me> wrote:
> 2011/7/26 david kur <dckurus...@gmail.com>
>
> > * centos
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Redis DB" group.
> > To post to this group, send email to redi...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > redis-db+u...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/redis-db?hl=en.
>
> use this init script to make redis-server a service:https://github.com/antirez/redis/blob/unstable/utils/redis_init_script
>
> update your chkconfig for autostart:http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-services-...
>
> --
> web developerhttp://www.emreyilmaz.me

Dominik Liebler

unread,
Jul 26, 2011, 6:33:39 AM7/26/11
to redi...@googlegroups.com
The error message is german and means "redis does not support service
chkconfig"

Why did you save the init script in /etc/rc.d ? Normally the right place
for this would be /etc/init.d on most distributions

I'm not very familiar with Cent OS but have found this tutorial, maybe
it's helpful for you ...
http://library.linode.com/databases/redis/centos-5

david kur

unread,
Jul 26, 2011, 6:39:39 AM7/26/11
to Redis DB
/etc/init.d/ is a shortcut to /etc/rc.d/init.d/ in centos ....
I will try the init script from the link you gave, hope it will
help...

On Jul 26, 1:33 pm, Dominik Liebler <liebler.domi...@googlemail.com>
wrote:
> The error message is german and means "redis does not support service
> chkconfig"
>
> Why did you save the init script in /etc/rc.d ? Normally the right place
> for this would be /etc/init.d on most distributions
>
> I'm not very familiar with Cent OS but have found this tutorial, maybe
> it's helpful for you ...http://library.linode.com/databases/redis/centos-5

Kevin Burton

unread,
Nov 7, 2012, 4:53:34 PM11/7/12
to redi...@googlegroups.com, dckur...@gmail.com
According to the README in the source distribution you can run install_server.sh and that will ask a question about which port the redis server will listen to. The default is 6379. So there is a 6379.conf. In this file is a line prefixed by 'bind 127.0.0.1'. If I want the server to listen to incoming connections should I uncomment this line and put in the IP address of the machine that the redis server is running on? 

Hayden James

unread,
Jul 24, 2013, 7:12:04 PM7/24/13
to redi...@googlegroups.com, dckur...@gmail.com
Just add /etc/init.d/redis to the end of /etc/rc.d/rc.local

Goal Lin

unread,
Jun 8, 2014, 4:36:34 AM6/8/14
to redi...@googlegroups.com, dckur...@gmail.com
After you create your init script for auto booting, it should work, however if you need start redis service manually you will find redis doesn't run as a daemon.
To run redis as a daemon, change "daemonize no" to "daemonize yes" in your redis.conf, see following.
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize no

在 2012年11月8日星期四UTC+8上午5时53分34秒,Kevin Burton写道:
Reply all
Reply to author
Forward
0 new messages