Ubuntu10.10 自宅サーバ構築手順:プロジェクト管理環境(Redmine)インストール

オープンソース(GPL)のプロジェクト管理ソフトウェアである『Redmine』、以前は個別に諸々インストールしなければならなくてちと面倒だったんですが、最近は便利な一括インストーラ等も出て来て非常に便利になっている模様。今回はそのインストーラを用いて導入記録をエントリしてみようかと思います。


  • 今回はWindows経由でダウンロードしたので、サーバにSSH等を経由させて上記入手ファイルをアップロード。
  • ポート番号が共有する可能性があるので、以下のサービスは事前に起動させておいて、かち合わない様に調整しておく。
    • Apache2(Port:80)
    • Tomcat(Port:8080)
  • 実行権限付与の後、実行。
$ chmod +x bitnami-redmine-1.0.4-0-linux-installer.bin
$ sudo ./bitnami-redmine-1.0.4-0-linux-installer.bin

  • インストールフォルダの指定。root権限実行だと上記設定パスになる模様。(※通常ユーザの場合、/home/ユーザ名 配下となる)デフォルト指定のまま今回は進める事にする。[進む]を押下。

  • ログインユーザ名及び関連情報を設定。設定後[進む]を押下。

  • ポート番号の指定。上記手順でApache2を起動していない場合は出ないはず。ここではかち合わない様に別途IPを『10080』と指定した。Redmineにはポート:10080でアクセスする事になる。設定後[進む]を押下。

  • MySQL環境がRedmineインストール前に導入済であれば、MySQLのポート設定ダイアログが表示される。ここではApache2の設定同様、かち合わないように『ポート:13306』とした。設定後[進む]を押下。

  • 言語及びメールサーバの指定。言語には[Japanese]を選択。メールサーバ(SMTP)に関しては、ここでは設定せず。[進む]を押下。

  • インストール準備完了。[進む]を押下。

  • インストール中…。

  • インストール完了。[Finish]を押下。

  • ブラウザからのアクセス確認。設定ポートが『10080』となるので、 http://localhost:10080/ でアクセス。

  • 上記画面の『Access BitNami Redmine Stack』へアクセス。Redmine関連ページが表示される事を確認。

  • 画面右上の[ログイン]リンクをクリックし、ログインを試みる。上記登録処理で設定したユーザ名・パスワードでログイン。

  • ログイン完了。

  • この時点ではメニューが英語表記のままなので、日本語表示となるように設定を行う。画面右上[My Account]をクリック、個人設定欄の[Language]で日本語を選択して保存。

  • メニュー諸々日本語表記となった。

  • ファイアウォール設定にて、上記処理過程で設定したポート(今回の場合はPORT:10080)を許可、外部からの接続を試みる。

  • 接続完了。


  • サーバの起動・停止・再起動については、インストールディレクトリ配下の『ctlscript.sh』を用いて行う。
    • 起動
absj31@absj31-VirtualBox:/opt/redmine-1.0.4-0$ sudo ./ctlscript.sh start
101212 12:04:38 mysqld_safe Logging to '/opt/redmine-1.0.4-0/mysql/data/mysqld.log'.
101212 12:04:38 mysqld_safe Starting mysqld.bin daemon with databases from /opt/redmine-1.0.4-0/mysql/data
/opt/redmine-1.0.4-0/mysql/scripts/ctl.sh : mysql  started at port 3306
starting port 3001
starting port 3002
Syntax OK
/opt/redmine-1.0.4-0/apache2/scripts/ctl.sh : httpd started at port 10080
/opt/redmine-1.0.4-0/subversion/scripts/ctl.sh : subversion started at port 3690
    • 停止
absj31@absj31-VirtualBox:/opt/redmine-1.0.4-0$ sudo ./ctlscript.sh stop
[sudo] password for absj31: 
/opt/redmine-1.0.4-0/subversion/scripts/ctl.sh : subversion stopped
Syntax OK
/opt/redmine-1.0.4-0/apache2/scripts/ctl.sh : httpd stopped
stopping port 3001
stopping port 3002
/opt/redmine-1.0.4-0/mysql/scripts/ctl.sh : mysql stopped
absj31@absj31-VirtualBox:/opt/redmine-1.0.4-0$ 
    • 再起動
