Solved

Redmine Ubuntu server 10 Autostart

Posted on 2011-09-22
2
859 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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