📜 ⬆️ ⬇️

Howto Installing Redmine2.2.0 Debian + Apache + PostgreSQL + passenger

After spending 4 days in thinking about what it all works and how it is put, having shoveled tons of more than strange mistakes, I wrote myself a cheat sheet ... and I would like to share it with the others. The following is a small fix IMHO suitable for ubuntaria

redmine + PG


At the beginning of the installation we have Debian 6.0.6, I omit its installation.
Check and update dependencies:

sudo su <> apt-get update apt-get upgrade 

Now install all the necessary packages en masse:
 apt-get install postgresql postgresql-client postgresql-contrib php5-pgsql phppgadmin apache2 subversion libpgsql-ruby libapache2-mod-passenger ruby rubygems libruby libpq-dev libmagickcore-dev libmagickwand-dev libcurl4-openssl-dev apache2-prefork-dev libapr1-dev libaprutil1-dev 

Sobsno Redmine itself also does not hurt us, look at the page with releases , choose the right one and download it like for example:
 wget http://rubyforge.org/frs/download.php/76627/redmine-2.2.0.tar.gz 

unpacking
 tar xpvf redmine-2.2.0.tar.gz -C /usr/local/share/ 

label
 ln -s /usr/local/share/redmine-2.2.0/ /usr/local/share/redmine 

we change the owner
 chown -R root:root /usr/local/share/redmine-2.2.0/ 

')
Now let's deal with DB
we create user and base in postgrese
 psql postgres=# CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD '<password>' NOINHERIT VALID UNTIL 'infinity'; postgres=# CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine TEMPLATE template0; postgres=# \q exit 


so that everything spins we need a bandler:
 gem install bundler 

Go to the folder and launch its installation. The full path to the bundler is optional if the path is registered in advance
 cd /usr/local/share/redmine /var/lib/gems/1.8/bin/bundle install --without development test mysql sqlite 

we create a connection configuration to the database:
 touch /usr/local/share/redmine/config/database.yml nano /usr/local/share/redmine/config/database.yml 

we push there the following config
 production: adapter: postgresql database: redmine host: localhost username: redmine password: "<password>" encoding: utf8 

save close.
generic token
 /var/lib/gems/1.8/bin/rake generate_secret_token 

we start rake
 RAILS_ENV=production /var/lib/gems/1.8/bin/rake db:migrate RAILS_ENV=production /var/lib/gems/1.8/bin/rake redmine:load_default_data 

when prompted to enter 'ru'
as a happy outcome, we see:
Default configuration data loaded.


proceed to "web2.0"



to start PG Admin`ka
 nano /etc/phppgadmin/apache.conf 

we give acc. lines to this type (or to your own perverted taste):
 #deny from all #allow from 127.0.0.0/255.0.0.0 ::1/128 allow from all 


Create a config for the site “redmine” in the Apache
 touch /etc/apache2/sites-available/redmine echo "RailsBaseURI /redmine" > /etc/apache2/sites-available/redmine 


Looking ahead - maybe something will change in the future, but at the moment there are problems with libapache2-mod-passenger
image
therefore we change the passenger for the one that comes with the redmine refuses to work as it should
 gem install passenger 

 /var/lib/gems/1.8/bin/passenger-install-apache2-module 

We press enter, we are convinced that the passenger is in order
 nano /etc/apache2/mods-available/passenger.conf 

should look like this
 <IfModule mod_passenger.c> PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.18 PassengerRuby /usr/bin/ruby PassengerUserSwitching off PassengerDefaultUser www-data </IfModule> 

Pay attention to the lines UserSwitching and DefaultUser - solve the problem of entering admin_settings for version = 2.2.0
and download file

 nano /etc/apache2/mods-available/passenger.load 

with content
 LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.18/ext/apache2/mod_passenger.so 

Turn on redmine in apache
 a2ensite redmine 

we put down the necessary rights and owners
 chown -R www-data:www-data /var/www/redmine chown -R www-data:www-data /usr/local/share/redmine/tmp chmod 0777 /usr/local/share/redmine/files chmod 0666 /usr/local/share/redmine/log/production.log 

now after
 /etc/init.d/apache2 reload 
see
redmine_server / phppgadmin postgame admin panel
you can do backups and other joys
redmine_server / redmine sobsno redmine
everything! we use

Source: https://habr.com/ru/post/165451/


All Articles