Solved

Redmine Ubuntu server 10 Autostart

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

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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