Redmine ist wohl eines der komfortabelsten und mächtigsten Issue-Tracking-Systeme im Open-Source-Bereich.
Hier möchte ich zeigen, wie man es auf einem Debian-Server mit nginx als Webserver installiert und einrichtet:
Mit Redmine 3.0.0 muss das "Redmine Bootstrap Kit plugin" v0.2.0 und das "Redmine Git Hosting Plugin" v1.0.1 oder höher verwendet werden.
Hierzu sind gegebenenfalls Anpassungen an den Dependencies der Gemfiles nötig, welche sich aus den Hinweisen der Bundler-Installationsprozeduren ergeben.
Tipp: https://github.com/jbox-web/grack.git klonen und in plugins/redmine_git_hosting/Gemfile ändern: "gem 'gitlab-grack', path: '/opt/redmine/plugins/redmine_git_hosting/grack', require: 'grack'" In plugins/redmine_git_hosting/grack/grack.gemspec "gem.add_dependency("rack", "~> 1.4.1")" auskommentieren. In plugins/redmine_git_hosting/Gemfile "gem 'redcarpet', '~> 2.3.0'" auskommentieren.
apt-get install apt-transport-https ca-certificates echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main" > /etc/apt/sources.list.d/passenger.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 apt-get update apt-get remove nginx nginx-full nginx-light nginx-naxsi nginx-common apt-get install sudo ssh make g++ bzip2 zip unzip libssl-dev nginx-extras passenger mysql-server libmysqlclient-dev ruby ruby-dev git git-core gitolite imagemagick libmagickcore-dev libmagickwand-dev libicu-dev nano /etc/nginx/nginx.conf -------------------- (Prozessanzahl limitieren: ) (worker_processes 1; ) (worker_connections 1024; ) (passenger_max_instances_per_app 2;) Auskommentieren: passenger_root ...; passenger_ruby ...; ----------------------------- service nginx restart 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 su redmine ssh-keygen -t rsa -N '' -f ~/.ssh/redmine_gitolite_admin_id_rsa exit dpkg-reconfigure gitolite ------------------------------------------------------------------ user: git repos path: /opt/gitolite admin ssh-key: /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa.pub ------------------------------------------------------------------ su redmine ln -s /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa /opt/redmine/.ssh/id_rsa ln -s /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa.pub /opt/redmine/.ssh/id_rsa.pub exit visudo -------------------------------------- # temp - *REMOVE* after installation redmine ALL=(ALL) NOPASSWD:ALL # redmine gitolite integration redmine ALL=(git) NOPASSWD:ALL git ALL=(redmine) NOPASSWD:ALL -------------------------------------- sudo su - redmine cd ~ wget http://www.redmine.org/releases/redmine-x.x.x.tar.gz tar zxf redmine-x.x.x.tar.gz mv redmine-x.x.x/* . rm -Rf redmine-x.x.x rm redmine-x.x.x.tar.gz mysql -u root -p -v -e "CREATE DATABASE redmine CHARACTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'redmine'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';" cd /opt/redmine/config cp database.yml.example database.yml cp configuration.yml.example configuration.yml nano database.yml nano configuration.yml cd ~ mkdir public/plugin_assets 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 cd ~/plugins git clone https://github.com/jbox-web/redmine_bootstrap_kit.git cd ~/plugins/redmine_bootstrap_kit git checkout x.x.x git clone https://github.com/jbox-web/redmine_git_hosting.git cd ~/plugins/redmine_git_hosting git checkout x.x.x ln -s /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa /opt/redmine/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa ln -s /opt/redmine/.ssh/redmine_gitolite_admin_id_rsa.pub /opt/redmine/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa.pub sudo su - git sed -i 's/$GL_GITCONFIG_KEYS = ""/$GL_GITCONFIG_KEYS = ".*"/g' /opt/gitolite/.gitolite.rc exit cd ~ git clone git@localhost:gitolite-admin.git cd gitolite-admin/ echo " repo @all RW+ = admin" >> conf/gitolite.conf git commit -m 'Automatic Repository Initialization' conf/gitolite.conf git push cd ~ rm -rf gitolite-admin cd ~ bundle install --without development RAILS_ENV=production rake redmine:plugins:migrate exit su root nano /etc/nginx/sites-available/default --------------------------------------- Hinzufügen: location ~ ^/redmine(/.*|$) { alias /opt/redmine/public$1; passenger_base_uri /redmine; passenger_app_root /opt/redmine; passenger_document_root /opt/redmine/public; passenger_enabled on; } --------------------------------------- nginx -s reload visudo ------------------------------------------------- Temp-Eintrag entfernen: "redmine ALL=(ALL)..." -------------------------------------------------