Redmine bitnami 3 0 3 0 » Historie » Revision 5
« Zurück |
Revision 5/12
(Vergleich)
| Weiter »
Jeremias Keihsler, 08.02.2018 08:55
Bitnami 3.0.3-0¶
MySQL Redmine-Scripts¶
Create MySQL-Reader-User¶
mysql -u root -p
grant select on bitnami_redmine.* to 'redmine_reader'@'localhost';
setup receiving email¶
add following shell-script to /usr/local/bin/redmine_recv_mail.sh
#to make this work I also had to do following things:
#
# cd /opt/redmine-2.5.2-2
# ./use_redmine
# gem install rake -v 10.1.1
#
#add following file to
PATH="/opt/redmine-3.0.3-0/perl/bin:/opt/redmine-3.0.3-0/git/bin:/opt/redmine-3.0.3-0/sqlite/bin:/opt/redmine-3.0.3-0/ruby/bin:/opt/redmine-3.0.3-0/subversion/bin:/opt/redmine-3.0.3-0/postgresql/bin:/opt/redmine-3.0.3-0/php/bin:/opt/redmine-3.0.3-0/mysql/bin:/opt/redmine-3.0.3-0/apache2/bin:/opt/redmine-3.0.3-0/common/bin:$PATH"
BITNAMI_ROOT="/opt/redmine-3.0.3-0"
export BITNAMI_ROOT
cd /opt/redmine-3.0.3-0/apps/redmine/htdocs
bundle exec rake redmine:email:receive_imap RAILS_ENV="production" ssl=true host=mail.example.com port=993 username=redmine@example.com password=mySecret4711 unknown_user=create no_permission_check=1
this setup will accept mails from everyone and automagically register unknown users.
add following cron-file /etc/cron.d/redmine_mail_recv
*/15 * * * * root /usr/local/bin/redmine_recv_mail.sh
if you get an error about bundle you may want to try
if you get an error about SSL-certificate (self signed) you may bypass SSL-verify by adding this file to /opt/redmine-2.5.2-2/apps/redmine/htdocs/config/initializers/avoid_ssl_verification.rb
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
Troubleshoot imap¶
change /opt/redmine-3.0.3-0/ruby/lib/ruby/2.0.0/net/imap.rb
line ~1429
def create_ssl_params(certs = nil, verify = true)
params = {}
if certs
if File.file?(certs)
params[:ca_file] = certs
elsif File.directory?(certs)
params[:ca_path] = certs
end
end
if verify
# params[:verify_mode] = VERIFY_PEER
# taken out by JKE 2015-07-06
params[:verify_mode] = VERIFY_NONE
else
params[:verify_mode] = VERIFY_NONE
end
return params
end
setup log-rotating¶
Redmine¶
The Bitnami-Stack does not preconfigure log-rotating for the production.log
located in /opt/redmine-3.0.3-0/apps/redmine/htdocs/log
. Although you could use the standard Logrotate it's recommended (http://www.redmine.org/boards/2/topics/11836) to use the Ruby-functionality. Add following parameter to /opt/redmine-3.0.3-0/apps/redmine/htdocs/config/environments/production.rb
and restart the Bitnami-Stack.
According to http://www.redmine.org/issues/11603 you have to provide a file directly to Logger.new
instead of the sample in the production.rb
.
# 7 log-files, 20MB each
config.logger = Logger.new('/opt/redmine-3.0.3-0/apps/redmine/htdocs/log/production.log', 7, 20971520)
config.logger.level = Logger::INFO
[root@redmine ~]# cd /opt/redmine-3.0.3-0/apps/redmine/htdocs/log/ [root@redmine log]# ll total 1120 -rwxrwxr-x. 1 root daemon 36 Jun 18 2012 delete.me -rw-r--r--. 1 daemon daemon 12158 Jul 9 09:36 production.log -rw-rw-r--. 1 root daemon 30053 Jul 9 09:28 production.log.0 -rwxrwxr-x. 1 root daemon 1093571 Jul 9 08:59 production.log.1
apache / mysql¶
let's use logrotate
for this task. There is .conf
-files already shipped with the bitnami-stack.
https://docs.bitnami.com/installer/components/logrotate/
ln -s /opt/redmine-3.0.3-0/config/logrotate/logrotate.d/apache.conf /etc/logrotate.d/bitnami_3.0.3-0_apache.conf
ln -s /opt/redmine-3.0.3-0/config/logrotate/logrotate.d/mysql.conf /etc/logrotate.d/bitnami_3.0.3-0_mysql.conf
Von Jeremias Keihsler vor fast 7 Jahren aktualisiert · 5 Revisionen