Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
14.4. Configuration Examples
14.4.1. Changing the Default OpenShift Directory Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
By default, OpenShift stores its data in the
/var/lib/openshift/
directory, which is labeled with the openshift_var_lib_t
SELinux type. To allow OpenShift to store data in a different directory, label the new directory with the proper SELinux context.
The following procedure shows how to change the default OpenShift directory for storing data to
/srv/openshift/
:
Procedure 14.1. Changing the Default OpenShift Directory for Storing Data
- As root, create a new
/openshift/
directory within the/srv/
directory. The new directory is labeled with thevar_t
type:mkdir /srv/openshift
~]# mkdir /srv/openshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ls -Zd /srv/openshift
~]$ ls -Zd /srv/openshift drwxr-xr-x. root root unconfined_u:object_r:var_t:s0 openshift/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - As root, use the
semanage
utility to map/srv/openshift/
to the proper SELinux context:semanage fcontext -a -e /var/lib/openshift /srv/openshift
~]# semanage fcontext -a -e /var/lib/openshift /srv/openshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Then, use the
restorecon
utility as root to apply the changes:restorecon -R -v /srv/openshift
~]# restorecon -R -v /srv/openshift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
/srv/openshift/
directory is now labeled with the correctopenshift_var_lib_t
type:~]$ls -Zd /srv/openshift drwxr-xr-x. root root unconfined_u:object_r:openshift_var_lib_t:s0 openshift/
~]$ls -Zd /srv/openshift drwxr-xr-x. root root unconfined_u:object_r:openshift_var_lib_t:s0 openshift/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow