Project

General

Profile

HowTo Install Redmine 231 On Ubuntu 1204 with git and Redmine Git Hosting plugin » History » Revision 17

Revision 16 (sugeng tigefa, 2014-02-05 23:36) → Revision 17/19 (Christopher Semmler, 2014-02-20 16:22)

h1. HowTo Install Redmine 231 On Ubuntu 1204 clean installation with git and Redmine Git Hosting plugin 

 {{toc}} 

 h2. Installing LAMP 

 <pre> 
 apt-get update && apt-get upgrade -y 
 apt-get install tasksel 
 tasksel 
 </pre> 

 choose LAMP server and choose a password for MySQL root account 
 
 h2. Installing Packages 

 <pre> 
 apt-get install ruby rubygems libruby libapache2-mod-passenger ruby-dev libmysqlclient-dev libmagickcore-dev libmagickwand-dev git git-core -y 
 </pre> 

 *Reboot Reboot your machine!* machine!!! 

 h2. Installing Redmine 

 <pre> 
 cd /tmp 
 wget http://www.redmine.org/releases/redmine-2.3.4.tar.gz 
 tar -xzvf redmine-2.3.4.tar.gz 
 mv redmine-2.3.4 /usr/local/share/redmine-2.3.4 
 ln -s /usr/local/share/redmine-2.3.1 /usr/local/share/redmine 
 chown -R root:root /usr/local/share/redmine-2.3.4 
 gem install bundler 

 (Note: I (marke - i found this extra step from shah helpful: helpful    gem install rdp-mysql2 ) 

 cd /usr/local/share/redmine/ 
 
 bundle install --without development test postgresql sqlite 
 </pre> 

 h2. Setting h2 .Setting up Redmine user and database in MySQL 

 <pre> 
 mysql -u root -p 
 </pre> 
 <pre> 
 CREATE DATABASE redmine CHARACTER SET utf8; 
 CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; 
 GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; 
 </pre> 

 h2. Configuration 

 h3. File permissions premissions 

 <pre> 
 useradd redmine 
 mkdir -p tmp tmp/pdf public/plugin_assets 
 sudo chown -R redmine:redmine files log tmp public/plugin_assets 
 sudo chmod -R 755 files log tmp public/plugin_assets 
 </pre> 
 Copy /usr/local/share/redmine/config/database.yml.example to /usr/local/share/redmine/config/database.yml and edit this file in order to configure your database settings for "production" environment. 
 Example for a MySQL database using ruby1.8 or jruby: 
 <pre> 
 production: 
   adapter: mysql2        (note: For Rails < 3.1 use mysql instead of mysql2) 
   database: redmine 
   host: localhost 
   username: redmine 
   password: my_password 
 </pre> 

 Generate a session store secret: 
 <pre> 
 rake generate_secret_token 
 </pre> 

 <pre> 
 (Note (marke - do this upon error message about mysql2: mysql2      bundle install     ) 
 </pre> 


 Generate the database structure: 
 <pre> 
 bundle exec rake db:migrate RAILS_ENV=production 
 </pre> 

 Generate default configuration data: 
 <pre> 
 bundle exec rake redmine:load_default_data RAILS_ENV=production 
 </pre> 
 (using “es” for Spanish language in terminal prompt) 

 h4. Database encryption 

 If you want to encrypt your redmine database do as follows: 

 # Copy the default config file @/usr/local/share/redmine/config/configuration.yml.example@ to @/usr/local/share/redmine/config/configuration.yml@ 
 # Edit configuration.yml and create a cipher key there for the environment you've used so thus far - production. Be sure to read the comment in this file. They are very detailed and there for you. 
 # Run: <pre> 
 bundle exec rake db:encrypt RAILS_ENV=production 
 </pre> 

 h2. Apache 

 Setup Apache’s VirtualHost config 
 <pre> 
 vim /etc/apache2/sites-available/redmine.example.com 
 </pre> 

 <pre> 
 # 8080 just in this case; it case is because we use a reverse proxy before Apache. Otherwise simply use the standard "*:80" 

 <VirtualHost *:8080> 
  ServerName redmine.example.com 
  DocumentRoot /usr/local/share/redmine/public 
  <Directory /usr/local/share/redmine/public> 
    AllowOverride all 
    Options -MultiViews 
  </Directory> 
 </VirtualHost> 
 </pre> 

 (Note: That (marke - that didnt work out for me, me - so I i played it fast and loose by killing the 'default' file and using the 'modified modified  
   default' 'default from    http://imsunnyshah.wordpress.com/2013/04/29/how-to-setup-redmine-2-3-0-on-ubuntu-12-10/    ) 

 *TODO:: The redmine installation works, works but user users editing return an error when using Passenger passenger and adding Git Plugin* to add git pluging* 

 Once you enable this Virtual Host virtual host (a2ensite redmine.example.com) and reload Apache (apache2ctl graceful), you should see your site running on http://redmine.example.com. 

 The default login/password is admin/admin (*don't (don't forget to change this*). this). 

 h2. Sources of inspiration 

 We used the following resources as a starting point. Thanks to their respective authors. 

 * http://madpropellerhead.com/random/20100820-installing-redmine-on-debian-with-apache (outdated, for Lenny) 
 * http://www.redmine.org/projects/redmine/wiki/RedmineInstall 
 * http://hodza.net/2012/03/15/howto-install-redmine-on-debian-6-squeeze-ruby-on-rails-apache2-passenger/ 
 * http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Debian_with_Ruby-on-Rails_and_Apache2-Passenger