Redmine : インストール2026/01/09 |
|
プロジェクト管理ツール Redmine をインストールします。 当例では SELinux は Permissive または Disabled で進めます。 |
|
| [1] | |
| [2] | |
| [3] | |
| [4] | |
| [5] | その他必要なパッケージをインストールしておきます。 |
|
dlp:~ # zypper -n install ruby-devel postgresql-server-devel libyaml-devel openssl-devel libxslt-devel libxml2-devel libcurl-devel zlib-devel httpd-devel gcc gcc-c++ make patch rpm-build ImageMagick ImageMagick-devel google-droid-fonts |
| [6] | Redmine 用のユーザーとデータベースを作成しておきます。 |
|
dlp:~ #
vi /var/lib/pgsql/data/pg_hba.conf # 115行目 : 以下のように変更 #host all all 127.0.0.1/32 ident #host all all ::1/128 ident host all all 127.0.0.1/32 scram-sha-256 host all all ::1/128 scram-sha-256
dlp:~ #
systemctl restart postgresql # [password] は任意のパスワードを設定 dlp:~ # su - postgres postgres@dlp:~> createuser redmine postgres@dlp:~> createdb redmine -O redmine postgres@dlp:~> psql -c "alter user redmine with password 'password'" ALTER ROLE |
| [7] | Redmine をダウンロードしてインストールします。最新版を確認してダウンロードしてください。 ⇒ http://www.redmine.org/projects/redmine/wiki/Download |
|
dlp:~ # wget https://www.redmine.org/releases/redmine-6.1.0.tar.gz dlp:~ # tar zxvf redmine-6.1.0.tar.gz dlp:~ # mv redmine-6.1.0 /srv/www/redmine dlp:~ # cd /srv/www/redmine
dlp:/srv/www/redmine #
vi config/database.yml # 以下の内容で新規作成 production: adapter: postgresql # データベース名 database: redmine host: localhost # データベースユーザー username: redmine # データベースユーザーのパスワード password: password encoding: utf8
dlp:/srv/www/redmine #
vi config/configuration.yml # 以下の内容で新規作成 (SMTP の設定)
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "localhost"
port: 25
domain: 'dlp.srv.world'
rmagick_font_path: /usr/share/fonts/truetype/DroidSansJapanese.ttf
# bundler インストール dlp:/srv/www/redmine # gem install bundler # Redmine で使用する Gem をインストール dlp:/srv/www/redmine # bundle config set --local without 'development test mysql sqlite' dlp:/srv/www/redmine # bundle install # 秘密鍵の生成 dlp:/srv/www/redmine # bundle exec rake generate_secret_token # テーブル生成 dlp:/srv/www/redmine # bundle exec rake db:migrate RAILS_ENV=production # Passenger インストール dlp:/srv/www/redmine # gem install passenger # Apache httpd 用モジュールインストール dlp:/srv/www/redmine # /usr/lib64/ruby/gems/3.4.0/gems/passenger-6.1.1/bin/passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v6.0.19.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:
1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.
Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.
Press Enter to continue, or Ctrl-C to abort.
.....
.....
Almost there!
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /usr/lib64/ruby/gems/3.4.0/gems/passenger-6.1.1/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/lib64/ruby/gems/3.4.0/gems/passenger-6.1.1
PassengerDefaultRuby /usr/bin/ruby.ruby3.4
</IfModule>
After you restart Apache, you are ready to deploy any number of web
applications on Apache, with a minimum amount of configuration!
Press ENTER when you are done editing.
|
| [8] | Passenger を実行するための httpd の設定です。当例ではバーチャルホスト環境で設定します。 |
|
dlp:/srv/www/redmine #
vi /etc/apache2/conf.d/passenger.conf # 以下の内容で新規作成
LoadModule passenger_module /usr/lib64/ruby/gems/3.4.0/gems/passenger-6.1.1/buildout/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/3.4.0/gems/passenger-6.1.1
PassengerDefaultRuby /usr/bin/ruby.ruby3.4
SetEnv LD_LIBRARY_PATH /usr/lib64
NameVirtualHost *:80
<VirtualHost *:80>
ServerName redmine.srv.world
DocumentRoot /srv/www/redmine/public
</VirtualHost>
<Directory "/srv/www/redmine/public">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
chown -R wwwrun:wwwrun /srv/www/redmine dlp:/srv/www/redmine # systemctl reload apache2 |
| [9] | バーチャルホストで設定した URL にアクセスすると Redmine のサイトが表示されます。[Sign in] をクリックしてログインページへ移動します。 |
|
| [10] | ユーザー名/初期パスワード : [admin/admin] で管理者ログインできます。 |
|
| [11] | 初回ログイン後はパスワードの再設定を求められます。 |
|
| [12] | パスワードの再設定後は、アカウント情報の設定画面になります。必要な情報を入力して設定します。 |
|
| [13] | 以上で完了です。プロジェクトを作成して Redmine を活用ください。 |
|
|
|