It was not possible to find the information I needed on the great expanses of the Internet, and the official redmine website proudly told me “Not found”. A little googling after all was able to install and run, and even go to this miracle project management. Manual wrote for themselves, but considering my search, I decided to post it.
1. Starting small
Install Ruby and gem:
cd /usr/ports/lang/ruby18/ && make install clean cd /usr/ports/devel/ruby-gems && make install clean
There should be no problems here.
2. Invite Redmine
There were options to put 2.0, because for him there are intelligible mana ... but no.
We pull that fresher:
cd /www svn co http://svn.redmine.org/redmine/branches/2.2-stable redmine
3. Also bundler manager
gem install bundler
The easiest is over.
4. Attempts №1-4
cd /www/redmine/ bundle install --without development test postgresql sqlite
PS Thank you
sistemshik for the comment about eliminating unnecessary problems with installing redmine and unnecessary programs. Disable ImageMagick the way it is most likely not needed.
Wiki redmine cd /www/redmine/ bundle install --without development test postgresql sqlite rmagick
Then the problems below should not be.
Immediately I can say that it should give an error. Although only I can be so lucky.
I don’t say exactly which one and I had a lot of them, but as it turned out, and because I didn’t execute two small commands:But if suddenly you did not specify rmagick then:
cd /usr/ports/graphics/ImageMagick && make install clean cd /usr/ports/ftp/curl && make install clean
Always look at the problem from the side , then I tried to put all the dependencies separately, I changed my mind in time.
5.httpd.conf for Apache
I don’t write apache and mysql mana since there were no problems with them.
Instalim modules
')
gem install passenger passenger-install-apache2-module
Here we are offered to correct httpd.conf and add the lines:
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.19/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.19 PassengerRuby /usr/local/bin/ruby18
I see no reason not to trust:
vi /usr/local/etc/apache22/httpd.conf
We insert after all LoadModule for beauty:
... LoadModule php5_module libexec/apache22/libphp5.so LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.19/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.19 PassengerRuby /usr/local/bin/ruby18 <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> ...
6. We rule virtual host
vi /usr/local/etc/apache22/Includes/jff
By the way, it caused the most problems, since different manuals interpret the configuration of the config in their own way.<VirtualHost *: 80>
DocumentRoot / www /
...
PassengerAppRoot / www / redmine
RailsBaseURI / redmine
Alias / redmine / www / redmine / public
<Directory "/ www / redmine / public">
RailsEnv production
Options Indexes ExecCGI FollowSymLinks
AllowOverride all
Order allow, deny
Allow from all
Edit No one rules the young and the inexperienced. Made a mistake, because of what all the time got only on redmine.
Corrected:
<VirtualHost *:80> DocumentRoot /www/ ... <Directory /www/redmine> PassengerAppRoot /www/redmine RailsBaseURI /redmine PassengerResolveSymlinksInDocumentRoot on </Directory> </VirtualHost>
Now both example.com/cacti and example.com/nagios are back.
PS Does not claim to be the best solution.
7. Create user and database
mysql -uroot -p -e 'create database redmine character set utf8; grant all on redmine.* to redmine@localhost identified by "passwd";flush privileges' ;
8. Config db for redmine
mv /www/redmine/config/database.yml.example /www/redmine/config/database.yml vi /www/redmine/config/database.yml
We change only for production, the rest we do not need:
production: adapter: mysql database: redmine host: localhost username: redmine password: "*************" encoding: utf8
Things are easy.
Thanks to Helsus for:
setenv RAILS_ENV production
Before base operations.
Go to the folder with redmine:
cd /www/redmine
We generate keys:
rake generate_secret_token
Passing through the installation I came across:
rake generate_secret_token rake aborted! no such file to load -- iconv /www/redmine/lib/tasks/migrate_from_mantis.rake:21:in `require' /www/redmine/lib/tasks/migrate_from_mantis.rake:21 /www/redmine/Rakefile:7 (See full trace by running task with --trace)
Oops, forgot to put ruby-iconv. We put:
cd /usr/ports/converters/ruby-iconv && make install clean
We migrate and fill in the tables:
rake db:migrate rake redmine:load_default_data
Rights to redmine Indian:
chown -R www:www ./redmine
Restart Apache:
/usr/local/etc/rc.d/apache22 restart
9. The end?
Well, I had no more problems, so I went to my favorite browser and logged in as admin / admin:
http://example.com/redmine
PS More elegant solutions are welcome.