RedmineInstall - glad2121/bitnami-redmine-ext GitHub Wiki

BitNami Redmine Stack のインストール

BitNami Redmine Stack のダウンロード

次のページから、インストーラをダウンロードします。
https://bitnami.com/stack/redmine/installer

BitNami Redmine Stack のインストール

スーパーユーザーに切り替えます。

[bitnami@bitnami tmp]$ su
Password: 

BitNami Redmine Stack のインストーラを実行します。
インストール時の言語は英語を選択するのが無難、データは日本語を指定します。

[root@bitnami tmp]# chmod +x bitnami-redmine-2.5.1-1-linux-x64-installer.run 
[root@bitnami tmp]# ./bitnami-redmine-2.5.1-1-linux-x64-installer.run --mode text
Language Selection

Please select the installation language
[1] English - English
[2] Spanish - Español
[3] Japanese - 日本語
[4] Korean - 한국어
[5] Simplified Chinese - 简体中文
[6] Hebrew - עברית
[7] German - Deutsch
[8] Romanian - Română
[9] Russian - Русский
Please choose an option [1] :   <- 英語を選択
Bitnami Redmine Stack requires at least 2000MB of memory and the installer has 
detected 1811MB of memory. This may prevent the application from installing, 
working properly or cause it to stop functioning due to lack of memory. Visit 
the following link to learn how to increase the swap space.

http://bitnami.com/lowmemory

Continue with installation? [Y/n]: 

----------------------------------------------------------------------------
Welcome to the Bitnami Redmine Stack Setup Wizard.

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.

PhpMyAdmin [Y/n] :

Redmine : Y (Cannot be edited)

Is the selection above correct? [Y/n]: 

----------------------------------------------------------------------------
Installation folder

Please, choose a folder to install Bitnami Redmine Stack

Select a folder [/opt/redmine-2.5.1-1]: /opt/bitnami  <- 必要に応じて変更

----------------------------------------------------------------------------
Create Admin account

Bitnami Redmine Stack admin user creation

Your real name [User Name]: Admin Redmine

Email Address [[email protected]]: [email protected]

Login [user]: admin

Password :
Please confirm your password :
----------------------------------------------------------------------------
Language for default data configuration

Select your language for default data configuration:

[1] Bulgarian
[2] Czech
[3] German
[4] English
[5] Spanish
[6] French
[7] Hebrew
[8] Italian
[9] Japanese
[10] Korean
[11] Dutch
[12] Polish
[13] Portuguese
[14] Portuguese/Brazilian
[15] Romanian
[16] Russian
[17] Serbian
[18] Swedish
[19] Chinese
[20] Chinese/Taiwan
Please choose an option [4] : 9  <- 日本語を選択

Do you want to configure mail support? [y/N]: 

----------------------------------------------------------------------------
Setup is now ready to begin installing Bitnami Redmine Stack on your computer.

Do you want to continue? [Y/n]: 

----------------------------------------------------------------------------
Please wait while Setup installs Bitnami Redmine Stack on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################

----------------------------------------------------------------------------
Setup has finished installing Bitnami Redmine Stack on your computer.

Launch Redmine application. [Y/n]: 

Info: To access the Bitnami Redmine Stack, go to
http://localhost:80 from your browser.
Press [Enter] to continue :

CentOS の設定

http://blog.redmine.jp/articles/2_5/installation_centos/
の記述を参考に、外部からの HTTP による接続を許可します。

/etc/sysconfig/iptables を修正します。

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT  <- 追加

iptables を再起動します。

[root@bitnami tmp]# service iptables restart
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]

ブラウザで http://{hostname}/redmine にアクセスし、Redmine の稼働を確認します。

Redmine のサービス登録

http://ossfan.net/setup/redmine-02.html
の記述を参考に、サービスを登録し、自動起動を設定します。

Redmine を停止します。

[root@bitnami tmp]# /opt/bitnami/ctlscript.sh stop
/opt/bitnami/subversion/scripts/ctl.sh : subversion not running
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : apache not running
/opt/bitnami/mysql/scripts/ctl.sh : mysql not running

起動・停止スクリプトを /etc/init.d にコピーします。

[root@bitnami tmp]# cp -piv /opt/bitnami/ctlscript.sh /etc/init.d/bitnami-redmine
`/opt/bitnami/ctlscript.sh' -> `/etc/init.d/bitnami-redmine'

/etc/init.d/bitnami-redmine を修正します。
2345 が on にするランレベル、80 が起動順、20 が停止順、足して 100 にするのが普通?

#!/bin/sh

# chkconfig: 2345 80 20         <- 追加
# description: BitNami Redmine  <- 追加

# Allow only root execution
if [ `id|sed -e s/uid=//g -e s/\(.*//g` -ne 0 ]; then
    echo "This script requires root privileges"
    exit 1
fi
(以下略)

設定を登録します。

[root@bitnami tmp]# chkconfig --add bitnami-redmine
[root@bitnami tmp]# chkconfig --list bitnami-redmine
bitnami-redmine	0:off	1:off	2:on	3:on	4:on	5:on	6:off

サービスを起動します。

[root@bitnami tmp]# service bitnami-redmine start
140518 01:05:20 mysqld_safe Logging to '/opt/bitnami/mysql/data/mysqld.log'.
140518 01:05:20 mysqld_safe Starting mysqld.bin daemon with databases from /opt/bitnami/mysql/data
/opt/bitnami/mysql/scripts/ctl.sh : mysql  started at port 3306
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
/opt/bitnami/subversion/scripts/ctl.sh : subversion started at port 3690

ブラウザで http://{hostname}/redmine にアクセスし、Redmine の稼働を確認します。

アクセス URL の変更(任意)

http://wiki.bitnami.com/Applications/BitNami_Redmine
http://ossfan.net/setup/redmine-02.html
の記述を参考に、アクセス URL を変更します。

/opt/bitnami/apps/redmine/conf/httpd-prefix.conf を修正します。

#Alias /redmine/ "/opt/bitnami/apps/redmine/htdocs/public/"  <- コメントアウト
#Alias /redmine "/opt/bitnami/apps/redmine/htdocs/public"    <- コメントアウト

DocumentRoot "/opt/bitnami/apps/redmine/htdocs/public/"  <- 追加
Include "/opt/bitnami/apps/redmine/conf/httpd-app.conf"

/opt/bitnami/apps/redmine/conf/httpd-app.conf を修正します。

<Directory "/opt/bitnami/apps/redmine/htdocs/public">
    PassengerEnabled on
    Options -MultiViews
    AllowOverride All
    <IfVersion < 2.3 >
    Order allow,deny
    Allow from all
    </IfVersion>
    <IfVersion >= 2.3>
    Require all granted
    </IfVersion>

#    SetEnv RAILS_RELATIVE_URL_ROOT "/redmine"  <- コメントアウト
    PassengerAppRoot "/opt/bitnami/apps/redmine/htdocs"
    <IfModule pagespeed_module>
        ModPagespeedDisallow "*"
    </IfModule>
</Directory>

#PassengerPreStart http://127.0.0.1:80/redmine  <- 修正
PassengerPreStart http://127.0.0.1:80/

Apache(Redmine)を再起動します。

[root@bitnami tmp]# service bitnami-redmine restart apache
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80

ブラウザで http://{hostname} にアクセスし、Redmine の稼働を確認します。

参考 URL

⚠️ **GitHub.com Fallback** ⚠️