(UPDATE: I needed Redmine >=3.0 for a plugin, so I ended up re-doing this for version 3 of Redmine, which is a more complicated process. I wrote instructions for Redmine version 3 onto the Raspberry Pi 2, but they’re not quite as detailed as the ones here. But if you’re able to follow these instructions, you should be able to follow along for 3.0. It’s just a bit more complex because you have to build packages.)
(COMMENTS: I suggest you take a look below at the comments to this post if you run into anything unexpected, like an error. There is a lot of feedback for various issues some folks ran into.)
After scouring the internet, I’ve created the go-to tutorial for installing Redmine onto the Raspberry Pi 2 without assuming you are a Linux guru and without pages and pages of steps. This assumes you have a Raspberry Pi 2 and a freshly imaged SD card that has never booted. If you’ve already booted, that’s fine, you should be able to pick up around step 12 (I would recommend an SD image backup first!).
I’m using Raspbian 2015-02-16 in this tutorial. Yes, this is 27 steps, but it holds your hand and it zips by. Plus, the first half is initial Pi setup and backup.
- Before even booting your Pi, download Adafruit Pi Finder. This is a cross-platform utility that allows you to get started with your Pi without having to hook it to a TV and use a keyboard. It will discover it, tell you the IP, and get you connected without any display or keyboard attached to the Pi. Just make sure it’s connected via wire to your network.
- I suggest you image your SD card with Win32DiskImager.
- Insert your SD card, plug in the wired ethernet cable, and finally plug in the power supply. Let it go to town booting and doing it’s first time thing. Note that you don’t need it hooked to a screen or keyboard, you just need to let it run for a minute or two until the activity light dies down.
- Open PiBootstrap.exe.
- Click Find my Pi
- It will take a minute or two to search your network–be patient.
- If you have more than one Pi, you will need to make sure you edit the correct one, but I expect in most cases you will just have the one. Enter the SSH credentials you want to use and a hostname. I chose piredmine for my hostname. For this install, leave “Install the WebIDE?” unchecked.
- Click “Bootstrap!”
- The tool will connect, an SSH Terminal window will open, and go to town downloading and installing stuff. Let it run.
- Run
sudo raspi-config
and expand the filesystem to fill the SD card.
- Optional: Shutdown, eject your SD card from the Pi, and make a backup on your regular machine using the same Win32DiskImager utility. This way, if things go wrong, you can rollback to this point easily. Put it back in your Pi when it’s done.
Otherwise: Reboot. - Now to actually install stuff!
- (At this point, it may be easier to sudo su to become root rather than prefix all your commands with sudo. It’s up to you, though!)
- Execute
sudo apt-get install apache2 mysql-server
and wait. You’ll be prompted to enter a password for the MySQL root user. Remember to make it secure. Wait some more. - Next execute
sudo apt-get install redmine redmine-mysql
and wait. You’ll be prompted about configuring the redmine/instances/default package with a lengthy text blurb advising you to select Yes. Select Yes, then select mysql. Now enter the MySQL root user password from earlier. For the next password prompt, you can leave it blank for a random password or enter whatever you like. This one shouldn’t ever be important for you to know because you know the root password. I left mine blank for random. - You’ll see a message that “This may take awhile.” It is not kidding. Go do something else for 5 or 10 minutes.
“This may take a while.” Yes, yes it will. It will give you false hope that it is done, but it’s not. Keep waiting.
- Finally it’s done, and we are nearly so. Execute one last install:
sudo apt-get install libapache2-mod-passenger
This one will be quick. A little configuration and we’ll be good to go. - Execute:
sudo ln -s /usr/share/redmine/public /var/www/redmine
This will make your URL “http://youservername/redmine” sudo chown -R www-data:www-data /var/www/redmine
sudo su
(need to become root for this next one)echo "RailsBaseURI /redmine" > /etc/apache2/sites-available/redmine.conf
[Thanks Daniel]exit
(to exit root)sudo a2ensite redmine
sudo /etc/init.d/apache2 reload
sudo /etc/init.d/apache2 restart
- Done! Surf to http://piredmine.local/redmine and wait for the initial loading process (this is a one-time wait). The default Redmine login is admin / admin
- You may need to make additional changes to your apache configuration if you’re running on a domain name, or to use plugins, but this was the hard part. Pat yourself on the back and eat some chocolate.
References:
Redmine Install Guide that insists on using experimentals respositories
A “write-up” that works if you have guru level knowledge and a few pre-reqs already installed
Installing Redmine Backlogs on Debian (Backlogs is a plugin — I’ve never used it)
Many many many thanks. It works for me and I am glad.
I even managed to install the dashboard plugin. Unfortunately I do not succeed with the dmsf and tweaks plugins since they need redmine 3.0 at least.
Do you manage to install a newer version of redmine on a pi?
Best regards
Marko
Hi Marko,
I ran into the same problem–needed >=3.0 for a plugin. I wrote instructions for that, too, here: http://www.tylerforsythe.com/2015/04/redmine-version-3-onto-raspberry-pi-2/ It is not quite as detailed, but if you’ve followed these directions, you should be able to follow those.
Good luck!
Hi Tyler!
With Raspbian Jessie 2015-09-24 step 23 gives an error:
“ERROR: Site redmine does not exist!”
This message can be prevented by changing step 21 to:
echo “RailsBaseURI /redmine” > /etc/apache2/sites-available/redmine.conf
The .conf part is mandatory, I found the solution here:
https://stackoverflow.com/questions/20591889/site-does-not-exist-error-for-a2ensite
Thanks for your tutorial, it really was the one I wanted!
Updated, thanks for the feedback, Daniel.
Glad the tutorial worked well for you!
Hi Tyler,
I had to make two extra changes to make it work:
1. Contents of /etc/apache2/sites-available/redmine.conf
DocumentRoot /var/www/
PassengerDefaultUser www-data
<Location /redmine>
RailsEnv production
RackBaseURI /redmine
Options -MultiViews
</Location>
2. Disable the apache2 default site:
$ sudo a2dissite 000-default
In my last comment some characters went missing,
the redmine configuration file can also be found here:
https://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Debian_8_with_Apache2-Passenger
Thanks for the comment and feedback! I’ve edited it slightly to bring in the missing bits of the conf example.
Thanks Daniel! I couldn’t get anything but 404 until I finally disabled the 000-default site (sudo a2dissite 000-default)
It will not work correctly for my 🙁
I used the current version of Raspbian Jessie (September 2015) and use your instruction step by step from step 13.
The webserver is running and I get the default-apache page if I got to http://PI-ip/ but I get an page-not-found if I go to http://PI-ip/redmine
Hi David,
Did you get any errors during the setup process?
No, everythink went well during the setup process.
Now I try it again. I delete my whole sd card. Flash the OS newly and try the redmine-install process newly. BUT it don’t work 🙁 same issus. I show the Apache2 Debian Defualt Page on http://IP/ but not the redmine page on http://IP/redmine
Sorry David, I don’t know what to tell you. I was able to set it up on mine and someone else’s Pi 2 without much of an issue.
You could try following my version 3 directions and see if that works better for you, though they are poorly formatted and a bit more involved. http://www.tylerforsythe.com/2015/04/redmine-version-3-onto-raspberry-pi-2/
Hi David,
I had the same issues like you. I got it running by using Daniels’ post from october 29: I exchanged the configuration file with a more detailed one and I disabled the default site.
Hi,
thank you for this tutorial.
I had some problems with “sudo a2ensite redmine”,
but “sudo a2ensite redmine.conf” did it for me.
here is what I did from step 21.
Step21: (this is required so that passenger runs as www-data)
add the following line in /etc/apache2/mods-available/passenger.conf
PassengerUser www-data
Step22:
create a redmine.conf in /etc/apache2/sites-available/
nano /etc/apache2/sites-available/redmine.conf
copy the following lines
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RailsEnv production
RackBaseURI /redmine
Options -MultiViews
Step23:
disable the default site and enable the newly added redmine site
a2dissite 000-default
a2ensite redmine
Step24:
restart the apache2 service
service apache2 restart
bingo!! access your redmine through your browser
Note:
for trouble shooting if redmine is installed and configured(database connections) properly
run this in your pi terminal
bundle exec rails server webrick -e production
and access the redmine through port 3000 in your browser. if its succeeds then redmine installation up to step20 is done perfectly.
Thanks for such helpful feedback, SwK!
How to configure email notification?
Hi Sumit,
Thanks for the comment and sorry for the delay–I didn’t see your comment originally. I’d suggest Googling Redmine 2 email setup for specific instructions on that. Also, if you’re running a low-traffic Redmine server, I’d suggest using Rackspace’s mailgun service. It’s free for the first 1000 (maybe more?) messages for month. I use it for a low-traffic service I run and haven’t had to pay yet!
Hello there and thanks for the nice tutorial! I have a problem with the last steps. As long I’m not editing nano /etc/apache2/sites-available/redmine.conf, the apache server works and i can navigate to the default apache page in my browser. Whenever I’m doing echo “RailsBaseURI /redmine” > /etc/apache2/sites-available/redmine.conf or any of the similar steps in the comments, reload of apache fails with Job for apache2.service failed. See ‘systemctl status apache2.service’ and ‘journalctl -xn’ for details.
I’m working on a fresh pi installation. any help would be much appreciated, thx!
Hi medd,
Thanks for the comment. I’m no longer running Redmine so I can’t do a whole lot to troubleshoot. However, did you reference comments above by SwK and Daniel? Both provided valuable feedback for that exact step.
Redmine 3.1.1 – stable erfolgreich auf einem Raspberry PI 2 installiert!
VIELEN DANK!