absj31@absj31-VirtualBox:/opt/redmine-1.0.4-0$ sudo ./ctlscript.sh restart
/opt/redmine-1.0.4-0/subversion/scripts/ctl.sh : subversion stopped
Syntax OK
/opt/redmine-1.0.4-0/apache2/scripts/ctl.sh : httpd stopped
stopping port 3001
stopping port 3002
101212 12:05:31 mysqld_safe mysqld from pid file /opt/redmine-1.0.4-0/mysql/data/absj31-VirtualBox.pid ended
/opt/redmine-1.0.4-0/mysql/scripts/ctl.sh : mysql stopped
101212 12:05:36 mysqld_safe Logging to '/opt/redmine-1.0.4-0/mysql/data/mysqld.log'.
101212 12:05:40 mysqld_safe Starting mysqld.bin daemon with databases from /opt/redmine-1.0.4-0/mysql/data
/opt/redmine-1.0.4-0/mysql/scripts/ctl.sh : mysql  started at port 3306
starting port 3001
starting port 3002
Syntax OK
/opt/redmine-1.0.4-0/apache2/scripts/ctl.sh : httpd started at port 10080
/opt/redmine-1.0.4-0/subversion/scripts/ctl.sh : subversion started at port 3690
absj31@absj31-VirtualBox:/opt/redmine-1.0.4-0$ 
  • Redmine配下の環境諸々(MySQL,Subversion等)に付いては、インストールディレクトリ配下に作成されている『README.txt』に記載されている模様。より使いこなすにはこの辺を読み解かないと行けないようですねぇ。

README.txt 直

		    BitNami Redmine Stack 1.0.4-0
		  =============================

1. OVERVIEW

The BitNami Project was created to help spread the adoption of freely
available, high quality open source web applications. BitNami aims to make
it easier than ever to discover, download and install Open Source software 
such as document and content management systems, wikis and blogging 
software.

You can learn more about BitNami at http://bitnami.org

Redmine is a flexible project management web application. Written in Ruby on 
Rails freamework, it is a cross-platform and cross-database.

You can learn more about Redmine at http://redmine.org

The BitNami Redmine Stack is an installer that greatly simplifies the
installation of Redmine and runtime dependencies. It includes ready-to-run
versions of Apache, MySQL, Subversion and Ruby on Rails. Redmine Stack is 
distributed for free under the Apache 2.0 license. Please see the appendix 
for the specific licenses of all Open Source components included.

You can learn more about BitNami Stacks at http://bitnami.org/stacks/

2. FEATURES

- Easy to Install

BitNami Stacks are built with one goal in mind: to make it as easy as
possible to install open source software. Our installers completely automate
the process of installing and configuring all of the software included in
each Stack, so you can have everything up and running in just a few clicks.

- Independent

BitNami Stacks are completely self-contained, and therefore do not interfere
with any software already installed on your system. For example, you can
upgrade your system's MySQL or Apache without fear of 'breaking' your
BitNami Stack.

- Integrated

By the time you click the 'finish' button on the installer, the whole stack
will be integrated, configured and ready to go. 

- Relocatable

BitNami Stacks can be installed in any directory. This allows you to have
multiple instances of the same stack, without them interfering with each other. 

3. COMPONENTS

BitNami Redmine Stack ships with the following software versions:
 
  - Redmine 1.0.4
  - Apache 2.2.17
  - ImageMagick 6.5.8
  - MySQL 5.1.50
  - Subversion 1.6.12
  - Ruby 1.8.7-p249
  - Rails 2.3.9
  - RubyGems 1.3.7


4. REQUIREMENTS

To install BitNami Redmine Stack you will need:

    - Intel x86, PowerPC or compatible processor
    - Minimum of 512 MB RAM
    - Minimum of 400 MB hard drive space
    - TCP/IP protocol support
    - Compatible operating systems:
      - An x86 Linux operating system.
      - A 32-bit Windows operating system such as Windows 2000, XP, Vista
      or Windows Server 2003.
      - An OS X operating system (Power PC or x86).
      


5. INSTALLATION

The BitNami Redmine Stack is distributed as a binary executable installer.
It can be downloaded from:

http://www.bitnami.org/stacks/

The downloaded file will be named something similar to:

bitnami-redmine-1.0.4-0-linux-installer.bin on Linux or
bitnami-redmine-1.0.4-0-windows-installer.exe on Windows or
bitnami-redmine-1.0.4-0-osx-x86-installer.app.zip on OS X x86,
bitnami-redmine-1.0.4-0-osx-powerpc-installer.app.zip on OS X Power PC.

On Linux, you will need to give it executable permissions:

chmod 755 bitnami-redmine-1.0.4-0-linux-installer.bin

To begin the installation process, invoke from a shell or double-click on
the file you have downloaded, and you will be greeted by the 'Welcome'
screen. You will be asked to choose the installation folder. If the
destination directory does not exist, it will be created as part of the
installation.

The default listening port for Apache is 8080, for MySQL is 3006, for
Subversion is 3690 and for Mongrel cluster are 3001 and 3002. If those ports 
are already in use by other applications, you will be prompted for alternate 
ports to use.

