差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ruby:redmine:redmine_install [2022/07/24 16:25] – [Ruby のインストール] ともやん | ruby:redmine:redmine_install [2022/07/25 06:23] (現在) – [rbenv でインストールに失敗する] ともやん | ||
---|---|---|---|
行 2536: | 行 2536: | ||
===== Ruby のインストール ===== | ===== Ruby のインストール ===== | ||
- | anyenv をインストールして、Redmine の動作環境に合わせて ruby をインストールする\\ | + | anyenv をインストールして、Redmine の動作環境に合わせたバージョンの Ruby をインストールする😉\\ |
+ | ※これは Ruby バージョンを OS のパッケージバージョンに影響を受けないようにするのが目的である🤔\\ | ||
+ | Ruby バージョンを固定しておかないと、OS のパッケージ更新に影響を受けて <wrap em> | ||
[[linux: | [[linux: | ||
行 2551: | 行 2553: | ||
rbenv でインストール可能な ruby バージョンを調べる。\\ | rbenv でインストール可能な ruby バージョンを調べる。\\ | ||
+ | |||
+ | |||
+ | 参考: [[ruby: | ||
+ | |||
+ | ===== Web サーバーのインストール ===== | ||
+ | [[linux: | ||
+ | |||
+ | ===== データベース サーバーのインストール ===== | ||
+ | [[linux: | ||
+ | |||
+ | ===== 依存パッケージのインストール ===== | ||
+ | |||
+ | ==== 開発ツール(Cコンパイラ等)のインストール ==== | ||
+ | < | ||
+ | $ sudo dnf groupinstall " | ||
+ | $ sudo dnf install gcc-c++ | ||
+ | </ | ||
+ | |||
+ | ==== Passengerのビルドに必要なヘッダファイルなどのインストール ==== | ||
+ | < | ||
+ | $ sudo dnf install ruby-devel openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel | ||
+ | </ | ||
+ | |||
+ | ==== PostgreSQL とヘッダファイルのインストール ==== | ||
+ | < | ||
+ | $ sudo dnf install postgresql-server postgresql-devel | ||
+ | </ | ||
+ | |||
+ | ==== ImageMagickとヘッダファイル・日本語フォントのインストール ==== | ||
+ | < | ||
+ | $ sudo dnf install ImageMagick7 ImageMagick7-devel ipa-pgothic-fonts --enablerepo=remi | ||
+ | </ | ||
+ | or\\ | ||
+ | < | ||
+ | $ sudo dnf install ImageMagick ImageMagick-devel ipa-pgothic-fonts | ||
+ | </ | ||
+ | |||
+ | ===== 空のデータベースとユーザーの作成 ===== | ||
+ | |||
+ | ==== 空のデータベースの作成 ==== | ||
+ | データベース ユーザーを作成する。\\ | ||
+ | < | ||
+ | $ psql -U postgres | ||
+ | psql (10.6) | ||
+ | " | ||
+ | |||
+ | postgres=# CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD ' | ||
+ | CREATE ROLE | ||
+ | </ | ||
+ | データベースを作成する。\\ | ||
+ | < | ||
+ | postgres=# CREATE DATABASE redmine_db WITH ENCODING=' | ||
+ | CREATE DATABASE | ||
+ | </ | ||
+ | データベースの日付形式をISO(PostgreSQLのデフォルト)に設定する。\\ | ||
+ | < | ||
+ | postgres=# ALTER DATABASE " | ||
+ | ALTER DATABASE | ||
+ | postgres=# \q | ||
+ | </ | ||
+ | |||
+ | ===== データベース接続設定 ===== | ||
+ | < | ||
+ | $ cd redmine-4.2.1 | ||
+ | $ cp config/ | ||
+ | $ nano config/ | ||
+ | </ | ||
+ | |||
+ | **データベース接続設定の例(PostgreSQL)**\\ | ||
+ | <WRAP prewrap 100% mincode> | ||
+ | <code autoconf config/ | ||
+ | production: | ||
+ | adapter: postgresql | ||
+ | database: redmine_db | ||
+ | host: localhost | ||
+ | username: redmine | ||
+ | password: " | ||
+ | # Use " | ||
+ | encoding: utf8 | ||
+ | |||
+ | development: | ||
+ | # adapter: mysql2 | ||
+ | |||
+ | test: | ||
+ | # adapter: mysql2 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | **データベース接続設定全体**\\ | ||
+ | <WRAP prewrap 100% mincode_long> | ||
+ | <code autoconf config/ | ||
+ | # Default setup is given for MySQL 5.7.7 or later. | ||
+ | # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end. | ||
+ | # Line indentation must be 2 spaces (no tabs). | ||
+ | |||
+ | production: | ||
+ | adapter: postgresql | ||
+ | database: redmine_db | ||
+ | host: localhost | ||
+ | username: redmine | ||
+ | password: " | ||
+ | # Use " | ||
+ | encoding: utf8 | ||
+ | |||
+ | development: | ||
+ | # adapter: mysql2 | ||
+ | database: redmine_development | ||
+ | host: localhost | ||
+ | username: root | ||
+ | password: "" | ||
+ | # Use " | ||
+ | encoding: utf8mb4 | ||
+ | |||
+ | # Warning: The database defined as " | ||
+ | # re-generated from your development database when you run " | ||
+ | # Do not set this db to the same as development or production. | ||
+ | test: | ||
+ | # adapter: mysql2 | ||
+ | database: redmine_test | ||
+ | host: localhost | ||
+ | username: root | ||
+ | password: "" | ||
+ | # Use " | ||
+ | encoding: utf8mb4 | ||
+ | |||
+ | # PostgreSQL configuration example | ||
+ | # | ||
+ | # adapter: postgresql | ||
+ | # database: redmine | ||
+ | # host: localhost | ||
+ | # username: postgres | ||
+ | # password: " | ||
+ | |||
+ | # SQLite3 configuration example | ||
+ | # | ||
+ | # adapter: sqlite3 | ||
+ | # database: db/ | ||
+ | |||
+ | # SQL Server configuration example | ||
+ | # | ||
+ | # adapter: sqlserver | ||
+ | # database: redmine | ||
+ | # host: localhost | ||
+ | # username: jenkins | ||
+ | # password: jenkins | ||
+ | </ | ||
+ | </ | ||
+ | ※ **mysql2** を使う予定が無い場合、$ < | ||
+ | <WRAP prewrap 100% mincode> | ||
+ | <code ruby Gemfile> | ||
+ | # Include database gems for the adapters found in the database | ||
+ | # configuration file | ||
+ | require ' | ||
+ | require ' | ||
+ | database_file = File.join(File.dirname(__FILE__), | ||
+ | if File.exist? | ||
+ | database_config = YAML:: | ||
+ | adapters = database_config.values.map {|c| c[' | ||
+ | if adapters.any? | ||
+ | adapters.each do |adapter| | ||
+ | case adapter | ||
+ | when ' | ||
+ | gem " | ||
+ | when / | ||
+ | gem " | ||
+ | </ | ||
+ | </ | ||
+ | ※ **mysql2** の場合は **encoding: utfmb4** で寿司ビール🍣🍺問題に対応する。\\ | ||
+ | [[https:// | ||
+ | [[qita> | ||
+ | |||
+ | ===== メールとその他各種設定 ===== | ||
+ | Redmine からメールサーバへ接続するための設定や日本語フォントファイルのパスを記述した設定ファイルを作成する。\\ | ||
+ | < | ||
+ | $ cd redmine-4.2.1 | ||
+ | $ cp config/ | ||
+ | $ nano config/ | ||
+ | </ | ||
+ | |||
+ | **設定ファイルの設定例(localhost sendmail)**\\ | ||
+ | <WRAP prewrap 100% mincode> | ||
+ | <code autoconf config/ | ||
+ | # specific configuration options for production environment | ||
+ | # that overrides the default ones | ||
+ | production: | ||
+ | email_delivery: | ||
+ | delivery_method: | ||
+ | smtp_settings: | ||
+ | address: " | ||
+ | port: 25 | ||
+ | domain: " | ||
+ | |||
+ | rmagick_font_path: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | **設定ファイルの設定例(gmail)**\\ | ||
+ | <WRAP prewrap 100% mincode> | ||
+ | <code autoconf config/ | ||
+ | # specific configuration options for production environment | ||
+ | # that overrides the default ones | ||
+ | production: | ||
+ | email_delivery: | ||
+ | delivery_method: | ||
+ | smtp_settings: | ||
+ | enable_starttls_auto: | ||
+ | address: " | ||
+ | port: 587 | ||
+ | domain: " | ||
+ | authentication: | ||
+ | user_name: " | ||
+ | password: "gmail no password!" | ||
+ | |||
+ | rmagick_font_path: | ||
+ | </ | ||
+ | </ | ||
+ | ※gmail でメール通知を行う場合、送信を行う Google アカウントで以下の設定を行う。\\ | ||
+ | メール クライアントの設定 (例: Outlook、Eudora、Netscape Mail)\\ | ||
+ | [[https:// | ||
+ | * 歯車→[すべての設定を表示]→[メール転送と POP/IMAP] タブ→[POP ダウンロード] で、[すべてのメールで POP を有効にする] または [今後受信するメールで POP を有効にする] を選択する。\\ | ||
+ | * 更に、2 段階認証プロセスを使用している場合は、[[https:// | ||
+ | |||
+ | **メールの通知テスト**\\ | ||
+ | 「管理」→「設定」で「メール通知」タブより、画面左下の「テストメールを送信」をクリックする。\\ | ||
+ | |||
+ | **設定ファイル全体**\\ | ||
+ | <WRAP prewrap 100% mincode_long> | ||
+ | <code autoconf config/ | ||
+ | # = Redmine configuration file | ||
+ | # | ||
+ | # Each environment has its own configuration options. | ||
+ | # running in production, only the production block needs to be configured. | ||
+ | # Environment specific configuration options override the default ones. | ||
+ | # | ||
+ | # Note that this file needs to be a valid YAML file. | ||
+ | # DO NOT USE TABS! Use 2 spaces instead of tabs for indentation. | ||
+ | |||
+ | # default configuration options for all environments | ||
+ | default: | ||
+ | # Outgoing emails configuration | ||
+ | # See the examples below and the Rails guide for more configuration options: | ||
+ | # http:// | ||
+ | email_delivery: | ||
+ | |||
+ | # ==== Simple SMTP server at localhost | ||
+ | # | ||
+ | # email_delivery: | ||
+ | # delivery_method: | ||
+ | # smtp_settings: | ||
+ | # address: " | ||
+ | # port: 25 | ||
+ | # | ||
+ | # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com | ||
+ | # | ||
+ | # email_delivery: | ||
+ | # delivery_method: | ||
+ | # smtp_settings: | ||
+ | # address: " | ||
+ | # port: 25 | ||
+ | # authentication: | ||
+ | # domain: ' | ||
+ | # user_name: ' | ||
+ | # password: ' | ||
+ | # | ||
+ | # ==== SMTP server at example.com using PLAIN authentication | ||
+ | # | ||
+ | # email_delivery: | ||
+ | # delivery_method: | ||
+ | # smtp_settings: | ||
+ | # address: " | ||
+ | # port: 25 | ||
+ | # authentication: | ||
+ | # domain: ' | ||
+ | # user_name: ' | ||
+ | # password: ' | ||
+ | # | ||
+ | # ==== SMTP server at using TLS (GMail) | ||
+ | # This might require some additional configuration. See the guides at: | ||
+ | # http:// | ||
+ | # | ||
+ | # email_delivery: | ||
+ | # delivery_method: | ||
+ | # smtp_settings: | ||
+ | # enable_starttls_auto: | ||
+ | # address: " | ||
+ | # port: 587 | ||
+ | # domain: " | ||
+ | # authentication: | ||
+ | # user_name: " | ||
+ | # password: " | ||
+ | # | ||
+ | # ==== Sendmail command | ||
+ | # | ||
+ | # email_delivery: | ||
+ | # delivery_method: | ||
+ | |||
+ | # Absolute path to the directory where attachments are stored. | ||
+ | # The default is the ' | ||
+ | # Your Redmine instance needs to have write permission on this | ||
+ | # directory. | ||
+ | # Examples: | ||
+ | # attachments_storage_path: | ||
+ | # attachments_storage_path: | ||
+ | attachments_storage_path: | ||
+ | |||
+ | # Configuration of the autologin cookie. | ||
+ | # autologin_cookie_name: | ||
+ | # autologin_cookie_path: | ||
+ | # autologin_cookie_secure: | ||
+ | autologin_cookie_name: | ||
+ | autologin_cookie_path: | ||
+ | autologin_cookie_secure: | ||
+ | |||
+ | # Configuration of SCM executable command. | ||
+ | # | ||
+ | # Absolute path (e.g. / | ||
+ | # On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work. | ||
+ | # | ||
+ | # On Windows + JRuby 1.6.2, path which contains spaces does not work. | ||
+ | # For example, " | ||
+ | # If you want to this feature, you need to install to the path which does not contains spaces. | ||
+ | # For example, " | ||
+ | # | ||
+ | # Examples: | ||
+ | # scm_subversion_command: | ||
+ | # scm_mercurial_command: | ||
+ | # scm_git_command: | ||
+ | # scm_cvs_command: | ||
+ | # scm_bazaar_command: | ||
+ | # | ||
+ | scm_subversion_command: | ||
+ | scm_mercurial_command: | ||
+ | scm_git_command: | ||
+ | scm_cvs_command: | ||
+ | scm_bazaar_command: | ||
+ | |||
+ | # SCM paths validation. | ||
+ | # | ||
+ | # You can configure a regular expression for each SCM that will be used to | ||
+ | # validate the path of new repositories (eg. path entered by users with the | ||
+ | # " | ||
+ | # The regexp will be wrapped with \A \z, so it must match the whole path. | ||
+ | # And the regexp is case sensitive. | ||
+ | # | ||
+ | # You can match the project identifier by using %project% in the regexp. | ||
+ | # | ||
+ | # You can also set a custom hint message for each SCM that will be displayed | ||
+ | # on the repository form instead of the default one. | ||
+ | # | ||
+ | # Examples: | ||
+ | # scm_subversion_path_regexp: | ||
+ | # scm_subversion_path_info: | ||
+ | # | ||
+ | # scm_git_path_regexp: | ||
+ | # | ||
+ | scm_subversion_path_regexp: | ||
+ | scm_mercurial_path_regexp: | ||
+ | scm_git_path_regexp: | ||
+ | scm_cvs_path_regexp: | ||
+ | scm_bazaar_path_regexp: | ||
+ | scm_filesystem_path_regexp: | ||
+ | |||
+ | # Absolute path to the SCM commands errors (stderr) log file. | ||
+ | # The default is to log in the ' | ||
+ | # Example: | ||
+ | # scm_stderr_log_file: | ||
+ | scm_stderr_log_file: | ||
+ | |||
+ | # Key used to encrypt sensitive data in the database (SCM passwords, | ||
+ | # LDAP passwords, and TOTP (two-factor authentication) secret keys). | ||
+ | # If you don't want to enable data encryption, just leave it blank. | ||
+ | # WARNING: losing/ | ||
+ | # | ||
+ | # If you want to encrypt existing data in your database: | ||
+ | # * set the cipher key here in your configuration file | ||
+ | # * encrypt data using 'rake db:encrypt RAILS_ENV=production' | ||
+ | # | ||
+ | # If you have encrypted data and want to change this key, you have to: | ||
+ | # * decrypt data using 'rake db:decrypt RAILS_ENV=production' | ||
+ | # * change the cipher key here in your configuration file | ||
+ | # * encrypt data using 'rake db:encrypt RAILS_ENV=production' | ||
+ | database_cipher_key: | ||
+ | |||
+ | # Set this to false to disable plugins' | ||
+ | # You can use `rake redmine: | ||
+ | # to public/ | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Your secret key for verifying cookie session data integrity. If you | ||
+ | # change this key, all old sessions will become invalid! Make sure the | ||
+ | # secret is at least 30 characters and all random, no regular words or | ||
+ | # you'll be exposed to dictionary attacks. | ||
+ | # | ||
+ | # If you have a load-balancing Redmine cluster, you have to use the | ||
+ | # same secret token on each machine. | ||
+ | # | ||
+ | |||
+ | # Requires users to re-enter their password for sensitive actions (editing | ||
+ | # of account data, project memberships, | ||
+ | # role, auth source management and project deletion). Disabled by default. | ||
+ | # Timeout is set in minutes. | ||
+ | # | ||
+ | #sudo_mode: true | ||
+ | # | ||
+ | |||
+ | # Absolute path (e.g. / | ||
+ | # the ImageMagick' | ||
+ | # | ||
+ | |||
+ | # Absolute path (e.g. / | ||
+ | # the `gs` binary. Used to generate attachment thumbnails of PDF files. | ||
+ | # | ||
+ | |||
+ | # Configuration of MiniMagick font. | ||
+ | # | ||
+ | # Redmine uses MiniMagick in order to export a gantt chart to a PNG image. | ||
+ | # This setting is necessary to properly display CJK (Chinese, Japanese, | ||
+ | # and Korean) characters in the PNG image. Please make sure that the | ||
+ | # specified font is installed in the Redmine server. | ||
+ | # | ||
+ | # This setting is necessary only when CJK characters are used in gantt. | ||
+ | # | ||
+ | # Note that rmagick_font_path in prior to Redmine 4.1.0 has been renamed | ||
+ | # to minimagick_font_path. | ||
+ | # | ||
+ | # Examples for Japanese: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | minimagick_font_path: | ||
+ | |||
+ | # Maximum number of simultaneous AJAX uploads | ||
+ | # | ||
+ | |||
+ | # Configure OpenIdAuthentication.store | ||
+ | # | ||
+ | # allowed values: :memory, :file, :memcache | ||
+ | # | ||
+ | |||
+ | # URL of the avatar server | ||
+ | # | ||
+ | # By default, Redmine uses Gravatar as the avatar server for displaying | ||
+ | # user icons. You can switch to another Gravatar-compatible server such | ||
+ | # as Libravatar and opensource servers listed on | ||
+ | # https:// | ||
+ | # | ||
+ | # URL of each avatar is: # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # specific configuration options for production environment | ||
+ | # that overrides the default ones | ||
+ | production: | ||
+ | email_delivery: | ||
+ | delivery_method: | ||
+ | smtp_settings: | ||
+ | enable_starttls_auto: | ||
+ | address: " | ||
+ | port: 587 | ||
+ | domain: " | ||
+ | authentication: | ||
+ | user_name: " | ||
+ | password: "gmail no password!" | ||
+ | |||
+ | rmagick_font_path: | ||
+ | |||
+ | # specific configuration options for development environment | ||
+ | # that overrides the default ones | ||
+ | development: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== トラブルシューティング ===== | ||
+ | |||
+ | ==== rbenv で Ruby のビルドに失敗する ==== | ||
+ | ruby-build が古い場合にビルドに失敗する😱😭\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
行 2585: | 行 3067: | ||
make[1]: ディレクトリ '/ | make[1]: ディレクトリ '/ | ||
make: *** [uncommon.mk: | make: *** [uncommon.mk: | ||
- | |||
- | $ rbenv rehash | ||
- | $ rbenv global 2.6.8 | ||
- | $ ruby -v | ||
- | ruby 2.6.8p205 (2021-07-07 revision 67951) [x86_64-linux] | ||
</ | </ | ||
</ | </ | ||
<WRAP color_term> | <WRAP color_term> | ||
- | <WRAP color_result_long>< | + | <WRAP color_result_long>< |
/ | / | ||
/ | / | ||
行 7729: | 行 8206: | ||
</ | </ | ||
- | [[ruby: | + | rbenv がインストール可能なリストを表示して、その一覧に存在しないバージョン指定してインストールしようとすると、ruby-build のアップグレードを試すよう指示される🤔\\ |
+ | (このアップグレード指示は ruby-build がビルドエラーになった場合にも指示してくれた方が助かるのだが...😅)\\ | ||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | $ rbenv install --list | column -x -c 128 | ||
+ | </ | ||
+ | <WRAP color_result>< | ||
- | ===== Web サーバーのインストール ===== | + | Only latest stable releases for each Ruby implementation are shown. |
- | [[linux: | + | Use ' |
+ | 2.6.8 | ||
+ | mruby-3.0.0 | ||
+ | </ | ||
- | ===== データベース サーバーのインストール ===== | + | <WRAP color_command>< |
- | [[linux:postgresql|PostgreSQL(Linux)]]\\ | + | $ TMPDIR=/var/tmp rbenv install 3.1.2 |
+ | </ | ||
+ | <WRAP color_result>< | ||
+ | ruby-build: definition not found: 3.1.2 | ||
- | ===== 依存パッケージのインストール ===== | + | See all available versions with `rbenv install --list' |
- | ==== 開発ツール(Cコンパイラ等)のインストール ==== | + | If the version you need is missing, try upgrading ruby-build: |
- | < | + | |
- | $ sudo dnf groupinstall " | + | |
- | $ sudo dnf install gcc-c++ | + | |
- | </ | + | |
- | ==== Passengerのビルドに必要なヘッダファイルなどのインストール ==== | + | git -C /home/redmine/.anyenv/envs/rbenv/plugins/ |
- | < | + | </pre></html></WRAP> |
- | $ sudo dnf install ruby-devel openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel | + | |
- | </code> | + | |
- | + | ||
- | ==== PostgreSQL とヘッダファイルのインストール ==== | + | |
- | < | + | |
- | $ sudo dnf install postgresql-server postgresql-devel | + | |
- | </code> | + | |
- | + | ||
- | ==== ImageMagickとヘッダファイル・日本語フォントのインストール ==== | + | |
- | < | + | |
- | $ sudo dnf install ImageMagick7 ImageMagick7-devel ipa-pgothic-fonts --enablerepo=remi | + | |
- | </code> | + | |
- | or\\ | + | |
- | < | + | |
- | $ sudo dnf install ImageMagick ImageMagick-devel ipa-pgothic-fonts | + | |
- | </ | + | |
- | + | ||
- | ===== 空のデータベースとユーザーの作成 ===== | + | |
- | + | ||
- | ==== 空のデータベースの作成 ==== | + | |
- | データベース ユーザーを作成する。\\ | + | |
- | < | + | |
- | $ psql -U postgres | + | |
- | psql (10.6) | + | |
- | " | + | |
- | + | ||
- | postgres=# CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD ' | + | |
- | CREATE ROLE | + | |
- | </code> | + | |
- | データベースを作成する。\\ | + | |
- | < | + | |
- | postgres=# CREATE DATABASE redmine_db WITH ENCODING=' | + | |
- | CREATE DATABASE | + | |
- | </code> | + | |
- | データベースの日付形式をISO(PostgreSQLのデフォルト)に設定する。\\ | + | |
- | < | + | |
- | postgres=# ALTER DATABASE " | + | |
- | ALTER DATABASE | + | |
- | postgres=# \q | + | |
- | </code> | + | |
- | + | ||
- | ===== データベース接続設定 ===== | + | |
- | < | + | |
- | $ cd redmine-4.2.1 | + | |
- | $ cp config/ | + | |
- | $ nano config/ | + | |
- | </code> | + | |
- | + | ||
- | **データベース接続設定の例(PostgreSQL)**\\ | + | |
- | <WRAP prewrap 100% mincode> | + | |
- | <code autoconf config/database.yml> | + | |
- | production: | + | |
- | adapter: postgresql | + | |
- | database: redmine_db | + | |
- | host: localhost | + | |
- | username: redmine | + | |
- | password: " | + | |
- | # Use " | + | |
- | encoding: utf8 | + | |
- | + | ||
- | development: | + | |
- | # adapter: mysql2 | + | |
- | + | ||
- | test: | + | |
- | # adapter: mysql2 | + | |
- | </code> | + | |
</ | </ | ||
- | **データベース接続設定全体**\\ | + | 指示に従って ruby-build をアップグレードする😃\\ |
- | < | + | < |
- | <code autoconf config/database.yml> | + | <WRAP color_command>< |
- | # Default setup is given for MySQL 5.7.7 or later. | + | $ git -C / |
- | # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end. | + | </ |
- | # Line indentation must be 2 spaces | + | <WRAP color_result_long>< |
- | + | remote: Enumerating objects: 1346, done. | |
- | production: | + | remote: Counting objects: 100% (1009/1009), done. |
- | | + | remote: Compressing objects: 100% (144/144), done. |
- | | + | remote: Total 1346 (delta 939), reused 892 (delta 865), pack-reused 337 |
- | | + | Receiving objects: 100% (1346/ |
- | | + | Resolving deltas: 100% (1111/ |
- | | + | From https:// |
- | | + | 37d7143..7866a26 |
- | | + | * [new tag] |
- | + | * [new tag] | |
- | development: | + | * [new tag] |
- | # adapter: mysql2 | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | + | * [new tag] | |
- | # Warning: The database defined as " | + | * [new tag] |
- | # re-generated from your development database when you run " | + | * [new tag] |
- | # Do not set this db to the same as development or production. | + | * [new tag] |
- | test: | + | * [new tag] |
- | # adapter: mysql2 | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | | + | * [new tag] |
- | + | * [new tag] | |
- | # PostgreSQL configuration example | + | * [new tag] |
- | # | + | Updating 37d7143..7866a26 |
- | # adapter: postgresql | + | Fast-forward |
- | # database: redmine | + | |
- | # host: localhost | + | .github/ |
- | # username: postgres | + | .github/ |
- | # password: " | + | .github/ |
- | + | .github/ | |
- | # SQLite3 configuration example | + | CONTRIBUTING.md |
- | # | + | bin/ |
- | # adapter: sqlite3 | + | |
- | # database: db/redmine.sqlite3 | + | |
- | + | | |
- | # SQL Server configuration example | + | |
- | # | + | script/ |
- | # adapter: sqlserver | + | |
- | # database: redmine | + | script/ |
- | # host: localhost | + | share/ |
- | # username: jenkins | + | share/ |
- | # password: jenkins | + | share/ |
- | </code> | + | share/ |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | share/ | ||
+ | | ||
+ | share/ | ||
+ | share/ | ||
+ | share/ | ||
+ | share/ | ||
+ | share/ | ||
+ | share/ | ||
+ | share/ | ||
+ | share/ | ||
+ | test/ | ||
+ | 330 files changed, 752 insertions(+), | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
</ | </ | ||
- | ※ **mysql2** を使う予定が無い場合、$ < | ||
- | <WRAP prewrap 100% mincode> | ||
- | <code ruby Gemfile> | ||
- | # Include database gems for the adapters found in the database | ||
- | # configuration file | ||
- | require ' | ||
- | require ' | ||
- | database_file = File.join(File.dirname(__FILE__), | ||
- | if File.exist? | ||
- | database_config = YAML:: | ||
- | adapters = database_config.values.map {|c| c[' | ||
- | if adapters.any? | ||
- | adapters.each do |adapter| | ||
- | case adapter | ||
- | when ' | ||
- | gem " | ||
- | when / | ||
- | gem " | ||
- | </ | ||
- | </ | ||
- | ※ **mysql2** の場合は **encoding: utfmb4** で寿司ビール🍣🍺問題に対応する。\\ | ||
- | [[https:// | ||
- | [[qita> | ||
- | ===== メールとその他各種設定 ===== | + | ruby-build をアップグレード後に再度 rbenv がインストール可能な Ruby バージョンを取得する😉\\ |
- | Redmine からメールサーバへ接続するための設定や日本語フォントファイルのパスを記述した設定ファイルを作成する。\\ | + | <WRAP color_term> |
- | <code> | + | <WRAP color_command>< |
- | $ cd redmine-4.2.1 | + | $ rbenv install --list | column -x -c 128 |
- | $ cp config/configuration.yml.example config/configuration.yml | + | </pre></html>< |
- | $ nano config/configuration.yml | + | <WRAP color_result>< |
- | </code> | + | |
- | **設定ファイルの設定例(localhost sendmail)**\\ | + | Only latest stable releases for each Ruby implementation are shown. |
- | <WRAP prewrap 100% mincode> | + | Use 'rbenv install --list-all |
- | <code autoconf config/configuration.yml> | + | 2.6.10 |
- | # specific configuration options for production environment | + | jruby-9.3.6.0 |
- | # that overrides the default ones | + | truffleruby-22.1.0 truffleruby+graalvm-22.1.0 |
- | production: | + | </pre></ |
- | email_delivery: | + | |
- | delivery_method: | + | |
- | smtp_settings: | + | |
- | address: " | + | |
- | port: 25 | + | |
- | domain: " | + | |
- | + | ||
- | rmagick_font_path: | + | |
- | </code> | + | |
</ | </ | ||
- | **設定ファイルの設定例(gmail)**\\ | + | 現時点で最新の Ruby 3.1.2 をインストールする😻\\ |
- | < | + | 今度は上手くインストールが完了した🥰\\ |
- | <code autoconf config/configuration.yml> | + | < |
- | # specific configuration options for production environment | + | <WRAP color_command>< |
- | # that overrides the default ones | + | $ TMPDIR=/var/tmp rbenv install 3.1.2 |
- | production: | + | </ |
- | email_delivery: | + | <WRAP color_result>< |
- | delivery_method: | + | Downloading ruby-3.1.2.tar.gz... |
- | smtp_settings: | + | -> https://cache.ruby-lang.org/ |
- | enable_starttls_auto: | + | Installing ruby-3.1.2... |
- | address: "smtp.gmail.com" | + | Installed ruby-3.1.2 to /home/redmine/.anyenv/ |
- | port: 587 | + | |
- | domain: " | + | |
- | | + | |
- | user_name: " | + | |
- | password: "gmail no password!" | + | |
- | rmagick_font_path: | + | </pre></html></ |
- | </code> | + | <WRAP color_command><html><pre> |
- | </ | + | $ rbenv rehash |
- | ※gmail でメール通知を行う場合、送信を行う Google アカウントで以下の設定を行う。\\ | + | $ rbenv global 3.1.2 |
- | メール クライアントの設定 (例: Outlook、Eudora、Netscape Mail)\\ | + | $ ruby -v |
- | [[https:// | + | ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux] |
- | * 歯車→[すべての設定を表示]→[メール転送と POP/IMAP] タブ→[POP ダウンロード] で、[すべてのメールで POP を有効にする] または [今後受信するメールで POP を有効にする] を選択する。\\ | + | </pre></html></WRAP> |
- | * 更に、2 段階認証プロセスを使用している場合は、[[https:// | + | |
- | + | ||
- | **メールの通知テスト**\\ | + | |
- | 「管理」→「設定」で「メール通知」タブより、画面左下の「テストメールを送信」をクリックする。\\ | + | |
- | + | ||
- | **設定ファイル全体**\\ | + | |
- | <WRAP prewrap 100% mincode_long> | + | |
- | <code autoconf config/ | + | |
- | # = Redmine configuration file | + | |
- | # | + | |
- | # Each environment has its own configuration options. If you are only | + | |
- | # running in production, only the production block needs to be configured. | + | |
- | # Environment specific configuration options override the default ones. | + | |
- | # | + | |
- | # Note that this file needs to be a valid YAML file. | + | |
- | # DO NOT USE TABS! Use 2 spaces instead of tabs for indentation. | + | |
- | + | ||
- | # default configuration options for all environments | + | |
- | default: | + | |
- | # Outgoing emails configuration | + | |
- | # See the examples below and the Rails guide for more configuration options: | + | |
- | # http:// | + | |
- | | + | |
- | + | ||
- | # ==== Simple SMTP server at localhost | + | |
- | # | + | |
- | # email_delivery: | + | |
- | # delivery_method: | + | |
- | # smtp_settings: | + | |
- | # address: " | + | |
- | # port: 25 | + | |
- | # | + | |
- | # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com | + | |
- | # | + | |
- | # email_delivery: | + | |
- | # delivery_method: | + | |
- | # smtp_settings: | + | |
- | # address: " | + | |
- | # port: 25 | + | |
- | # authentication: | + | |
- | # domain: ' | + | |
- | # user_name: ' | + | |
- | # password: ' | + | |
- | # | + | |
- | # ==== SMTP server at example.com using PLAIN authentication | + | |
- | # | + | |
- | # email_delivery: | + | |
- | # delivery_method: | + | |
- | # smtp_settings: | + | |
- | # address: " | + | |
- | # port: 25 | + | |
- | # authentication: | + | |
- | # domain: ' | + | |
- | # user_name: ' | + | |
- | # password: ' | + | |
- | # | + | |
- | # ==== SMTP server at using TLS (GMail) | + | |
- | # This might require some additional configuration. See the guides at: | + | |
- | # http:// | + | |
- | # | + | |
- | # email_delivery: | + | |
- | # delivery_method: | + | |
- | # smtp_settings: | + | |
- | # enable_starttls_auto: | + | |
- | # address: " | + | |
- | # port: 587 | + | |
- | # domain: " | + | |
- | # authentication: | + | |
- | # user_name: " | + | |
- | # password: " | + | |
- | # | + | |
- | # ==== Sendmail command | + | |
- | # | + | |
- | # email_delivery: | + | |
- | # delivery_method: | + | |
- | + | ||
- | # Absolute path to the directory where attachments are stored. | + | |
- | # The default is the ' | + | |
- | # Your Redmine instance needs to have write permission on this | + | |
- | # directory. | + | |
- | # Examples: | + | |
- | # attachments_storage_path: | + | |
- | # attachments_storage_path: | + | |
- | attachments_storage_path: | + | |
- | + | ||
- | # Configuration of the autologin cookie. | + | |
- | # autologin_cookie_name: | + | |
- | # autologin_cookie_path: | + | |
- | # autologin_cookie_secure: | + | |
- | autologin_cookie_name: | + | |
- | autologin_cookie_path: | + | |
- | autologin_cookie_secure: | + | |
- | + | ||
- | # Configuration of SCM executable command. | + | |
- | # | + | |
- | # Absolute path (e.g. / | + | |
- | # On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work. | + | |
- | # | + | |
- | # On Windows + JRuby 1.6.2, path which contains spaces does not work. | + | |
- | # For example, " | + | |
- | # If you want to this feature, you need to install to the path which does not contains spaces. | + | |
- | # For example, " | + | |
- | # | + | |
- | # Examples: | + | |
- | # scm_subversion_command: | + | |
- | # scm_mercurial_command: | + | |
- | # scm_git_command: | + | |
- | # scm_cvs_command: | + | |
- | # scm_bazaar_command: | + | |
- | # | + | |
- | scm_subversion_command: | + | |
- | scm_mercurial_command: | + | |
- | scm_git_command: | + | |
- | scm_cvs_command: | + | |
- | scm_bazaar_command: | + | |
- | + | ||
- | # SCM paths validation. | + | |
- | # | + | |
- | # You can configure a regular expression for each SCM that will be used to | + | |
- | # validate the path of new repositories (eg. path entered by users with the | + | |
- | # " | + | |
- | # The regexp will be wrapped with \A \z, so it must match the whole path. | + | |
- | # And the regexp is case sensitive. | + | |
- | # | + | |
- | # You can match the project identifier by using %project% in the regexp. | + | |
- | # | + | |
- | # You can also set a custom hint message for each SCM that will be displayed | + | |
- | # on the repository form instead of the default one. | + | |
- | # | + | |
- | # Examples: | + | |
- | # scm_subversion_path_regexp: | + | |
- | # scm_subversion_path_info: | + | |
- | # | + | |
- | # scm_git_path_regexp: | + | |
- | # | + | |
- | scm_subversion_path_regexp: | + | |
- | scm_mercurial_path_regexp: | + | |
- | scm_git_path_regexp: | + | |
- | scm_cvs_path_regexp: | + | |
- | scm_bazaar_path_regexp: | + | |
- | scm_filesystem_path_regexp: | + | |
- | + | ||
- | # Absolute path to the SCM commands errors (stderr) log file. | + | |
- | # The default is to log in the ' | + | |
- | # Example: | + | |
- | # scm_stderr_log_file: | + | |
- | scm_stderr_log_file: | + | |
- | + | ||
- | # Key used to encrypt sensitive data in the database (SCM passwords, | + | |
- | # LDAP passwords, and TOTP (two-factor authentication) secret keys). | + | |
- | # If you don't want to enable data encryption, just leave it blank. | + | |
- | # WARNING: losing/ | + | |
- | # | + | |
- | # If you want to encrypt existing data in your database: | + | |
- | # * set the cipher key here in your configuration file | + | |
- | # * encrypt data using 'rake db:encrypt RAILS_ENV=production' | + | |
- | # | + | |
- | # If you have encrypted data and want to change this key, you have to: | + | |
- | # * decrypt data using 'rake db:decrypt RAILS_ENV=production' | + | |
- | # * change the cipher key here in your configuration file | + | |
- | # * encrypt data using 'rake db:encrypt RAILS_ENV=production' | + | |
- | database_cipher_key: | + | |
- | + | ||
- | # Set this to false to disable plugins' | + | |
- | # You can use `rake redmine: | + | |
- | # to public/ | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # Your secret key for verifying cookie session data integrity. If you | + | |
- | # change this key, all old sessions will become invalid! Make sure the | + | |
- | # secret is at least 30 characters and all random, no regular words or | + | |
- | # you'll be exposed to dictionary attacks. | + | |
- | # | + | |
- | # If you have a load-balancing Redmine cluster, you have to use the | + | |
- | # same secret token on each machine. | + | |
- | # | + | |
- | + | ||
- | # Requires users to re-enter their password for sensitive actions (editing | + | |
- | # of account data, project memberships, | + | |
- | # role, auth source management and project deletion). Disabled by default. | + | |
- | # Timeout is set in minutes. | + | |
- | # | + | |
- | #sudo_mode: true | + | |
- | # | + | |
- | + | ||
- | # Absolute path (e.g. / | + | |
- | # the ImageMagick' | + | |
- | # | + | |
- | + | ||
- | # Absolute path (e.g. / | + | |
- | # the `gs` binary. Used to generate attachment thumbnails of PDF files. | + | |
- | # | + | |
- | + | ||
- | # Configuration of MiniMagick font. | + | |
- | # | + | |
- | # Redmine uses MiniMagick in order to export a gantt chart to a PNG image. | + | |
- | # This setting is necessary to properly display CJK (Chinese, Japanese, | + | |
- | # and Korean) characters in the PNG image. Please make sure that the | + | |
- | # specified font is installed in the Redmine server. | + | |
- | # | + | |
- | # This setting is necessary only when CJK characters are used in gantt. | + | |
- | # | + | |
- | # Note that rmagick_font_path in prior to Redmine 4.1.0 has been renamed | + | |
- | # to minimagick_font_path. | + | |
- | # | + | |
- | # Examples for Japanese: | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | minimagick_font_path: | + | |
- | + | ||
- | # Maximum number of simultaneous AJAX uploads | + | |
- | # | + | |
- | + | ||
- | # Configure OpenIdAuthentication.store | + | |
- | # | + | |
- | # allowed values: :memory, :file, :memcache | + | |
- | # | + | |
- | + | ||
- | # URL of the avatar server | + | |
- | # | + | |
- | # By default, Redmine uses Gravatar as the avatar server for displaying | + | |
- | # user icons. You can switch to another Gravatar-compatible server such | + | |
- | # as Libravatar and opensource servers listed on | + | |
- | # https:// | + | |
- | # | + | |
- | # URL of each avatar is: # | + | |
- | # | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | # specific configuration options for production environment | + | |
- | # that overrides the default ones | + | |
- | production: | + | |
- | email_delivery: | + | |
- | delivery_method: | + | |
- | smtp_settings: | + | |
- | enable_starttls_auto: | + | |
- | address: " | + | |
- | port: 587 | + | |
- | domain: " | + | |
- | authentication: | + | |
- | user_name: " | + | |
- | password: "gmail no password!" | + | |
- | + | ||
- | rmagick_font_path: | + | |
- | + | ||
- | # specific configuration options for development environment | + | |
- | # that overrides the default ones | + | |
- | development: | + | |
- | </code> | + | |
</ | </ | ||