Este conteúdo não está disponível no idioma selecionado.

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
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat