Hello! Thank you very much for those who helped, I have now succesfully installed redmine on Zentyal. This is how to:
1. Enable webserver
Enable Zentyal web server. Open Firewall for http access. Forward 80 port from router to zentyal.
2. Install redmine
* for detailed instructions see the links on the posts above (thank you for that)
- backup, just in case:
/usr/share/ebox-ebackup ./ebox-remote-ebackup --incremental- install mysql-server and redmine packages
sudo apt-get install mysql-server redmine redmine-mysql subversion -- you'll be asked for root password for mysql
-- you'll be asked to config redmine access to mysql
yes para dbconfig-common
db: mysql
root pass: somepassword
redmine db pass: otherpassword
3. upgrade redmine
* The method above unfortanatelly will install an old version of redmine (0.9) so we must upgrade it. I've done this on a trial and error basis, reading a lot of stuff on the web. Here are the steps I've done, but may not all be necessary for you.
- download it
cd /usr/share
sudo wget http://path.to/redmine-1.1.0.tar.gz
tar -xvf redmine-1.1.0.tar.gz
rm redmine-1.1.0.tar.gz - install some necessary stuff
* If you're installing the same version as I (1.1.0) you're safe with the versions of the softwares below. If not, checkout redmine webpage for compatibilies.
sudo apt-get install rails -v=2.3.5
sudo gem install rack -v=1.0.1
sudo gem install -v=0.4.2 i18n
- generate some crazy session secret
udo rake generate_session_secret
- migrate DB (from the old to the new one)
sudo rake db:migrate RAILS_ENV=production
- copy the files from old (0.9) to new installation (1.1.0) This is only necessary if you were running redmine before upgrade.
sudo cp /var/lib/redmine/default/files/* /usr/share/redmine-1.1.0/files
- clean up things
sudo rake tmp:cache:clear
sudo rake tmp:sessions:clear- remove (or rename) .htaccess file
* I've failed to get redmine running while this file was there. Very important step!
d /usr/share/redmine-1.1.0/public/.htaccess
mv .htaccess htcrazy
* Now there are 2 steps that I've done in my trial and error efforts that I don't know if they are really necessary. If you do, please tell me!
- Change some permissions
sudo chmod 644 /usr/share/redmine-1.1.0/config/settings.yml
sudo chmod 644 /usr/share/redmine-1.1.0/config/database.yml
sudo chmod 644 /usr/share/redmine-1.1.0/config/email.yml
- change some owners
mkdir tmp public/plugin_assets
sudo chown -R www-data:www-data files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
4. Config webserver for running redmine
* This is an example if you want to have redmine running on a subdomain like:
http://redmine.mydomain.com- Access zentyal web page and do the following:
- infra > web server > add virtual host:
mydomain.com- infra > web server > add virtual host:
redmine.mydomain.com- infra > DNS > add domain:
mydomain.com- add hostname:
redmine ip:
10.0.1.1- add nameserver:
redmine The files for the recently created virtual host will be at:
/srv/www/redmine.mydomai.com
- Create symlink
cd /srv/www/redmine.mydomain.com
sudo ln -s /usr/share/redmine-1.1.0/public redmine
- Config apache. Create config file for redmine
cd /etc/apache2/sites-available/user-ebox-redmine.mydomain.com
sudo vi redmine.confEdit with the following:
DocumentRoot /srv/www/redmine.mydomain.com/redmine
<Directory /srv/www/redmine.mydomain.com>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# RailsEnv production
PassengerAppRoot /usr/share/redmine-1.1.0/
RailsBaseURI /redmine
- Edit passagenr.conf
sudo vi /etc/apache2/mods-available/passanger.conf
Include the following line:
PassengerDefaultUser www-data
- restart apache
sudo apache2ctl restart
5. Config DNS server
Config your DNS server (not zentyal, but your provider - mine is Joker.com) so that redmine.mydomain.com points to mydomain.com
The way I did was creating a CNAME record for that (it's working for now)
6. Config redmine
- Access it via
http://redmine.mydomain.comuser: admin
password: admin
- change you password
- Config to access your zentyal LDAP server (settings > authentication > LDAP settings):
- nome: ldap
- servidor: localhost
- porta: 389
- conta: (blank)
- senha: (blank)
- DN base: dc=yourzentyalhostname
- criar usuario on-the-fly: yes! (check it)
- usuario: uid
- nome: givenName
- sobrenome: sn
- email: mail
- Config redmine to send emails. Go back to shell
sudo vi /usr/share/redmine-1.1.0/config/email.yml
Edit to best fit your email configuration. I don't use zentyal as mail server so my config is something like this:
production:
smtp_settings:
address: "smtp.myotherdomain.com"
port: 25
authentication: :login
domain: 'myotherdomain.com'
user_name: 'redmine@myotherdomain.com'
password: '123456'
- restart redmine
* Every how-to of redmine tells you you must restart redmine, but don't tell you how to do it! This is how I think it's done:
sudo touch /usr/share/redmine-1.1.0/tmp/restart.txt
I'm not sure if this really restarts redmine, but I know that my redmine is sending emails just fine
7. Config redmine backup
I'm inspired by this:
http://forum.zentyal.org/index.php?topic=5854.07.1 database
- create a script to run the backup
sudo vi scripts/backupredmine
Should look like this:
#!/bin/bash
BDIR=/backup
BFILE=redmine.dump.gz
OFILE=$BDIR/$BFILE
if [ ! -d $BDIR ]; then
mkdir $BDIR
fi
if [ -f $OFILE ]; then
rm $OFILE
fi
echo Backup database
DATABASE=`grep "database:" /usr/share/redmine-1.1.0/config/database.yml | awk '{print $2}'`
USERNAME=`grep "username:" /usr/share/redmine-1.1.0/config/database.yml | awk '{print $2}'`
PASSWORD=`grep "password:" /usr/share/redmine-1.1.0/config/database.yml | awk '{print $2}'`
/usr/bin/mysqldump --single-transaction -u$USERNAME -p$PASSWORD $DATABASE | gzip --best >$OFILE
This script will read your database configuration to check username and password and backup it up on gz file at dir /backup.
- make it runnable
sudo chmod +x backupredmine- Now we want to run this script every time zentyal does the automatic backup.
cd /etc/ebox/hooks
cp template.postservice ebackup.postservice
vi ebackup.postservice
Edit it to:
if [ $1 = "1" ]; then
if [ -f /scripts/backupredmine ]; then
sed 's_/usr/share/ebox-ebackup/ebox-remote-ebackup_/scripts/backupredmine \&\& /usr/share/ebox-ebackup/ebox-remote-ebackup_' </etc/cron.d/ebox-ebackup >/tmp/ebox.backup.mod
cp /tmp/ebox.backup.mod /etc/cron.d/ebox-ebackup
rm /tmp/ebox.backup.mod
fi
fi
- Now include this two folder on your zentyal backup:
/backup
/scripts
7.2 files
Just include this folder on your zentyal backup:
/usr/share/redmine-1.1.0/files
8. Installing plugins
If you want to install plugins you would probably need git
sudo apt-get install git-coreSo now you can do on redmine home path:
script/plugin install git://path.to/somecoolplugin.git* Some plugins will require you to migrate db and other stuff, just read their how-to. I've just liked to point out the install git-core step because I didn't see it on any how-to but I found it necessary.
Welll that's it, I guess. Sorry for typos and errors. If you see some error, please do comment!