HowTo Install Redmine 2 integrated with Gitolite 2 on Debian Wheezy with Apache and Phusion Passenger » History » Revision 4
« Previous |
Revision 4/19
(diff)
| Next »
André Domarques, 2013-09-12 05:56
HowTo Install Redmine 2 integrated with Gitolite 2 on Debian Wheezy with Apache and Phusion Passenger¶
HowTo Install Redmine 2.x (MySQL) integrated with Gitolite 2.x on Debian Wheezy with Apache and Phusion Passenger.
About:
A quick step-by-step for install Redmine and Gitolite plugin on Debian Wheezy mainly using default packages.
If I missed something, please let me know
Required packages¶
apt-get -y install sudo ssh bzip2 zip unzip apache2 libapache2-mod-passenger mysql-server libmysqlclient-dev ruby ruby1.9.1-dev git git-core gitolite libmagickcore-dev libmagickwand-dev
Users and ssh-key¶
Create an user for Redmine and another for Gitolite:
adduser --system --shell /bin/bash --gecos 'Git Administrator' --group --disabled-password --home /opt/gitolite git adduser --system --shell /bin/bash --gecos 'Redmine Administrator' --group --disabled-password --home /opt/redmine redmine
Generate a ssh-key for redmine user. This user will be used as admin of Gitolite. The name of key should be redmine_gitolite_admin_id_rsa.
sudo su - redmine ssh-keygen -t rsa -N '' -f ~/.ssh/redmine_gitolite_admin_id_rsa exit
Configuring Gitolite¶
dpkg-reconfigure gitolite
Type data bellow:
- user: git
- repos path: /opt/gitolite
- admin ssh-key: /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa.pub
Visudo configuration¶
visudo
Add the following lines:
# temp - remove after installation redmine ALL=(ALL) NOPASSWD:ALL # redmine gitolite integration redmine ALL=(git) NOPASSWD:ALL git ALL=(redmine) NOPASSWD:ALL
Note that redmine user will be able to run root commands, but this is just to simplify the next steps, remove that line after installation.
Redmine installation¶
The installation and configuration is like the official documentation. Simply reproducing to maintain the flow on this how-to.
sudo su - redmine cd ~ wget http://rubyforge.org/frs/download.php/77023/redmine-2.3.2.tar.gz tar zxf redmine-2.3.2.tar.gz mv redmine-2.3.2/* . rm -Rf redmine-2.3.2
Create database and user¶
mysql -u root -p CREATE DATABASE redmine CHARACTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'redmine'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
Configure database and email¶
cd /opt/redmine/config cp database.yml.example database.yml cp configuration.yml.example configuration.ymlCheck more at:
- http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Step-3-Database-connection-configuration
- http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Configuration
Create plugin assets directory
cd ~ mkdir public/plugin_assets
Now finish the installation.
sudo gem install bundler bundle install --without development test postgresql sqlite rake generate_secret_token RAILS_ENV=production rake db:migrate RAILS_ENV=production rake redmine:load_default_data
Redmine Gitolite integration¶
The plugin used on this how-to is the fork of jbox-web, you can get more information at:- http://www.redmine.org/plugins/redmine-gitolite
- http://jbox-web.github.io/redmine_git_hosting/
- https://github.com/jbox-web/redmine_git_hosting
Download.
cd ~/plugins git clone https://github.com/jbox-web/redmine_git_hosting.git
Install. It's necessary to run bundle again to install some new gems required by redmine_git_hosting plugin.
cd ~ bundle install RAILS_ENV=production rake redmine:plugins:migrate rake redmine_git_hosting:install_scripts RAILS_ENV=production WEB_USER=redmine
Apache mod_passenger configuration¶
Create a symbolic link.
su root cd /var/www ln -s /opt/redmine/public redmine
Configure the site.
vi /etc/apache2/sites-available/redmine
With following content:
RailsBaseURI /redmine PassengerUserSwitching on PassengerUser redmine PassengerGroup redmine
Enable the site and restart apache.
a2ensite redmine service apache2 restart
Hope this help =D.
Updated by André Domarques almost 11 years ago · 4 revisions