The next screen will prompt you for data necessary to create the initial
admin user: 

Username and password: You will use this information to log-in into the
administrative interface. The password you provide here will also be used to
protect other parts of the installation. Please see the section named
"Usernames and Passwords" later in this document.

Real name: The name that will be displayed in the application.

Email address: Your email address.

You can select the language to load the default data into the next page.

The next screen will prompt you for data necessary to send emails:

SMTP Address: The address of SMTP server.

SMTP Hostname: The name of SMTP server.

SMTP Port: The port of SMTP server.

SMTP Username and Password: User and password to SMTP server.

Once the installation process has been completed, you will see the
'Installation Finished' page. You can choose to launch BitNami
Redmine Stack at this point. If you do so, your default web browser
will point you to the BitNami local site.

If you receive an error message during installation, please refer to
the Troubleshooting section.

The rest of this guide assumes that you installed BitNami Redmine
Stack in /home/user/redmine-1.0.4-0 on Linux or
/Application/redmine-1.0.4-0 on OS X or
C:\Program Files\BitNami Redmine Stack on Windows and use port 8080 for Apache
on Unix systems or 80 on Windows, 3306 for MySQL, 3690 for Subversion and 
3001 and 3002 for Mongrel cluster.

6. STARTING AND STOPPING BITNAMI REDMINE STACK

To enter to Redmine you can point your browser to
http://127.0.0.1:8080/ on Unix systems or http://127.0.0.1/ on Windows.

To start/stop/restart application on Linux you can use the included 
ctlscript.sh utility, as shown below:

       ./ctlscript.sh (start|stop|restart)
       ./ctlscript.sh (start|stop|restart) mysql
       ./ctlscript.sh (start|stop|restart) apache
       ./ctlscript.sh (start|stop|restart) redmine
       ./ctlscript.sh (start|stop|restart) subversion

  start      - start the service(s)
  stop       - stop  the service(s)
  restart    - restart or start the service(s)

You can start and stop BitNami Redmine Stack on Windows using the shortcuts created
in the Start Menu, under Programs -> BitNami -> BitNami Service 

That will start Apache, Subversion, Redmine and MySQL services. Once started, 
you can open your browser and access the following URL:

http://127.0.0.1:8080/ on Unix systems or

http://127.0.0.1/ on Windows.

If you selected an alternate port during installation, for example 18080, the
URL will look like:

http://127.0.0.1:18080/


7. DIRECTORY STRUCTURE

The installation process will create several subfolders under the main
installation directory:

	apache2/: Apache Web server.
	mysql/: MySQL Database.
	ruby/: Ruby files.
	subversion/: Subversion files.
	imagemagick/: ImageMagick image proccessor.
	common/: Common libraries.
	licenses/: Licenses files.
	scripts/: Script with enviromnent vars.
	redmine/: Redmine files.
	

8. DEFAULT USERNAMES AND PASSWORDS

The Redmine administrative user and password are the ones you set at
installation time. 

MySQL admin user is called 'root', and its password is also one
you set at installation time.

The default non-root account used to access the database is named
bitnami, and its password is also bitnami.

9. TROUBLESHOOTING

This version of the BitNami Redmine Stack is a preview version, and as
such, may contain a number of bugs and be a little bit rough around the
edges. We are working on the next release, which will contain several
improvements along with expanded documentation. In addition to the resources
provided below, we encourage you to post your questions and suggestions at:

http://bitnami.org/forums/

We also encourage you to sign up for our newsletter, which we'll use to
announce new releases and new stacks. To do so, just register at:
http://www.bitnami.org/catalog/newsletter.

9.1 Installer

# Installer Payload Error 

If you get the following error while trying to run the installer from the
command line:

"Installer payload initialization failed. This is likely due to an
incomplete or corrupt downloaded file" 

The installer binary is not complete, likely because the file was
not downloaded correctly. You will need to download the file and
repeat the installation process.

# Installer execution error on Linux

If you get the following error while trying to run the installer:

"Cannot open bitnami-redmine-1.0.4-0-linux.bin: No application suitable for 
automatic installation is available for handling this kind of file."

In some operatings systems you can change permissions with right click ->
properties -> permissions -> execution enable. 

Or from the command line:

$ chmod 755 bitnami-redmine-1.0.4-0-linux.bin 


9.2 Apache 

If you find any problem starting Apache, the first place you should check is
the Apache error log file:

/home/user/redmine-1.0.4-0/apache2/logs/error.log on Linux or
/Applications/redmine-1.0.4-0/apache2/error.log on OS X or
C:\Program Files\BitNami Redmine Stack\apache2\logs\error.log on Windows.

