3 # vim:set ts=2 sw=2 et:
5 # arg 1: the new package version
10 # arg 1: the new package version
12 # link to the system rails installation
13 ln -s /usr
/share
/rails
/opt
/redmine
/vendor
/
15 echo ">>> Creating redmine user and group and setting permissions..."
16 getent group redmine
>/dev
/null || usr
/sbin
/groupadd redmine
17 getent passwd redmine
>/dev
/null || usr
/sbin
/useradd
-c 'Redmine PMS'\
18 -g redmine
-d '/opt/redmine' --system -s /bin
/bash redmine
23 mkdir public
/plugin_assets
24 echo ">> Change Ownership for corresponding directories"
25 chown
-R redmine
:redmine config files log tmp public
/plugin_assets
26 chmod -R 755 config files log tmp public
/plugin_assets
28 echo ">>> Creating log-storage"
29 mkdir
/var
/log
/redmine
30 chown
-R redmine
:root
/var
/log
/redmine
31 chmod -R 775 /var
/log
/redmine
33 echo ">>> Generating session store secret..."
34 rake config
/initializers
/session_store.rb
38 >>> You can run Redmine in a couple of different ways:
39 >>> * Apache (via passenger)
40 >>> * WEBrick (standalone included webserver) - script/ruby -e production
42 >>> When running via WEBrick, you can start the daemon via:
43 >>> /etc/rc.d/redmine start
44 >>> Alternatively add "redmine" to the DAEMONS array in /etc/rc.conf.
46 >>> To run it i Apache, add the following into the section
47 >>> "Supplemental configuration" of /etc/httpd/conf/httpd.conf.
49 Include conf/extra/httpd-redmine.conf
51 >>> After the installation you should create the database (in MySQL)
52 >>> with the following commands:
54 >>> mysql> create database redmine character set utf8;
55 >>> mysql> create user 'redmine'@'localhost' identified by 'redmine'
56 >>> mysql> grant all privileges on redmine.* to 'redmine'@'localhost'
57 >>> rake db:migrate RAILS_ENV="production"
59 >>> Furthermore you could add some default data with:
60 >>> rake redmine:load_default_data RAILS_ENV="production"
62 >>> Default login and password are admin/admin. Remember to change these.
64 >>> Further installation help can be found at:
65 >>> http://www.redmine.org/wiki/redmine/RedmineInstall
69 # arg 1: the new package version
70 # arg 2: the old package version
75 # arg 1: the new package version
76 # arg 2: the old package version
79 echo ">> Change Ownership for corresponding directories"
80 chmod -R 755 config files log tmp public
/plugin_assets
82 echo ">>> Clearing cache and existing sessions..."
84 rake tmp
:sessions
:clear
85 echo ">>> Remember to update you database with"
86 echo ">>> rake db:migrate RAILS_ENV=\"production\" >/dev/null"
89 # arg 1: the old package version
91 usr
/sbin
/userdel redmine
&>/dev
/null
92 usr
/sbin
/groupdel redmine
&>/dev
/null
95 # arg 1: the old package version