Questo contenuto non è disponibile nella lingua selezionata.

25.4. Configuration Examples


25.4.1. Changing the Default OpenShift Directory

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 25.1. Changing the Default OpenShift Directory for Storing Data

  1. As root, create a new openshift/ directory within the /srv directory. The new directory is labeled with the var_t type:
    ~]# mkdir /srv/openshift
    Copy to Clipboard Toggle word wrap
    ~]$ ls -Zd /srv/openshift
    drwxr-xr-x. root root unconfined_u:object_r:var_t:s0   openshift/
    
    Copy to Clipboard Toggle word wrap
  2. As root, use the semanage utility to map /srv/openshift/ to the proper SELinux context:
    ~]# semanage fcontext -a -e /var/lib/openshift /srv/openshift
    Copy to Clipboard Toggle word wrap
  3. Then, use the restorecon utility as root to apply the changes:
    ~]# restorecon -R -v /srv/openshift
    Copy to Clipboard Toggle word wrap
  4. The /srv/openshift/ directory is now labeled with the correct openshift_var_lib_t type:
    ~]$ ls -Zd /srv/openshift
    drwxr-xr-x. root root unconfined_u:object_r:openshift_var_lib_t:s0   openshift/
    
    Copy to Clipboard Toggle word wrap
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat