Unable to set Redmine as Startup: Ubuntu 9.10

Added by kikiduu kidu almost 5 years ago

Hi,

I have installed Redmine in Ubuntu using the document (http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_in_Ubuntu) and everything works fine as long as I start it manually. When I use the command "export EDITOR=gedit crontab -e" it gives the following error. "export: `-e': not a valid identifier".

When I used "sudo EDITOR= gedit crontab -e", the file opened but even after adding the command mentioned in the howto document, redmine doesn't start automatically on reboot.

Is there something that I can do to get it working?

Thanks

Replies (8)

RE: Unable to set Redmine as Startup: Ubuntu 9.10 - Added by Felix Schäfer almost 5 years ago

The poster apparently didn't adapt the syntax of his posting to the redmine wiki syntax, so there are many commands that are garbled up in one line that shouldn't. The command you are referring to should have read:

export EDITOR=gedit
crontab -e

You'll find that many of the commands before that are also garbled, so I'd recommend to start anew with the pdf linked at the bottom of the wiki page which contains the correctly formatted commands, and that you try to get an understanding of what you are doing instead of just copy and pasting what's in there. If you don't care how it works and just want an ubuntu with redmine installed, go get the turnkey appliance (Redmine_Appliance).

RE: Unable to set Redmine as Startup: Ubuntu 9.10 - Added by kikiduu kidu almost 5 years ago

Thanks Felix for the reply.

I didn't realize that it was two commands. If I give the above command in the form mentioned by you (and the pdf), the crontab file opens in gedit. The file's content is this.

# m h dom mon dow command

To this I have added,

@reboot cd /opt/redmine/redmine-0.8.6 ; rm -f log/mongrel.pid ; mongrel_rails start -e production -p 3000 -d

With this even if I restart, Redmine doesn't starts automatically.

I was able to correctly give all the other commands in the documents ( I was able to unscramble most of it :-D ) and have setup Redmine correctly. Only issue being unable to get it up and running automatically when PC boots.

RE: Unable to set Redmine as Startup: Ubuntu 9.10 - Added by kikiduu kidu almost 5 years ago

One more thing,

From what I was able to understand by searching the web, the crontab command format is

# m h dom mon dow command

So not sure if the following command follows this structure.

@reboot cd /opt/redmine/redmine-0.8.6 ; rm -f log/mongrel.pid ; mongrel_rails start -e production -p 3000 -d

RE: Unable to set Redmine as Startup: Ubuntu 9.10 - Added by Felix Schäfer almost 5 years ago

@reboot is a keyword for cron (or certain cron flavours, and afaik the one ubuntu uses recognises it), so that shouldn't be the problem. I think the problem are some file permissions or something. What are the permissions for log, tmp, files, public/plugins and log/mongrel.pid?

RE: Unable to set Redmine as Startup: Ubuntu 9.10 - Added by kikiduu kidu almost 5 years ago

Permissions are as follows.

log: 755
tmp: 755
files: 755
public/plugin_assets : 755
log/mongrel.pid: 755

I think i created another user using the "sudo useradd redmine" command, but don't remember the password. So may be 7 correspond to that user.

BTW is it possible to uninstall Redmine? If yes, may be I can start it all over again.

Thanks

RE: Unable to set Redmine as Startup: Ubuntu 9.10 - Added by Felix Schäfer almost 5 years ago

I was more interested in the user owning said files and folders. I think the problem essentially boils down to the owners of the files not being your user, so that prevents your user from starting the whole shebang from your crontab. Not sure how familiar you are with the command-line, but ls -l followed by the path to a file will give you the owner and permissions for the file, with the path to a directory, it will give you the owners and permissions of the files and directories in it.

Anyway, if you don't mind running redmine as your user, go ahead and change the owner of the files and directories mentioned above to your user (sudo chown -R youruser log tmp files public/plugins log/mongrel.pid) and put the cron line in your crontab (EDITOR=gedit crontab -e). Changing the password for redmine is just sudo passwd redmine. You may also try to add the cron command to the system-wide crontab (gsudo gedit /etc/crontab I think). Lastly: you can restart the whole installation process by just deleting the whole redmine directory, deleting the redmine database in phpmyadmin, and you won't need to recreate the users.

RE: Unable to set Redmine as Startup: Ubuntu 9.10 - Added by kikiduu kidu almost 5 years ago

Thank you very much Felix. Made the current user as the owner and it works perfectly. I am really grateful to you.

Thanks again

(1-8/8)