Most errors are related to not being able to listen to the default port.
Make sure there are no other server programs listening at the same port
before trying to start Apache. Some programs, such as Skype, may also use
port 80. For issues not covered in this Quick Start guide, please refer to
the Apache documentation, which is located at http://httpd.apache.org/docs/  

9.3 MySQL

If you encounter any problems starting MySQL, the first place to
look in is the "Problems and Common Errors" section of the MySQL
manual, which you will find at http://dev.mysql.com/doc/ The
following are some common problems: 

# Access denied when trying to connect to MySQL. 

If you get an Access Denied message while trying to connect to
MySQL, make sure you are using the correct username and password. 

# "Can't connect to server" message. 

Make sure that the MySQL daemon is up and running. Remember also that if
during installation you selected a different listening port for MySQL, you
may need to pass that as an extra command line option.


9.4 Subversion

This section describes how to start the svnserver and to create a simple repository
with Subversion. You can find th Subversion technical documentation at 
http://subversion.tigris.org/.

You can start stop Subversion server with ctlscript.sh or using the shortcuts on
Windows. You can create a repository with:

$ svnadmin create /path/to/repository  on Unix systems or
$ svnadmin.exe create c:\path\to\repostiroy on Windows.

Now, we can configure the repository. The repository's
svnserve.conf file is the central mechanism for
controlling authentication and authorization policies. You can
edit this file in /path/to/repository/conf/svnserce.conf.

The variables anon-access  and auth-access can be set to the values
none, read, or write. Setting the value to none prohibits both
reading and writing; read allows read-only access to the
repository, and write allows complete read/write access to the
repository. For example, you can uncomment these lines:</p>

[general]
anon-access = read
auth-access = write
password-db = passwd

You can edit passwd file at the same directory to manage
subversion users. For example, if you uncomment these lines you
create two subversion users; harry and sally.</p>

[users]
harry = harryssecret
sally = sallyssecret

It is necessary to restart svnserve to apply the changes.

Finally you can import a project directory to subversion.

$ svn import /path/to/project/ svn://localhost/path/to/repository/ -m "first import"


9.5 Redmine

For any problem related to Redmine, please visit
http://redmine.org

10. LICENSES

Redmine is open source and released under the terms of the GNU General 
Public License (GPL), wich is located at http://www.gnu.org/copyleft/gpl.html

Apache Web Server is distributed under the Apache License v2.0, which
is located at http://www.apache.org/licenses/LICENSE-2.0

MySQL is distributed under the GNU General Public License v2, which is
located at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

Ruby is released under the Ruby License and GPL, wich is located at
http://www.ruby-lang.org/en/LICENSE.txt

Rails is released under the MIT license, which is located 
http://www.opensource.org/licenses/mit-license.php

Subversion is released under Subversion License / released under the 
terms of the Apache License, which is located at
http://subversion.tigris.org/license-1.html

RubyGems is released under the Ruby License, which is located at
http://www.ruby-lang.org/en/LICENSE.txt

Rake is released under the Ruby License, which is located at
http://www.ruby-lang.org/en/LICENSE.txt

Mongrel Web Server (Mongrel) is released under the Ruby License, which 
is located at http://www.ruby-lang.org/en/LICENSE.txt

ImageMagick has its own license, which is located at
https://www.imagemagick.org/subversion/ImageMagick/trunk/LICENSE

Rmagick is released under the MIT license, which is located 
http://www.opensource.org/licenses/mit-license.php

Capistrano is released under the MIT/X Consortium License, whic is
located at http://dev.rubyonrails.org/browser/tools/capistrano/MIT-LICENSE?rev=5270

OpenSSL is released under the terms of the Apache License, which is
located at http://www.openssl.org/source/license.html

Ncurses is released under the MIT license, which is located at
http://www.opensource.org/licenses/mit-license.php

Readline is released under the GPL license, which is located at
http://www.gnu.org/copyleft/gpl.html

Zlib is released under the zlib License (a free software license/compatible 
with GPL), which is located at http://www.gzip.org/zlib/zlib_license.html

Libiconv is released under the LGPL license, which is located at
http://www.gnu.org/licenses/lgpl.html

Expat is released under the MIT license, which is located at
http://www.opensource.org/licenses/mit-license.php

Neon is released under the GNU General Public License, which is located at
http://www.gnu.org/copyleft/gpl.html

RedCloth is released under the BSD License, which is located at
http://www.opensource.org/licenses/bsd-license.php

ImageMagick has its own license, which is located at
https://www.imagemagick.org/subversion/ImageMagick/trunk/LICENSE

Rmagick is released under the MIT license, which is located 
http://www.opensource.org/licenses/mit-license.php

Redmineから一括で環境が作れるのはとても便利ですが、別途MySQLSubversionを導入して連携してみても良いんじゃないかとも思ったり。後日試して見よう。