Solved

Redmine Ubuntu server 10 Autostart

Posted on 2011-09-22
2
847 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

895 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

15 Experts available now in Live!

Get 1:1 Help Now