Install redmine
Ohhh, instead of manually installing, actually you could find a third-party full installer at bitnami website.
# You need to install devel version in order to build for ImageMagick.
yum install -y ImageMagick-devel
LDAP
Ref. Login attributes I would like to use "cn" instead of "dn".
And see this Ref:
On the fly user creation is a must. Without it you need users in Redmine magically that match the LDAP server - No way!
Name: an arbitrary name for the directory Host: the LDAP host name Port: the LDAP port (default is 389) LDAPS: check this if you want or need to use LDAPS to access the directory Account: enter a username that has read access to the LDAP , otherwise leave this field empty if your LDAP can be read anonymously (Active Directory servers generally do not allow anonymous access) Password: password for the account Base DN: the top level DN of your LDAP directory tree Login attribute: enter the name of the LDAP attribute that will be used as the Redmine username.
Storage
Attachment storage settings. You can set a path where Redmine attachments will be stored which is different from the default 'files' directory of your Redmine instance using the attachments_storage_path setting. Default "attachments_storage_path: pathto/redmine/files"
Log
Redmine defaults to a log level of :info, writing to the log subdirectory "pathto/redmine/log". Depending on site usage, this can be a lot of data so to avoid the contents of the logfile growing without bound, consider rotating them, either through a system utility like logrotate or via the config/additional_environment.rb file.
To use the latter, copy config/additional_environment.rb.example to config/additional_environment.rb and add the following lines. Note that the new logger defaults to a high log level and hence has to be explicitly set to info.
#Logger.new(PATH,NUM_FILES_TO_ROTATE,FILE_SIZE) config.logger = Logger.new('/path/to/logfile.log', 2, 1000000) config.logger.level = Logger::INFO
Backup
# Database
/usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz
# Attachments
rsync -a /path/to/redmine/files /path/to/backup/files
Autostart redmine on CentOS
Ref. You shouldn't use webrick in production, have a look at passenger if you also use apache on that server, mongrel is also an alternative that doesn't require apache.
Enable email
Ref.
config.action_mailer.delivery_method = :sendmail # Defaults to: # config.action_mailer.sendmail_settings = { # location: '/usr/sbin/sendmail', # arguments: '-i -t' # }
Install redmine to apache
Wcf Warning: this may run slowly. Consider to use fastcgi. Ref. Ref2.
- gem install passenger. passenger-install-apache2-module. Restart apache.
- Install redmine and make sure the webrick server is running successfully.
- cp public/dispatch.cgi.example to public/dispatch.cgi.
- Add in dispatch.cgi the line: #!/usr/bin/ruby.
- Change the require line to an absolute path:
- Make sure the file has permision: 755.
- Update the config/environment.rb file to force the rails environment to production. Simply uncomment this line at the start of the file:
ENV['RAILS_ENV'] ||= 'production'
- Add to apache conf file. See below.
- Don't forget to bind to the port:
Listen *:3000
chown -R apache:apache files log tmp vendor
.cp dispatch.cgi.example dispatch.cgi cp dispatch.fcgi.example dispatch.fcgi cp dispatch.rb.example dispatch.rb
- Edit .htaccess file for CGI dispatch configuration:
cd pathTo/redmine/public && cp htaccess.fcgi.example .htaccess
wcf note: since our doc server has nginx in place of apache, so the following setting is not fully tested!
<VirtualHost *:80>
ServerName redmine.yourCorp.com
ServerAdmin [email protected]
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot pathTo/redmine/public/
ErrorLog logs/redmine_error_log
#If you are using mod_fcgid and are going to upload files larger than
#131072 bytes you should consider adding the following line
#that allows to upload files up to 20 mb
MaxRequestLen 20971520
<Directory "pathTo/redmine/public/">
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
</VirtualHost>