apt-get install redmine redmine-mysql
add-apt-repository ppa:brightbox/passenger add-apt-repository ppa:ondrej/redmine apt-get update apt-get install redmine redmine-mysql sed -i s/AbstractAdapter/AbstractMysqlAdapter/ /usr/share/redmine/config/initializers/10-patches.rb apt-get -f install
apt-get install libapache2-mod-passenger apache2 ln -s /usr/share/redmine /var/www/redmine
Crear el archivo etc/apache2/sites-available/redmine
con el siguiente contenido:
<VirtualHost *:80> DocumentRoot /var/www/redmine PassengerDefaultUser www-data RailsEnv production RailsBaseURI / SetEnv X_DEBIAN_SITEID "default" <Directory /var/www/redmine> Order allow,deny Allow from all </Directory> </VirtualHost>
Y reiniciar apache:
service apache2 restart
sudo useradd gitolite --home-dir=/var/lib/gitolite/ --create-home --shell=/bin/ useradd git --home-dir=/srv/git/ --create-home --shell=/bin/ sudo apt-get install gitolite su - gitolite ssh-keygen gitolite setup -pk /var/lib/gitolite/.ssh/id_rsa.pub dpkg-reconfigure gitolite
En este punto, responder a las preguntas de dpkg:
gitolite
/var/lib/gitolite
/var/lib/gitolite/.ssh/id_rsa.pub
mkdir /usr/share/redmine/vendor/plugins cd /usr/share/redmine/vendor/plugins git clone https://github.com/ericpaulbishop/redmine_git_hosting cd redmine_git_hosting sed -i "s/'git'/'gitolite'/" init.rb
mkdir /usr/share/redmine/.ssh cp /var/lib/gitolite/.ssh/id_rsa.pub /usr/share/redmine/.ssh/gitolite_admin_id_rsa.pub cp /var/lib/gitolite/.ssh/id_rsa /usr/share/redmine/.ssh/gitolite_admin_id_rsa chown -R www-data:www-data /usr/share/redmine/.ssh chmod 0700 /usr/share/redmine/.ssh chmod 0600 /usr/share/redmine/.ssh/gitolite_admin_id_rsa
echo -e "www-data ALL=(gitolite) NOPASSWD:ALL\ngitolite ALL=(www-data) NOPASSWD:ALL" > /etc/sudoers.d/git chmod 0440 /etc/sudoers.d/git
cd /usr/share/redmine bundle install sudo -u www-data env RAILS_ENV=production rake db:migrate_plugins
/etc/redmine/default/configuration.yml
con la configuración del servidor de correo, por ejemplo:production: email_delivery: delivery_method: :smtp smtp_settings: address: smtp.usc.es port: 25 domain: usc.es authentication: :none
/usr/share/redmine/vendor/plugins/redmine_git_hosting/app/views/repositories/git_instructions.html.erb
para especificar la URL correcta al repositorio GIT:<% #git_ssh_url = Setting.plugin_redmine_git_hosting['gitUser'] + "@" + Setting.plugin_redmine_git_hosting['gitServer'] + ":" + GitHosting.repository_name(@project) + '.git' %> <% git_ssh_url = "ssh://" + Setting.plugin_redmine_git_hosting['gitUser'] + "@172.16.242.41:8022/" + GitHosting.repository_name(@project) + '.git' %>