{"id":3243,"date":"2024-07-08T22:06:54","date_gmt":"2024-07-08T21:06:54","guid":{"rendered":"https:\/\/www.jmarior.net\/itank\/?p=3243"},"modified":"2024-07-08T22:09:22","modified_gmt":"2024-07-08T21:09:22","slug":"como-anadir-los-indices-que-faltan-a-nextcloud-con-occ","status":"publish","type":"post","link":"https:\/\/www.jmarior.net\/itank\/como-anadir-los-indices-que-faltan-a-nextcloud-con-occ\/","title":{"rendered":"C\u00f3mo a\u00f1adir los \u00edndices que faltan a Nextcloud con occ"},"content":{"rendered":"<p>Algunas recomendaciones que se pueden ver en el \u00e1rea administrativa de Nextcloud hacen referencia al comando <strong>occ<\/strong>, para aclarar:<\/p>\n<p>El comando <code>occ<\/code> es una herramienta de l\u00ednea de comandos para Nextcloud que permite administrar y configurar tu instancia de Nextcloud. Aqu\u00ed hay una gu\u00eda b\u00e1sica sobre c\u00f3mo usarlo:<\/p>\n<h3>1. <strong>Acceso a la l\u00ednea de comandos<\/strong><\/h3>\n<p>Para usar <code>occ<\/code>, necesitas acceso a la l\u00ednea de comandos del servidor donde est\u00e1 instalado Nextcloud. Esto generalmente se hace a trav\u00e9s de SSH.<\/p>\n<h3>2. <strong>Ubicaci\u00f3n del archivo <code>occ<\/code><\/strong><\/h3>\n<p>El archivo <code>occ<\/code> se encuentra en el directorio ra\u00edz de la instalaci\u00f3n de Nextcloud. Por ejemplo, si tu instalaci\u00f3n de Nextcloud est\u00e1 en <code>\/var\/www\/nextcloud<\/code>, el archivo <code>occ<\/code> estar\u00e1 en <code>\/var\/www\/nextcloud\/occ<\/code>.<\/p>\n<h3>3. <strong>Ejecutar el comando <code>occ<\/code><\/strong><\/h3>\n<p>El comando <code>occ<\/code> debe ejecutarse como el usuario web (usualmente <code>www-data<\/code> en servidores Apache o Nginx en sistemas basados en Debian\/Ubuntu).<\/p>\n<p>Puedes ejecutar el comando <code>occ<\/code> usando <code>sudo -u www-data php occ<\/code> desde el directorio de Nextcloud. Aqu\u00ed hay algunos ejemplos:<\/p>\n<h4>Listar todos los comandos disponibles:<\/h4>\n<pre><code class=\"language-bash line-numbers\">cd \/var\/www\/nextcloud\nsudo -u www-data php occ list\n<\/code><\/pre>\n<h4>Ver el estado de la instalaci\u00f3n:<\/h4>\n<pre><code class=\"language-bash line-numbers\">cd \/var\/www\/nextcloud\nsudo -u www-data php occ status\n<\/code><\/pre>\n<h4>Habilitar una aplicaci\u00f3n:<\/h4>\n<pre><code class=\"language-bash line-numbers\">cd \/var\/www\/nextcloud\nsudo -u www-data php occ app:enable nombre_de_la_aplicacion\n<\/code><\/pre>\n<h4>Deshabilitar una aplicaci\u00f3n:<\/h4>\n<pre><code class=\"language-bash line-numbers\">cd \/var\/www\/nextcloud\nsudo -u www-data php occ app:disable nombre_de_la_aplicacion\n<\/code><\/pre>\n<h4>Realizar un escaneo de archivos:<\/h4>\n<pre><code class=\"language-bash line-numbers\">cd \/var\/www\/nextcloud\nsudo -u www-data php occ files:scan --all\n<\/code><\/pre>\n<h4>Configurar un par\u00e1metro:<\/h4>\n<pre><code class=\"language-bash line-numbers\">cd \/var\/www\/nextcloud\nsudo -u www-data php occ config:system:set nombre_del_parametro --value=\"valor\"\n<\/code><\/pre>\n<h4>Crear un usuario:<\/h4>\n<pre><code class=\"language-bash line-numbers\">cd \/var\/www\/nextcloud\nsudo -u www-data php occ user:add nombre_de_usuario\n<\/code><\/pre>\n<h3>4. <strong>Uso com\u00fan de comandos <code>occ<\/code><\/strong><\/h3>\n<p>Aqu\u00ed tienes algunos de los comandos <code>occ<\/code> m\u00e1s utilizados y sus funciones:<\/p>\n<ul>\n<li><strong><code>maintenance:mode<\/code><\/strong>: Administrar el modo de mantenimiento.\n<ul>\n<li>Activar: <code>sudo -u www-data php occ maintenance:mode --on<\/code><\/li>\n<li>Desactivar: <code>sudo -u www-data php occ maintenance:mode --off<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong><code>user:add<\/code><\/strong>: A\u00f1adir un nuevo usuario.\n<ul>\n<li><code>sudo -u www-data php occ user:add nombre_de_usuario<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong><code>user:delete<\/code><\/strong>: Eliminar un usuario existente.\n<ul>\n<li><code>sudo -u www-data php occ user:delete nombre_de_usuario<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong><code>log:tail<\/code><\/strong>: Ver los \u00faltimos registros del log.\n<ul>\n<li><code>sudo -u www-data php occ log:tail<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong><code>db:add-missing-indices<\/code><\/strong>: A\u00f1adir \u00edndices faltantes a la base de datos.\n<ul>\n<li><code>sudo -u www-data php occ db:add-missing-indices<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong><code>config:system:get<\/code><\/strong>: Obtener un valor de configuraci\u00f3n del sistema.\n<ul>\n<li><code>sudo -u www-data php occ config:system:get nombre_del_parametro<\/code><\/li>\n<\/ul>\n<\/li>\n<li><strong><code>config:system:set<\/code><\/strong>: Establecer un valor de configuraci\u00f3n del sistema.\n<ul>\n<li><code>sudo -u www-data php occ config:system:set nombre_del_parametro --value=\"valor\"<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Fuente: openAI chat<\/p>\n<pre><code class=\"language-bash line-numbers\">$jmarior@server:~$\u00a0sudo -u www-data php occ db:add-missing-indices\nCheck indices of the share table.\nCheck indices of the filecache table.\nAdding additional size index to the filecache table, this can take some time...\nFilecache table updated successfully.\nAdding additional path index to the filecache table, this can take some time...\nFilecache table updated successfully.\nAdding additional parent index to the filecache table, this can take some time...\nFilecache table updated successfully.\nCheck indices of the twofactor_providers table.\nCheck indices of the login_flow_v2 table.\nCheck indices of the whats_new table.\nCheck indices of the cards table.\nCheck indices of the cards_properties table.\nCheck indices of the calendarobjects_props table.\nCheck indices of the schedulingobjects table.\nCheck indices of the oc_properties table.\nAdding properties_pathonly_index index to the oc_properties table, this can take some time...\noc_properties table updated successfully.\nCheck indices of the oc_jobs table.\nAdding job_lastcheck_reserved index to the oc_jobs table, this can take some time...\noc_properties table updated successfully.\nCheck indices of the oc_direct_edit table.\nAdding direct_edit_timestamp index to the oc_direct_edit table, this can take some time...\noc_direct_edit table updated successfully.\nCheck indices of the oc_preferences table.\nAdding preferences_app_key index to the oc_preferences table, this can take some time...\noc_properties table updated successfully.\nCheck indices of the oc_mounts table.\nAdding mounts_class_index index to the oc_mounts table, this can take some time...\noc_mounts table updated successfully.\nAdding mounts_user_root_path_index index to the oc_mounts table, this can take some time...\noc_mounts table updated successfully.\nCheck indices of the oc_systemtag_object_mapping table.\nAdding systag_by_tagid index to the oc_systemtag_object_mapping table, this can take some time...\noc_systemtag_object_mapping table updated successfully.\nAdding additional textstep_session index to the oc_text_steps table, this can take some time...\noc_text_steps table updated successfully.\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Algunas recomendaciones que se pueden ver en el \u00e1rea administrativa de Nextcloud hacen referencia al comando occ, para aclarar: El comando occ es una herramienta de l\u00ednea de comandos para Nextcloud que permite administrar y configurar tu instancia de Nextcloud. Aqu\u00ed hay una gu\u00eda b\u00e1sica sobre c\u00f3mo usarlo: 1. Acceso a la l\u00ednea de comandos [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3244,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[10,1978,2066,2067],"class_list":["post-3243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-itank-ideas","tag-command-line","tag-linea-de-comandos","tag-nextcloud","tag-occ"],"views":170,"_links":{"self":[{"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/posts\/3243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/comments?post=3243"}],"version-history":[{"count":0,"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/posts\/3243\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/media\/3244"}],"wp:attachment":[{"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/media?parent=3243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/categories?post=3243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jmarior.net\/itank\/wp-json\/wp\/v2\/tags?post=3243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}