Show Table of Contents
25.4. 設定例
25.4.1. デフォルト OpenShift ディレクトリーの変更
デフォルトでは、OpenShift はデータを
/var/lib/openshift/ ディレクトリーに保存します。このディレクトリーには、openshift_var_lib_t の SELinux タイプのラベルが付けられています。OpenShift が別のディレクトリーにデータを保存できるようにするには、新たなディレクトリーに適切な SELinux コンテキストのラベルを付けます。
以下の手順では、OpenShift がデフォルトでデータを保存するディレクトリーを
/srv/openshift/ に変更する方法を示します。
手順25.1 データ保存用のデフォルト OpenShift ディレクトリーの変更
- root で
/srvディレクトリー内に新規のopenshift/ディレクトリーを作成します。このディレクトリーにはvar_tタイプのラベルが付けられます。~]#mkdir /srv/openshift~]$ls -Zd /srv/openshiftdrwxr-xr-x. root root unconfined_u:object_r:var_t:s0 openshift/ - root で
semanageユーティリティーを使って、/srv/openshift/に適切な SELinux コンテキストをマッピングします。~]#semanage fcontext -a -e /var/lib/openshift /srv/openshift - root で
restoreconユーティリティーを使用してラベル変更を適用します。~]#restorecon -R -v /srv/openshift - これで
/srv/openshift/ディレクトリーに適切なopenshift_var_lib_tタイプのラベルが付けられました。~]$ls -Zd /srv/openshiftdrwxr-xr-x. root root unconfined_u:object_r:openshift_var_lib_t:s0 openshift/

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.