Solved

Redmine Ubuntu server 10 Autostart

Posted on 2011-09-22
2
845 Views
Last Modified: 2012-05-12
Hello Experts,
I installed redmine on my ubuntu server, an all good except one little thing.
Each time i want use it i should start redmine manually by
ruby script/server -e production

Question,

How can make redmine start automatically each time sever machine starts?
How can i run it as daemon?

Thanks,
Dan
0
Comment
Question by:DanSmir
2 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 36583839
To run as a daemon (try this from a console)
ruby script/server -e production </dev/null >/dev/null 2>/var/log/ruby_errors.log &
The redirections test whether ruby can tolerate being started with no attached terminal. As long as that works, you are on your way. To start it automatically, you will need to put something in /etc/rc.d/rc.local (or some similarly-named existing file - I'm not familiar with Ubuntu).
Your main challenge will be to set up the environment so ruby will run. It will likely not work to simply copy the above line into rc.local. Instead, insert a line to run a script (which you will have to write) which sets up the environment (probably at least the PATH variable, maybe others). Then this script would include the command line above.
0
 
LVL 9

Expert Comment

by:parparov
ID: 36707526
To complement duncan_roe answer:
in Ubuntu, you need to create a file called
/etc/init.d/local

Open in new window

and place the startup of the ruby there.
Exact instructions are here:
https://help.ubuntu.com/community/RcLocalHowto
with very detailed comments and an example.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now