Update 2014-07-14:
Fixed permission to prevent error when installing a plugin. Thanks Rob Sharkey.
If you get permission error when installing a plugin, run:
cd /opt/redmine/current sudo chmod 0775 log sudo chmod -R 0665 log/*.log sudo chown -R www-data:$USER files log tmp public/plugin_assets sudo chmod -R 0775 files log tmp public/plugin_assets
Update 2014-07-12:
Added troubleshooting suggestions and warning about multiple services running on the server.
Update 2014-07-10:
Added details about self-signed certificates.
Before starting:
We will prefer to work in the new, clean Virtual Machine. My preference goes to XenServer which can run on top of almost any hardware (Configure backups!).
I recommend you give at least 1GB of RAM to your Redmine box.
I didn’t get GitSmartHTTP to work on Ubuntu 14.04 yet because of several issues. If I have time I will continue to investigate the problems.
See the Redmine Issue. There is also a patch available if you don’t use anonymous access.
Before anything else, we will make sure that the packages are up to date:
sudo apt-get update && sudo apt-get upgrade
Getting Ruby
The compatibility list is available on Redmine’s official website. As time of writing, Ruby 2.1.x is NOT supported.
Install Ruby 2.0.0 with RVM, we use RVM because it allows to easily manage Ruby versions:
sudo apt-get install curl curl -sSL https://get.rvm.io | bash -s stable --ruby=2.0.0 source /home/$USER/.rvm/scripts/rvm
Note that you can list available rubies with:
rvm list known
Getting Redmine
We will also want to to use Subversion to checkout Redmine and Git for our SCM
sudo apt-get install git git-core subversion
Redmine dependencies
sudo apt-get install imagemagick libmagickwand-dev
Get Redmine, as time of writing, the newest stable branch is 2.5-stable.
cd /opt/ sudo mkdir redmine sudo chown $USER:$USER redmine cd redmine/ svn co http://svn.redmine.org/redmine/branches/2.5-stable current cd current/
Fix permissions:
mkdir -p tmp tmp/pdf public/plugin_assets sudo chown -R www-data:$USER files log tmp public/plugin_assets sudo chmod -R 775 files log tmp public/plugin_assets
Create repositories root
mkdir -p /opt/redmine/repos/svn /opt/redmine/repos/git sudo chown -R www-data:www-data /opt/redmine/repos
Create the MySQL database
We will use MySQL, note that the dev library is required to compile the mysql2 gem native extention
sudo apt-get install mysql-server libmysqlclient-dev
We start the MySQL Console to create the database:
mysql -uroot -p
Then, in the MySQL console:
CREATE DATABASE redmine CHARACTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; FLUSH PRIVILEGES; EXIT;
Configure Redmine
Time to edit the Redmine configuration:
cp config/configuration.yml.example config/configuration.yml cp config/database.yml.example config/database.yml nano config/database.yml
Edit such as:
production: adapter: mysql2 database: redmine host: localhost username: redmine password: "my_password" encoding: utf8
Don’t forget to replace “my_password” by your actual password created earlier.
Let the bundler install the Gem dependencies:
gem install bundler bundle install --without development test
Ready Redmine’s database:
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data
Install and configure the web server
We need a bunch of packages
sudo apt-get install apache2 apache2-dev libcurl4-gnutls-dev apache2 libapache2-svn \ libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libauthen-simple-ldap-perl openssl
Time to enable the required modules:
sudo a2enmod ssl perl dav dav_svn dav_fs rewrite
We install Passenger to serve Redmine:
gem install passenger passenger-install-apache2-module
Follow the instructions at the end of the Passenger installation to create your Passenger Apache configuration. Do NOT copy the example below as it will very probably fail.
Edit the configuration file:
sudo nano /etc/apache2/conf-available/passenger.conf
It should look like:
# Do NOT copy this configuration file, you need to create your owen with the output of `passenger-install-apache2-module` LoadModule passenger_module /home/it/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.42/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /home/it/.rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.42 PassengerDefaultRuby /home/it/.rvm/gems/ruby-2.0.0-p451/wrappers/ruby </IfModule>
Now we have to enable the configuration we just created:
sudo a2enconf passenger
Load the Redmine.pm library for Repository authentication
sudo ln -s /opt/redmine/current/extra/svn/Redmine.pm /usr/lib/perl5/Apache/
Create SSL Self-signed certificate
If you are not familiar with self-signed certificates, please read:
SSL provides 2 protections: 1: Encryption (prevents eavesdropping) 2: Authentication of the server (prevents a malicious server to pretend to be your server).
Self-signed certificates only provide encryption. It means that browsers will display a warning telling that the authenticity of the certificate could not be verified. To prevent that, you can:
- Remove SSL by having only a VirtualHost on port 80(which is arguably acceptable for an isolated private network)
- Get a free valid certificate for example from StartSSL
- Purchase a valid certificate from a vendor of your choice
Gurus out there will know that it is more to it but it is not the topic of this article.
I use self-signed certificates for this article because it is simple, immediate, free and better than nothing.
We create the certificate with OpenSSL. Set the “Common Name” to the DNS name you are using to access the server. For example: redmine.domain.com
sudo mkdir /etc/apache2/ssl sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout /etc/apache2/ssl/redmine.key -out /etc/apache2/ssl/redmine.crt sudo chmod -R 740 /etc/apache2/ssl sudo chown -R www-data:www-data /etc/apache2/ssl
Apache2 configuration
We can now create our Apache2 configuration files:
Files should be placed in /etc/apache2/sites-available/
sudo nano /etc/apache2/sites-available/redmine-redirect.conf
sudo nano /etc/apache2/sites-available/redmine.conf
sudo a2dissite 000-default
If you were using the default configuration for other services, disabling it would make these services unavailable.
Enable the configuration:
sudo a2ensite redmine redmine-redirect sudo service apache2 restart
Time to Celebrate!
There you go, your Redmine instance should be up in running!
Test it at http://redmine.domain.com (replace with your settings)
Username: admin
Password: admin
What now
You may want to check that your configuration is correct in https://redmine.domain.com/admin/info
You may also want to configure your email server in: /opt/redmine/current/config/configuration.yml
Hi! I wonder if your redmine.conf is complete? I can’t find MySQl ‘my_password’ section…
Hi Sergio,
Good catch! Indeed, the MySQL password doesn’t appear in the Apache configuration file because I was not able to get Git Smart HTTP to work in Ubuntu 14.04.
So the Apache configuration is actually correct.
I corrected the article, thanks!
What about a Git + Gitolite + Git Hosting integration tutorial?
I’m no Linux guru and I’ve tried a lot of tutorials but there’s always something going wrong…
Godd work by the way…
I didn’t read an article mentioning Redmine Git integration to work with Ubuntu 14.04.
Maybe you could try my Debian guide: https://martin-denizet.com/30-minutes-to-redmine-an-express-installation-guide/
It doesn’t have the problems met on Ubuntu 14.04. Debian 7 has Apache 2.2 package.
For Gitolite, I should get to that some day I’ve a little free time, good suggestion!
Cheers,
One of the best tutorials for the redmine installation for Ubuntu.
Congratulations. Helped us very
Absolutely awesome. Many Kudos and thanks for the complete description. I went through well. Thank you again. =)
Best regards,
Sebastian
Great to hear it worked for you!
Thanks for the feedback.
This is the best redmine tutorial I have yet come across. Excellent work! Note that if you restart the system in the middle of the install, you need to re-run:
‘source /home/$USER/.rvm/scripts/rvm’
Otherwise, the system does not see that ruby is installed and gives the following error when trying to gem install
The program ‘gem’ can be found in the following packages:
* ruby
* rubygems
Hi Kevin,
Good point you make there!
Note that you can definitively solve this issue with the following command:
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
I will add it to the tutorial as it could be an issue for people updating.
Thanks for the feedback!
Cheers,
Thanks, great job. But i just internal error during loading web-page.
Adding config.secret_token = “some string” in config/application.rb file, resolved it.
Hi Roman,
It seems the
bundle exec rake generate_secret_token
didn’t execute correctly.Did you get an error at that step?
Thanks for the feedback!
Thanks for wonderful guide. After following everything without event, after restarting, im getting following error in the browser
cannot load such file — bundler/setup (LoadError)
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/lib/phusion_passenger/loader_shared_helpers.rb:248:in `block in run_load_path_setup_code’
/home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/lib/phusion_passenger/loader_shared_helpers.rb:351:in `running_bundler’
/home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/lib/phusion_passenger/loader_shared_helpers.rb:246:in `run_load_path_setup_code’
/home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:100:in `preload_app’
/home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:158:in `’
/home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:29:in `’
/home/administrator/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.44/helper-scripts/rack-preloader.rb:28:in `’
Thanks for any help.
Hello Rajakvk,
Thanks for your comment.
It seems you have 2 rubies installed:
* 1.9.1 (APT package?)
* 2.0.0 (RVM)
Passenger should only by using 2.0.0 so I don’t understand why there is mention of 1.9.1 in the backtrace. Check the Passenger ruby configuration and make sure it calls for ruby 2.0.0 from RVM. the line you should have is:
PassengerDefaultRuby /home/administrator/.rvm/gems/ruby-2.0.0-p451/wrappers/ruby
What do you get when you run:
which ruby
Also, you could try to run again the bundler installation:
gem install bundler
Let me know the result of these commands.
Cheers
Thanks for prompt response.
which ruby
/home/administrator/.rvm/rubies/ruby-2.0.0-p481/bin/ruby
passenger ruby configuration
PassengerDefaultRuby /home/administrator/.rvm/gems/ruby-2.0.0-p481/wrappers/ruby
gem install bundler
successfully installed bundler-1.6.2
Parsing documentation for bundler-1.6.2
1 gem installed
No luck. Getting same error message.
Wrote a mail to you with complete error log from (rajakvk at g mail dot com )
Awesome. As per your advice over email, removed old ruby by executing following command
sudo apt-get remove ruby
I can see redmine screen on the browser.
Thanks a lot.
I’m trying to configure redmine on a virtual machine just to test on local host. I can get all the way to the end when I need to reload the apache server the last time. When I do it I get an error:
* Reloading web server apache2 *
* The apache2 configtest failed. Not doing anything.
Output of config test was:
AH00526: Syntax error on line 13 of /etc/apache2/sites-enabled/redmine.conf:
SSLCertificateFile: file ‘/etc/apache2/ssl/redmine.crt’ does not exist or is empty
Action ‘configtest’ failed.
The Apache error log may have more information.
I’m pretty new to linux, so whenever I run into an error on guides like this I feel like a fish out of water.
Nevermind, I was missing the scroll over on
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/redmine.key -out /etc/apache2/ssl/redmine.crt
so I wasn’t getting the -out part.
Thanks for the great tutorial.
Worked like charm.
I have question.
In the apache conf we are defining :-
PassengerMinInstances 6
Is it really necessary to have that many instances ?
Takes a lot of memory especially for aws micro instace.
What is the minimum number that we can use ?
Hi Divyanshu,
Good point, I used that setting on a dedicated VM with 2GB memory. If you have limited resources, you may go for
PassengerMinInstances 1
.Setting it to 0 is not recommended as it takes several seconds to create an instance.
Unless you have many concurrent users, 1 instance can be good enough.
See more details in the related documentation: https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerMinInstances
Cheers,
Dear, Martin DENIZET
Very thanks for your reference. Unfortunately my redmine server is not working now.
My web page just show this message.
‘Cannot execute “/home/$USER/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45/buildout/agents/SpawnPreparer”: Permission denied (errno=13)’
Could you have any idea?
Thanks for your help.
– Thomas Woo –
Hi Thomas,
What do you have in
/etc/apache2/conf-available/passenger.conf
please?Cheers,
I have this exact same problem.
My /etc/apache2/conf-available/passenger.conf contains
LoadModule passenger_module /home/athena/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
PassengerRoot /home/athena/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.45
PassengerDefaultRuby /home/athena/.rvm/gems/ruby-2.0.0-p481/wrappers/ruby
Excellent man! Thank you!
It works perfectly for me!!!
thank you thank you thank you!
perfect!
and worked with ruby-2.1.2 (current latest)
on AWS EC2
Hi Nakamura,
Great to hear you got it working!
However Ruby 2.1.x is not officialy supported yet (You can check here: http://www.redmine.org/projects/redmine/wiki/RedmineInstall) even if 2.1.2 seems to be compatible (see http://www.redmine.org/issues/16194).
If you run into trouble with 2.1.2, please report the issue to redmine.org
Thank you for your feedback!
its not working in ubuntu 14.04 server 64 bit.
i am getting only a directory listing when i try https://localhost
like,
Index of /
[ICO] Name Last modified Size Description
[TXT] 404.html 2014-06-18 11:32 457
[TXT] 500.html 2014-06-18 11:32 646
[ ] dispatch.fcgi.example 2014-06-18 11:32 473
[IMG] favicon.ico 2014-06-18 11:32 7.7K
[DIR] help/ 2014-06-18 11:32 –
[ ] htaccess.fcgi.example 2014-06-18 11:32 1.4K
[DIR] images/ 2014-06-18 11:32 –
[DIR] javascripts/ 2014-06-18 11:32 –
[DIR] plugin_assets/ 2014-06-18 11:33 –
[DIR] stylesheets/ 2014-06-18 11:32 –
[DIR] themes/ 2014-06-18 11:32
any idea???
Hi Shali,
I think you either forgot to configure Passenger or forgot to enable the passenger configuration.
Check the content of
/etc/apache2/conf-available/passenger.conf
And Check the configuration is enabled:
sudo a2enconf passenger
Then restart Apache:
sudo service restart apache2
Cheers,
After running a2disconf passenger when am trying https://localhost its showing an error message
Web application could not be started
cannot load such file — bundler/setup (LoadError)
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:245:in `block in run_load_path_setup_code’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code’
/usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app’
/usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `’
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `’
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `’
got any idea?
I think you’re mistaken, it’s
sudo a2enconf passenger
and nota2disconf passenger
.Did you have any service previously installed on this server?
Works like a charm. The best guide I ever saw for redmine.
You can add advice and “how to” to create new user in the begining, cause it is often that new VPS has only root user.
Great to hear about your success! Good point for the new user, I will add that.
Nice Thanks,
based on your stuff, I do some changes for my reasons, the result ist: redmine 2.5 installer on ubuntu 14.04 with nginx, mysql and puma
here is the Gist: https://gist.github.com/arfr/4b58c83a04d354a6eaf8 😉
Great! Thank you for you contribution, I’ll write the tutorial for Puma as the web server if I get time.
Cheers!
This was an amazing tutorial. I really enjoyed how inclusive you were and how you explained what each step was doing. I do have one question though. This setup is a little different than my previous redmine setups (meaning the default file locations and everything are odd to me). When I go through redmine’s plugin tutorial, this setup seems to be out of sync with what’s happening. Do you have any advice on how to use redmine’s plugin generator. Here is the location of redmine’s tutorial that doesn’t work with this setup. http://www.redmine.org/projects/redmine/wiki/Plugin_Tutorial
Thanks, and I really did enjoy the tutorial.
ignore this. I had a typo in my command that threw an odd error, and my question isn’t relevant. once again, loved the tutorial 🙂
Ok, good to hear you got it working 🙂
HI Martin
I followed this guide and it took a while to get the authenication working. However when I now browse to redmine in Chrome I get a 404 error saying it cannot be found?
Any idea where I may have done wrong?
Thanks
Paul
Hi Paul,
By authentication, do you mean Git/SVN authentication or Redmine’s authentication?
You could have a problem with the hostname like David. The VirtualHost configuration bounds Redmine to an hostname. If you have several VirtualHosts and no DNS records to access them, you could have this problem.
I’d need to know more:
Cheers,
Hey Martin,
this is clearly one of (if not THE) best and error free tutorial. Thank you for sharing your experience.
Great to hear it helped! Thanks for the support!
This may be interesting for others who want to upgrade redmine on another host:
All from this tutorial applies but:
1) You need to copy config/database.yml and configuration.yml and a fresh mysql-dump (only DB redmine) from the old to the new system.
2) Since new redmine means new ruby you must edit the mysql connector in config/database.yml:
cahnge the line
“adapter: mysql”
with
“adapter: mysql2”
3) You do all the steps mentioned above but BEFORE you do
“gem install bundler”
just import the old mysql dump into the new (totally empty) redmine database.
3) You MUST skip:
“RAILS_ENV=production bundle exec rake redmine:load_default_data”
Don’t do that if you migrate to a new system. We do not want to load default data!
4) Follow this great tutorial to the end.
5) You should have succeeded in mirating your old redmine on a new host with a new redmine version.
This worked for me on Ubuntu 14.04 LTS.
Thanks goes to rchady, whom I met in the irc-channel #redmine on freenode and, of course, Martin Denizet.
Now redmine has become fun to me, again 🙂
How to fix this error when I am typing http://myip/redmine on web browser it will show the following error.
Web application could not be started
cannot load such file — bundler/setup (LoadError)
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:258:in `block in run_load_path_setup_code’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:361:in `running_bundler’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:256:in `run_load_path_setup_code’
/usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app’
/usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `’
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `’
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `’
Hello Supal,
It seems you installed the Ubuntu ruby package package . You get the error because you are not using the RVM ruby environment that the tutorial helps to setup.
An easy fix should be for you to remove the ruby package:
sudo apt-get remove ruby
and then re-install Passenger.Cheers!
Hello Martin,
will this tutorial work on 12.04 version of ubuntu ?
Cheers!
Mundel
Changing the way we commute daily
http://www.letsride.in
Hi Rajkumar,
Yes, it should work directly. If you have a problem contact me.
Cheers,
sudo a2enconf passenger
ERROR: Conf passenger does not exist!
How to solve the above issue?
It seems you skipped the step asking to copy the Passenger configuration into
/etc/apache2/conf-available/passenger.conf
.Please, read that section again.
web browser errors
Access denied for user ‘redmine’@’localhost’ (using password: NO) (Mysql2::Error)
and during apache restart errors
root@admin:/opt/redmine/current# sudo service apache2 restart
* Restarting web server apache2 [Fri Jul 04 15:21:21.497604 2014] [so:warn] [pid 11148:tid 139909792921472] AH01574: module passenger_module is already loaded, skipping
For
Access denied for user ‘redmine’@’localhost’
, it means you misconfigured yourdatabase.yml
.You either:
* Didn’t input the correct password
* Didn’t create correctly the MySQL user
* Didn’t preserve correctly the indentation of the YAML file
* Are using the wrong Rails environment (for example development instead of production)
module passenger_module is already loaded, skipping
. You get this message because you are trying to load twice the Passsenger module.It seems your server is a big mess. Maybe you should reinstall from scratch on a fresh OS.
RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
how to solve the above error
When you create your SSL certificate (OpenSSL command), you are asked to input the Common Name of the certificate. This common name should match the DNS name that you are using to access the server. Read that section again please.
Very nice document to create Redmine.
I have followed your tutorial to a T and have the domain set to mine in both files it says ServerName redmine.mydomain.net (as it is a .net). everything is loaded according to Apache and when I go to redmine.mydomain.net it says it cannot find the server. I am at a loss I looked through the guide again to make sure I didn’t miss anything and I have not. Maybe you’ll have a better idea. Let me know if i left out any info!
Hi Paul,
I didn’t detail but you should have control the domain you use.
In your case, you should have control over mydomain.net domain name, by having it registered by a registrar.
Once you have this (I assume you do), you can create a subdomain in you domain administration interface.
The said subdomain is a record such as:
redmine.mydomain.net A 1.1.1.1
where 1.1.1.1 is your server’s public IP.In case you don’t have a domain or a public IP, you may create a DNS record in your company router to associate your chosen domain to Redmine’s private IP.
You should be able to access you Redmine using the server’s IP address if Redmine is the only VirtualHost on the server. Note that you will get a SSL warning when not using the correct DNS name.
I didn’t want to talk into the details of managing the DNS as it is not the subject of the article and that the configuration required will be almost unique to each company according to their setup.
Let me know how it goes for you.
I am going to go through the whole setup again, my DNS is setup to point to redmine.mydomain.net. Now I do host 2 websites on this computer so is that going to break those sites?
Hi Paul, could you add my Skype (martin.denizet) please?
It will be easier because I’m afraid there is a misunderstanding here.
Cheers!
Sorry, I understand, I guess what I need to do is figure out how to run it as a SubURi because this guide breaks my other site on that network (assuming because of the redirection) Sorry for the confusion. I did not see your message I am EST so we have a bit of a time difference.
Actually, if your other site is on port 80, you can remove the redirection:
sudo a2dissite redmine-redirect
Then you can still access Redmine using HTTPS.
How about that?
When I go to https://mysite.com, it shows that I have a broken cert. I get my https crossed out, and “The site’s security certificate is not trusted!”. How would I go about fixing this?
Hi John,
I will try to keep the answer short and not too technical.
HTTPS assumes 2 functions:
1. Encryption of the traffic. (It’s not possible to read the dialog between the server and the client’s browser)
2. Authentication of the server (Make sure that we are really talking the mysite.com server and not a malicious server pretending to be mysite.com)
In the tutorial, I ask to generate a self-signed SSL certificate because it is immediate, free and better than nothing. With it, the traffic is encrypted but the definition of a self-signed certificate is that there is no third party trusted entity (Certificate Authority) to certify that this certificate is indeed trustworthy (It could be a spoof). That’s the message you get.
To fix this you have several options, from what I think is the worst, to what could be the best according to your situation:
1. Get rid of SSL. No more warning but also no more encryption. It’s arguably an option for a local network of trusted computers.
2. Accept the self signed-certificate. You can install in in your Windows certificate store or in your browser (simple in Firefox). That’s a quick-fix if you are just a couple of users.
2.bis If you are using Active Directory to manage your computers: Create a new certificate with a signing request and make your Active Directory sign the request. If you computers are domain members, the certificate will appear valid to them, if not, c’est would need to add the AD CA public key to their certificate store. This option can be convenient for a company because it keeps the control of the certificate validation in the AD. If you want to do that ask me, I will write an article about it.
3. Get a free SSL certificate. Yep, free and valid, with simple validation. You can check StartSSL: https://www.startssl.com/
4. Purchase a certificate with extended validation (EV). It’s a bit over the top. These certificate are mostly for sites like e-commerce with public users needing trust.
I hope it’s more helpful than confusing!
Let me know how it goes.
Thanks for the help Martin. I actually have Active Directory set up at my location, and they have a .crt and .key file that I can use. I placed that .crt and .key file that they are using on other servers in the /etc/apache2/ssl folder and named them redmine.crt and redmine.key and gave them the same permissions as the instructions above show. It still is showing as an unsafe connection after an apache restart. Thanks again!
I found my problem. I was trying the new cert on a test server, and it did not have an @mycompany.com url. I didn’t really understand how the certs worked. Thanks for all of your help.
Glad you got it working. Sorry for the late reply, I was on holidays 😉
Hi Martin,
long time listener, first time caller…
(great work on the instructions, good presentation)
So all was going well until ….
$sudo a2ensite redmine redmine-redirect
ERROR: Site redmine does nto exist
ERROR: Site redmine-redirect does nto exist
and webpage at https://~IPaddressofhost
I recieve a SSL recieved a record that exceeded max permissible length
I did add the ‘-out …. ‘ of the ssl piece after I read the other comments
Using Xubuntu 14.04 fully updated
Thanks for your work on this,
love to roll my/your own instead of Turnkey..
Hi Rob,
Thank you for your positive feedback!
Can you please tell me the result of the commands:
ls -lah /etc/apache2/sites-available
and:
ls -lah /etc/apache2/sites-enabled
here are the results from current,
user@Xubuntu1404:/opt/redmine/current$ ls -lah /etc/apache2/sites_available
ls: cannot access /etc/apache2/sites_available: No such file or directory
user@Xubuntu1404:/opt/redmine/current$ ls -lah /etc/apache2/sites_enabled
ls: cannot access /etc/apache2/sites_available: No such file or directory
but then also
user@Xubuntu1404:/etc/apache2/conf-available$ ls -lah
total 40K
drwxr-xr-x 2 root root 4.0K Jul 9 21:03 .
drwxr-xr-x 9 root root 4.0K Jul 9 20:47 ..
-rw-r–r– 1 root root 315 Jan 3 2014 charset.conf
-rw-r–r– 1 root root 3.2K Jan 3 2014 localized-error-pages.conf
-rw-r–r– 1 root root 189 Jan 3 2014 other-vhosts-access-log.conf
-rw-r–r– 1 root root 313 Jul 9 20:42 passenger.conf
-rw-r–r– 1 root root 3.6K Jul 9 21:25 redmine.conf
-rw-r–r– 1 root root 153 Jul 9 21:26 redmine-redirect.conf
-rw-r–r– 1 root root 2.2K Jan 3 2014 security.conf
-rw-r–r– 1 root root 455 Jan 7 2014 serve-cgi-bin.conf
user@Xubuntu1404:/etc/apache2/conf-available$ ls -lah
\total 40K
drwxr-xr-x 2 root root 4.0K Jul 9 21:03 .
drwxr-xr-x 9 root root 4.0K Jul 9 20:47 ..
-rw-r–r– 1 root root 315 Jan 3 2014 charset.conf
-rw-r–r– 1 root root 3.2K Jan 3 2014 localized-error-pages.conf
-rw-r–r– 1 root root 189 Jan 3 2014 other-vhosts-access-log.conf
-rw-r–r– 1 root root 313 Jul 9 20:42 passenger.conf
-rw-r–r– 1 root root 3.6K Jul 9 21:25 redmine.conf
-rw-r–r– 1 root root 153 Jul 9 21:26 redmine-redirect.conf
-rw-r–r– 1 root root 2.2K Jan 3 2014 security.conf
-rw-r–r– 1 root root 455 Jan 7 2014 serve-cgi-bin.conf
I was wondering if I hosed it at the start, I had opened a second shell as su -i and ran apt-get install curl, I exited out after that and ran sudo each time but several commands never asked for a password even though they were sudo.
It’s just a virtualbox machine so if I need to try again I saved a snapshot before starting. practice, practice, practice…
Thanks again.
Hi Rob,
You did put the redmine.conf and redmine-redirect.conf in the /etc/apache2/conf-available directory instead of /etc/apache2/sites-available.
I don’t know if it’s the source of your problems but it matters because the configuration is loaded before the sites.
I suggest you to move these 2 files over to /etc/apache2/sites-available and then run:
sudo a2ensite redmine redmine-redirect
Be careful, you did a typo copying the commands I asked you. You replaced the dash by a underscore.
Sudo has a cache. when you enter your password it will remember that you typed a correct password to elevate privileges for 15minutes by default on Ubuntu. See http://manpages.ubuntu.com/manpages/precise/en/man8/sudo.8.html for more details.
Let me know if it solves your problems.
Cheers
Thanks for the great step-by-step! I implemented it without SSL as it will be in internally accessible site only.
One question: What modifications would I have to make to my install to have this accessed under a folder instead of on the main page.
I dont have DNS working properly yet, so I access my webserver by IP address (eg. 10.0.0.1). I would like it to be (10.0.0.1/redmine) because I would like to install other sites on the same sever.
Thanks for your help!
Hi Brandon,
You will find detailed instructions here: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI
Basically, in the redmine.conf, you have to replace:
RailsBaseURI /
by:
RailsBaseURI /redmine
Then restart Apache2, That should do it.
Let me know how it does.
I followed your write up, and I firstly want to say you deserve a paycheck for this one! It has been the first write on this topic that has had very minimal (easily fixable) issues.
I am having one slight issue that I hope you can help me fix. When attempting to go to the address (redmine.site) (site = amazon ec2 instance public address) it did not work, so I did what you said, and still no go. So then I followed your comment above and edited the file, restarted the apache2 server and then attemped to go to site/redmine and that gives me a 404 error.
What could I be missing.
Again this is a AWS EC2 Instance running Ubuntu 14 LTS.
Thank you in advance
Hello Jasen,
Thank you for your comment, it’s always great to get positive feedback!
Regarding your issue I suggest you to check the following things:
ls -la /etc/apache2/sites-enabled
, to check the sites enabled in Apache2. It should be redmine-redirect.vhost and redmine.vhostFrom you comment, I feel like there could be a misunderstand on the URL to use. The URL you should connect to is https://domain.tld/, there is no /redmine to add.
Tell me if it helps.
Cheers!
Hi Martin,
All is good now, Redmine is up and running with SSL, this time used copy and paste of all commands into a fresh build.
The fail earlier was caused by trying to re-type in all the commands from your instructions, after a full work day, after a ‘legal’ recreation (Denver). My typos were at a peak…
Again great work on the instruction, thanks for all..
Are there any concessions with plugins using this method of deployment? to add CRM light as an example.
Thanks.
Hi Martin,
When I try to run the second step of the CRM light plugin install, I’m getting these errors, I did look through the CRM forum but did not see anyone else with these type of errors, hope I’m not bothering you in the wrong place but if you have a preference on how to setup the permissions to fix this, it sure would be appriciated..
steps from fresh bootup of fresh install;
copy extracted CRM plugin ‘redmine_contacts’ into /opt/redmine/current/plugins/
source /home/$USER/.rvm/scripts/rvm
cd /opt/redmine/current/
bundle install –without development test
bundle exec rake redmine:plugins NAME=redmine_contacts RAILS_ENV=production
Rails Error: Unable to access log file. Please ensure that /opt/redmine/current/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
rake aborted!
Could not create directory /opt/redmine/current/public/plugin_assets/redmine_contacts/images: Permission denied – /opt/redmine/current/public/plugin_assets/redmine_contacts
Again my apologies if this is the wrong place fror this but thought it could be a permissions issue for all plugins
No typos, just copy and paste this time..
Thank you..
Hi Rob,
Good catch there, the permissions are not correct in my article to allow installing a plugin that generates log entries or assets. For it to work, you would have to switch as www-data or sudo which is not very practical. Alternatively, you could become member of the www-data group, with few permission tweaks it would work.
Here is the practical fix:
cd /opt/redmine/current
sudo chmod 0775 log
sudo chmod -R 0665 log/*.log
sudo chown -R www-data:$USER files log tmp public/plugin_assets
sudo chmod -R 0775 public/plugin_assets
I took the info for permissions from redmine.org, I didn’t see there was a problem because there is no problem when you run the command as root.
Thanks for the feedback and sorry for the time you spent on this error!
Let me know if your problem is solved. I update the article immediately.
Thanks Martin…
All is good with the world now
Several of the plugins are working great and themes too..
Thanks so very much for the quick responses and excellent work.
If you’re ever in Denver, let me know, I owe you some refreshments…
Hey Rob,
Good to know, thanks for the support!
Hi Martin:
Sorry to bother, i have met some a problem, the apache2/error.log is
App 46257 stderr: ActiveRecord::StatementInvalid (Mysql2::Error: Table ‘redm
ine.settings’ doesn’t exist: SHOW FULL FIELDS FROM `settings`):
App 46257 stderr: app/models/setting.rb:226:in `check_cache’
App 46257 stderr: app/controllers/application_controller.rb:98:in `user_se
tup’
Do you any idea?
Hi Shawn,
I looks like your migration didn’t go well. Try to migrate again and look for errors:
RAILS_ENV=production bundle exec rake db:migrate
Cheers,
Hi Martin,
Great writeup. When I preform
$ RAILS_ENV=production bundle exec rake db:migrate
I’m getting:
Could not find command “exec rake”.
Hello Claudiu,
Sorry for the late reply, I was on holidays.
As suggested by Alex, you should try:
bundle exec rake db:migrate RAILS_ENV=production
Cheers!
Hi Martin,
Thanks for a great how-to’w, it’s works like a charm. now I want to add my web project with git authentication with ssh, how I do this??
regards,
Murad
Hi Murad,
Thanks for the feedback!
For git with SSH on Redmine, I don’t have much experience as I mostly worked with Git Smart Http.
However it seems that the popular option is This Gitolite plugin: http://www.redmine.org/plugins/redmine_git_hosting
I hope to hear from you if you try it ;).
Cheers!
I would be very interested in reading an article on how to integrate redmine and gitlab. I’ve read through a few, but nothing nearly this well thought out and thorough.
Hi Martin,
just wanna thank you, it was a really straight on installation!.
I was trying to test redmine locally, and the tutorial was right for me. The only part where I get lost, was on setting my domain (“Common Name” and “Server Name”) because my almost zero experience on this field. Finally setting both to “localhost” made me availabe to access redmine through “https://localhost”.
Just my two cents, best regards!
Santiago
Hi Santiago,
Thank you for your feedback! I actually hesitated to include the SSL instructions. After some thinking I decided that I should include them as I’am aiming to describe how to install a production instance.
Do you have a suggestion to improve that part?
Cheers,
Thanks for excellent documentation,
I applied all steps but getting errors. Here is browser output:
Cannot execute “/home/pserverusr/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.49/buildout/agents/SpawnPreparer”: Permission denied (errno=13)
Error ID
801ca3c2
Application root
/opt/redmine/current
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
production
Ruby interpreter command
/home/pserverusr/.rvm/gems/ruby-2.0.0-p481/wrappers/ruby
User and groups
Unknown
Environment variables
Unknown
Ulimits
Unknown
And my /etc/apache2/conf-available/passenger.conf file :
LoadModule passenger_module /home/pserverusr/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.49/buildout/apache2/mod_passenger.so
PassengerRoot /home/pserverusr/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.49
PassengerDefaultRuby /home/pserverusr/.rvm/gems/ruby-2.0.0-p481/wrappers/ruby
How can i fix this error? i searched in internet but couldn’t find anything.
Thanks for help.
Your site deleted some characters in my first post. You can see my correct passenger.conf file from here: http://www.pastebin.ca/2836019
Hello Mehmet,
I’m a bit swamped at the moment so I suggest you to try this quickfix:
chown -R $USER:www-data /home/pserverusr/.rvm
Cheers,
Hi Martin,
Thanks for your quick feedback.
I tried ‘chown -R $USER:www-data /home/pserverusr/.rvm’ code but it doesn’t work.
While i was searching for bugfix, i realized that passenger module didn’t installed properly. I remembered apache module installer recommended to fix ‘home/preserveusr’ path’s permissions but i didn’t fix it.
Then i revert all the changes, i read your article and applied all steps more carefully. And it works now!
Thank you very much for this excellent article, and thank you for your help.
Awesome! Good job! 🙂
To Configure Google apps email: In the end it turned out that you can’t have both tls: true and enable_starttls_auto: true in your settings, so you need to comment tls: true setting and your redmine will be able to send email messages via Google’s SMTP. Hope this will be helpful to someone.
Hi Richard,
Thank you for the contribution!
Cheers,
After I finished with Install Ruby 2.0.0 with RVM as you said I started command “rvm list known” and as reply I got rvm: command unknown …. can you help me where might be a problem 😀
I have fixed that… now I have a question ..as e mail server for delivery and receiving method I need to use gmail so as redmine.domain server what I need to change ??? 😀 I’m new with this and I have finishing project at school Redmine..please help 😀
Hi, I’ve a test server using Gmail, the config I use is:
email_delivery:
delivery_method: :async_smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: 587
domain: "smtp.gmail.com"
authentication: :plain
user_name: "[email protected]"
password: "password"
in config/configuration.yml. Be careful, YAML is white-space sensitive.
More about email configuration in the official documentation: http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
Cheer,
Hello Jasmina,
For the record, to use RVM you need to run the following command:
source /home/$USER/.rvm/scripts/rvm
Cheers,
after I did everything I couldn’t restart apache i get ”
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message”
can you help me with this … I didi e-mail configuration as you said 😀 but still I don’t know if is it working because as I can see I haven’t cofigurate well apache with redimine
Hi Martin,
First of all your tutorial is great for starters thanks for sharing that. But my redmine.domain.com only shows apache default page and I couldn’t change it so if you help me out this I will appreciate it.
Hi Marty,
You must have Apache’s default configuration enabled. If you don’t need/use it try:
sudo a2dissite 000-default
sudo service apache2 restart
That should do it.
Cheers!
Hi ,
First thanks for your tutorial .
It is working fine on my local server and my local network
But now I install on AWS server here local ip and static IP are different, like local IP:192.168.0.105
static IP: 67.44.12.88
so can you help to define
/etc/apache2/sites-available/redmine-redirect.conf and
/etc/apache2/sites-available/redmine.conf files
paramter like ServerName
Thanks
Yogesh S
Hi Yogesh,
Thanks for the feedback.
You can set your ServerName to your public IP.
Or better, to you DNS name if you have one.
Note than you can also use ServerAlias if you have several ways to address your server.
Make sure you allow through ports 80 and 443.
Cheers,
Hello,,,,,, Its great tutorial..
How can i configure without ssl?
Hi Zul,
Thanks for the feedback.
To remove HTTPS, disable the HTTPS redirection with:
a2dissite redmine-redirect.vhost
Then edit: /etc/apache2/sites-available/redmine.vhost:
Remove:
NameVirtualHost *:443
Remove the SSL configuration:
SSLEngine on
SSLProtocol +TLSv1.2 +TLSv1.1 +TLSv1
SSLCompression off
SSLHonorCipherOrder on
SSLCipherSuite "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:RC4-SHA:AES256-GCM-SHA384:AES256-SHA256:CAMELLIA256-SHA:ECDHE-RSA-AES128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:CAMELLIA128-SHA"
SSLCertificateFile /etc/apache2/ssl/redmine.crt
SSLCertificateKeyFile /etc/apache2/ssl/redmine.key
## Enable Strict Transport: http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
Header add Strict-Transport-Security "max-age=15768000"
## SSL Stapling, more at: https://www.insecure.ws/2013/10/11/ssltls-configuration-for-apache-mod_ssl/
# SSLUseStapling on
# SSLStaplingResponderTimeout 5
# SSLStaplingReturnResponderErrors off
# SSLStaplingCache shmcb:/var/run/ocsp(128000)
Edit the VirtualHost listening port such as:
Cheers,
Hello Martin,
Thanks for this excellent article. I think its the most comprehensive article on redmine installation on internet.
I have followed your tutorial on Ubuntu 14.04 but I am getting following error
Could not find rake-10.1.1 in any of the sources (Bundler::GemNotFound)
/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:92:in `block in materialize’
/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `map!’
/usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:85:in `materialize’
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:114:in `specs’
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:159:in `specs_for’
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:148:in `requested_specs’
/usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs’
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup’
/usr/lib/ruby/vendor_ruby/bundler.rb:120:in `setup’
/usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `’
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require’
/home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:263:in `block in run_load_path_setup_code’
/home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:366:in `running_bundler’
/home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:261:in `run_load_path_setup_code’
/home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:100:in `preload_app’
/home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:158:in `’
/home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:29:in `’
/home/webadmin/.rvm/gems/ruby-2.0.0-p576/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:28:in `’
Regards,
Hello Abbas,
Thanks for dropping by. Sorry for the late reply.
Did you get this error running
bundle install
?If so I suggest you check your gem sources: http://guides.rubygems.org/command-reference/#gem-sources
Cheers,
Doesn’t work for me unless I create a symlink
/var/www/redmine -> /opt/redmine/public
and set it as document root in redmine site configuration.
If I don’t do this, apache keeps showing its home page.
Hello,
That should be because you didn’t run
sudo a2dissite 000-default
and kept the default Apache configuration.Cheers,
You post was excellent. Not sure if you can help I have installed postfix to send email but I get this error:
An error occurred while sending mail (getaddrinfo: Name or service not known) not sure what the issue is.
I have checked the config in the configuration.yml file with now luck. Any suggestions would be appreciated.
Hi Geoff,
Seems like a DNS resolution problem. Maybe you kept the sample configuration active?
What’s the content of your configuration.yml ?
Cheers,
Pingback: Redmine Ubuntu 14.04 Leichter als CentOS 7? - Frank the DevOp
Worked perfectly!!!! Thank you!
Thank you for wonderfull article. One is most better material in all internet.
Good luck!
Perfect instruction to me. Many Thanks!
Thanks for this article.
I just tried with the latest 2.6 stable instead of 2.5.
Everything is working well.
Thanks again.
Bonjour Martin,
thank you for this great looking article.
I\’m not going to test it now but my first question is, how is the best practice to update all tools above to the last stable version?
It\’s not about like a standard \”apt-get update && apt-get upgrade\”-procedure 🙂
Thank you well, axel…
Hello Axel,
Thank you for your comment.
I want to do an article about this for a while.
I give you the headlines of how I update an instance installed following my tutorial (note that I’m not using an apt package for either Redmine or Ruby):
svn info
svn update
to switch branch I’d usesvn switch URL_OF_NEWEST_STABLE_BRANCH
From memory, that should be it!
Note that that some plugins you use might become incompatible and it’s a good idea to check for updates.
Also possible you want to update Ruby to latest compatible but I leave it Google, according to how you installed Ruby it will vary a lot.
You may also want to check the generic instructions there: http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
Cheers!
Thank you well again, Martin.
To 1: i see, Redmine 2.x doesn’t support Ruby 2.2
To Ruby: so, i would install it like your charming article!? How is the way to update your way? Roughly so with curl: curl -sSL https://get.rvm.io | bash -s stable –ruby=2.2.0 to cover 2.0.0?
–Axel
Bonjour Martin,
thank you for this great looking article.
I’m not going to test it now but my first question is, how is the best practice to update all tools above to the last stable version?
It’s not about like a standard “apt-get update && apt-get upgrade”-procedure 🙂
Thank you well, axel…
Double posting.
Please delete. My mistake…
–Axel
All installation looks working well but i get nothing when i try do display redmine
I think i got problem with Servername configuration. i Dont have domain name i just want to work on localhost so don\’t know how to configure for it.
Hi, for the record, you should have no problem to use it locally using localhost if you disable the Apache default configuration
sudo a2dissite 000-default
.Cheers!
I finally succes to do it with webrick server.
Hello,
The installation I made with your tutorial works really well.
But, the thing I need is to have redmine only accessible from a subdirecetory named “redmine”.
I just need redmine uses “mydomain.com/redmine” as base URL for all links and ressources.
I tried to make a rewriterule in a htaccess but it doesn’t work…
Nevermind, I’ve found the solution on Redmine website.
So, I share it => http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI
I used the first suggestion (config/environment.rb)
Hello,
I have some problem with my setup. I get Server not found in the browser. I hace checked redmine.error.log:
RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) (it is a warn)
I used the following url redmine.xyz.sytes.net where the xyz.sytes.net is registered as dynamic DNS. The xyz.sytes.net shows the default apache page but the one with redmine doesn\’t work unfortunately.
I am not sure where the problem occured: apache redirection, ssl certificate, redmine & ruby issue etc.
Could you help me to find out what went wrong?
Best regards,
Quentis
Hello Quentis,
I’m pretty sure you get this warning because you use a self-signed certificate.
You can request a valid one signed by a third-party CA for free from http://www.startssl.com/ for example.
Also, if you are in a Active Directory , you can get your certificated signed by AD.
Cheers,
Excellent tuto, testé dans un container docker, fonctionne à merveille. A signaler :
Avant le
mysql -uroot -p
il m\’a fallu démarrer le service
service mysql start
Et avant le
curl -sSL https://get.rvm.io | bash -s stable –ruby=2.0.0
Il m\’a fallu importer la clé manuellement
command curl -sSL https://rvm.io/mpapis.asc | gpg –import –
Un grand merci. Ox.
Hello Oxedions,
Merci du commentaire. Effectivement il y a eu un changement dans l’installation de RVM, je dois mettre à jour mes tutoriaux.
Cheers!
Excellent write-up.
After successful install I\’m attempting to add the dmsf plugin but the rake command fails as follows:
Bundler could not find compatible versions for gem \”activesupport\”:
In Gemfile:
simple_enum (>= 0) ruby depends on
activesupport (>= 4.0.0) ruby
rails (= 3.2.21) ruby depends on
activesupport (3.2.21)
Any ideas?
Many thanks for this well- written tutorial, I have a question, thsough.
Is git “smart https” access supposed to work in this config?
I see nothing about it in redmine.conf.
Should I integrate with Your other walkthrougs?
Bonjour,
Tout d\’abord merci pour ce tuto très utile. Je bute toutefois sur le svn (lié à une 3.0.0 de redmine) qui ne permet pas le logging par pass mysql et refuse l\’accès aux utilisateurs. J\’ai internal error sur http://monip/repositories/numseq/committers
En revanche, je vois le dépôt sans pouvoir l\’utiliser.
Auriez-vous une idée ?
Merci
Hi Martin,
Thanks for tutorial. I have installed Redmine to Hyper-V virtual machine successfully with your tutorial.
But sometimes, i am getting Internal Server Error. If i restart apache server, redmine is running well again.
When i look at log files, i saw this error: \”ActionView::Template::Error (cannot load such file — tzinfo/definitions/Europe/Dublin):\”–>timezone part maybe different for other users.
Here is my log file, you can see detailed error:
https://gist.github.com/anonymous/f4469aadb4ad69186d51
Do you have any idea to fix this issue?
Good work Martin.
However, I use Nginx instead of Apache and this quality tutorial helped me to install redmine on my server. I will leave this URL ( https://www.rosehosting.com/blog/install-redmine-on-an-ubuntu-14-04-server-with-mariadb-puma-and-nginx/ ) for anyone that might find it useful. After all, sharing is caring. 🙂
Hi, great tutorial. Unfortunately i cant see redmine.
I believe this is the problem (in redmine.error.log)
[Mon Mar 23 20:09:45.255513 2015] [core:notice] [pid 24864] AH00094: Command line: \’/usr/sbin/apache2\’
/home/server/.rvm/gems/ruby-2.2.0/gems/passenger-5.0.4/helper-scripts/prespawn:113:in `initialize\’: Connection refused – connect(2) for \”::1\” port 443 (Errno::ECONNREFUSED)
Any help or ideas will be greately apreciated.
Having a weird issue with using Redmine in a sub URI. The redmine.conf has the RailsBaseURI /redmine setup and saved. The http://website/redmine works for a couple of days it then makes the http://website/redmine not available and it can only be accessed via http://website. The only way to fix it is to restart Apache2, it then goes back to http://website/redmine. Below is the configuration currently running. Wondering if anyone has encountered a similar problem.
Redmine 3.0
Apache 14.04
Ruby 2.0
Thanks..
Below is the contents of the redmine.conf file
ServerName redmine.domain.com
ServerAdmin [email protected]
ServerName redmine.domain.com
DocumentRoot /opt/redmine/current/public/
## Passenger Configuration
## Details at http://www.modrails.com/documentation/Users%20guide%20Apache.html
PassengerMinInstances 6
PassengerMaxPoolSize 20
RailsBaseURI /redmine
PassengerAppRoot /opt/redmine/current
# Speeds up spawn time tremendously — if your app is compatible.
# RMagick seems to be incompatible with smart spawning
RailsSpawnMethod smart
# Keep the application instances alive longer. Default is 300 (seconds)
PassengerPoolIdleTime 1000
# Keep the spawners alive, which speeds up spawning a new Application
# listener after a period of inactivity at the expense of memory.
RailsAppSpawnerIdleTime 3600
# Additionally keep a copy of the Rails framework in memory. If you\’re
# using multiple apps on the same version of Rails, this will speed up
# the creation of new RailsAppSpawners. This isn\’t necessary if you\’re
# only running one or 2 applications, or if your applications use
# different versions of Rails.
PassengerMaxPreloaderIdleTime 0
# Just in case you\’re leaking memory, restart a listener
# after processing 5000 requests
PassengerMaxRequests 5000
# only check for restart.txt et al up to once every 5 seconds,
# instead of once per processed request
PassengerStatThrottleRate 5
# If user switching support is enabled, then Phusion Passenger will by default run the web application as the owner if the file config/environment.rb (for Rails apps) or config.ru (for Rack apps). This option allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of environment.rb/config.ru.
PassengerUser www-data
PassengerGroup www-data
# By default, Phusion Passenger does not start any application instances until said web application is first accessed. The result is that the first visitor of said web application might experience a small delay as Phusion Passenger is starting the web application on demand. If that is undesirable, then this directive can be used to pre-started application instances during Apache startup.
PassengerPreStart http://127.0.0.1:80/redmine
Options +Indexes +FollowSymLinks -MultiViews
AllowOverride All
<IfVersion
Order allow,deny
Allow from all
= 2.3>
Require all granted
AddOutputFilter DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \\bMSIE !no-gzip !gzip-only-text/html
ErrorLog ${APACHE_LOG_DIR}/redmine.error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/redmine.access.log combined
ServerSignature Off
source /home/$USER/.rvm/scripts/rvm/home/root/.rvm/scripts/rvm: No such file or directoryI can\’t further. Thats what I get over and over and over again.
Things changed a bit in RVM since I wrote the article. It needs updating. For the time being, you can trust the instructions RVM gives.
On the 2nd step I get an error that says it will not download: \”GPG signature verification failed for /home/User/.rvm/achives/blah blah… I used this command to fix it: (gpg –keyserver hkp://keys.gnupg.net –recv-keys BF04FF17) (no parenthesis) The end of this command may be different for others. It is the characters after RSA key ID.
I can vouch and say that this tutorial still works just fine. I have a redmine serer up and running 04/30/2015
Alright so I managed to get everything working thanks to your awesome article and even used the latest Ruby and Redmine.
But it\’s weird because after I modified the smtp stuff in the configuration file and restarted Apache it no longer worked.
It\’s now throwing this nasty error indicating it couldn\’t span a process
Could not spawn process for application /opt/redmine: An error occured while starting up the preloader.
Error ID: 48dcaf4d
Have you ever see this before? Is it because I installed this as \”not\” root? For example, does rvm or something else need to be running that I am missing…
Any help would be awesome!
Okay never mind I tried to comment out all my mail changes and viola it\’s happy camper again… yeesh !
THANKS FOR an awesome article btw!
Thanks a lot for this awesome tutorial, it saved my day.
Worked fine with redmine 3.1-stable
Hi Martin
Any idea why I get error when running passenger-install-module-apache2-install. It runs up to point where it gives me the passenger config file to use in apache. It complains that there is somethign wrong with configuration. Have checked typos etc and all is correct
Hello Elhan,
It seems it expects you to install the new configuration when it displays it. After that, it checks that you configured Apache correctly. You can ignore the warning and configure Apache after the install script is completed.
If Redmine starts you did everything correctly!
Cheers,
Tx for the best tutorial.
I have not seen better !!!
Stano
$likes++
Perfect tutorial brother.
You should post that to the official redmine website.
Pingback: 在ubuntu14.04上安裝redmine – HC!專注於LAMP技術的技術部落客
Pingback: Redmine Ubuntu 14.04 Leichter als CentOS 7? - FrankTheDevop
Can some one tell me how to set up it as centralized host?. Currently i am able to set it up on my local instance. In our organization around 50-60 people needs to use it.
Any help will be appreciated
Hi
I wanted to upgrade my redmine version from 3.1.1 to 3.4.2 (2017-07-16).
can you please help on this.
Pingback: Redmine 500 Internal Server Error on My account page – Blog SatoHost
Pingback: RVM install via SaltStack (Could not install Ruby) – Blog SatoHost