?
Solved

Redmine Ubuntu server 10 Autostart

Posted on 2011-09-22
2
Medium Priority
?
875 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 35

Accepted Solution

by:
Duncan Roe earned 2000 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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

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…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

771 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