Nextcloud: mudanças entre as edições

De RJGS Wiki
Ir para navegação Ir para pesquisar
Sem resumo de edição
Sem resumo de edição
 
(4 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 18: Linha 18:


  apt list --upgradable  
  apt list --upgradable  
  sudo apt upgrade -y  
  sudo apt upgrade -y  


Linha 36: Linha 35:


  sudo apt install apache2 -y  
  sudo apt install apache2 -y  
  sudo apt install mariadb-server -y  
  sudo apt install mariadb-server -y  
  sudo apt install libapache2-mod-php7.4 -y  
  sudo apt install libapache2-mod-php7.4 -y  
  sudo apt install php7.4-gd -y  
  sudo apt install php7.4-gd -y  
  sudo apt install php7.4-mysql -y  
  sudo apt install php7.4-mysql -y  
  sudo apt install php7.4-curl -y  
  sudo apt install php7.4-curl -y  
  sudo apt install php7.4-mbstring -y  
  sudo apt install php7.4-mbstring -y  
  sudo apt install php7.4-intl -y  
  sudo apt install php7.4-intl -y  
  sudo apt install php7.4-gmp -y  
  sudo apt install php7.4-gmp -y  
  sudo apt install php7.4-bcmath -y  
  sudo apt install php7.4-bcmath -y  
  sudo apt install php-imagick -y  
  sudo apt install php-imagick -y  
  sudo apt install php7.4-xml -y  
  sudo apt install php7.4-xml -y  
  sudo apt install php7.4-zip -y  
  sudo apt install php7.4-zip -y  


Linha 64: Linha 51:


  sudo systemctl status apache2  
  sudo systemctl status apache2  
  sudo systemctl restart apache2  
  sudo systemctl restart apache2  
  sudo systemctl start apache2  
  sudo systemctl start apache2  
sudo systemctl stop apache2


sudo systemctl stop apache2
==== Banco de Dados ====
 
=== Banco de Dados ===


  sudo /etc/init.d/mysql start  
  sudo /etc/init.d/mysql start  
  sudo mysql -uroot -p  
  sudo mysql -uroot -p  
  CREATE USER 'rjgs'@'localhost' IDENTIFIED BY 'R0b150nJ03l';  
  CREATE USER 'rjgs'@'localhost' IDENTIFIED BY 'R0b150nJ03l';  
  CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;  
  CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;  
  GRANT ALL PRIVILEGES ON nextcloud.* TO 'rjgs'@'localhost';  
  GRANT ALL PRIVILEGES ON nextcloud.* TO 'rjgs'@'localhost';  
  FLUSH PRIVILEGES;  
  FLUSH PRIVILEGES;  
  quit;  
  quit;  


=== Download ===
==== Download ====


  sudo mkdir .nextcloud/  
  sudo mkdir .nextcloud/  
  cd .nextcloud/  
  cd .nextcloud/  
  sudo wget https://download.nextcloud.com/server/releases/latest.zip  
  sudo wget https://download.nextcloud.com/server/releases/latest.zip  
  unzip latest.zip  
  unzip latest.zip  
  sudo cp -vur nextcloud /var/www  
  sudo cp -vur nextcloud /var/www  
  sudo chown -R www-data:www-data /var/www/html/nextcloud/config/  
  sudo chown -R www-data:www-data /var/www/html/nextcloud/config/  
  sudo chmod -R 770 /var/www/html/nextcloud/config/  
  sudo chmod -R 770 /var/www/html/nextcloud/config/  
  sudo chown -R www-data:www-data nextcloud/  
  sudo chown -R www-data:www-data nextcloud/  
  sudo chmod -R 775 nextcloud/  
  sudo chmod -R 775 nextcloud/  


=== Via Snap ==
=== Via Snap ===


=== Instalação ===
==== Instalação ====


Atualiza:
Atualiza:


  sudo apt update  
  sudo apt update  
  apt list --upgradable  
  apt list --upgradable  
  sudo apt upgrade -y  
  sudo apt upgrade -y  



Edição atual tal como às 19h52min de 27 de agosto de 2024

NextCloud[editar | editar código-fonte]

NextCloud Client[editar | editar código-fonte]

Para instalar o client do Nextcloud você deve recorrer ao site oficial da empresa.

https://nextcloud.com/install/

Escolha o instalador conforme seu Sistema Operacional.

NextCloud Server[editar | editar código-fonte]

Via APT[editar | editar código-fonte]

Atualiza:

sudo apt update 
apt list --upgradable 
sudo apt upgrade -y 

Instalando o Vim

sudo apt install vim -y 

Instalando o zip e unzip

sudo apt install zip unzip -y 

Trocando o HOSTNAME do Server.

echo "nextcloud" | tee /etc/hostname 

Instalando os pacotes necessários.

sudo apt install apache2 -y 
sudo apt install mariadb-server -y 
sudo apt install libapache2-mod-php7.4 -y 
sudo apt install php7.4-gd -y 
sudo apt install php7.4-mysql -y 
sudo apt install php7.4-curl -y 
sudo apt install php7.4-mbstring -y 
sudo apt install php7.4-intl -y 
sudo apt install php7.4-gmp -y 
sudo apt install php7.4-bcmath -y 
sudo apt install php-imagick -y 
sudo apt install php7.4-xml -y 
sudo apt install php7.4-zip -y 

Operação do Daemon

sudo systemctl status apache2 
sudo systemctl restart apache2 
sudo systemctl start apache2 
sudo systemctl stop apache2

Banco de Dados[editar | editar código-fonte]

sudo /etc/init.d/mysql start 
sudo mysql -uroot -p 
CREATE USER 'rjgs'@'localhost' IDENTIFIED BY 'R0b150nJ03l'; 
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; 
GRANT ALL PRIVILEGES ON nextcloud.* TO 'rjgs'@'localhost'; 
FLUSH PRIVILEGES; 
quit; 

Download[editar | editar código-fonte]

sudo mkdir .nextcloud/ 
cd .nextcloud/ 
sudo wget https://download.nextcloud.com/server/releases/latest.zip 
unzip latest.zip 
sudo cp -vur nextcloud /var/www 
sudo chown -R www-data:www-data /var/www/html/nextcloud/config/ 
sudo chmod -R 770 /var/www/html/nextcloud/config/ 
sudo chown -R www-data:www-data nextcloud/ 
sudo chmod -R 775 nextcloud/ 

Via Snap[editar | editar código-fonte]

Instalação[editar | editar código-fonte]

Atualiza:

sudo apt update 
apt list --upgradable 
sudo apt upgrade -y 

Instalando o suporte ao snap

sudo apt install snapd -y 

Instalando o Nextcloud

sudo snap install nextcloud 

Após isso basta acessar o servidor, com o IP pelo navegador. Você será direcionado á pagina de login, solicitando que crie seu usuario.

Troubleshooting[editar | editar código-fonte]

Erro no primeiro acesso[editar | editar código-fonte]

Logo no primeiro acesso, depois da instalação,

Acessar através de um domínio inseguro

Por favor contacte seu administrador. Se você for o administrador, edite a configuração "trusted_domains" em config/config.php como o exemplo em config.sample.php.

Mais informações de como configurar isso podem ser encontradas na documentação.

Como diz no aviso, você deve editar o arquivo *config/config.php* que estará na pasta de instalação do Nextcloud tendo sua localização dependendo da forma que foi instalado.

vim config/config.php

Neste arquivo, inclua o ip

'trusted_domains' =>
   [
    'demo.example.org',
    '10.111.112.113',
    '[2001:db8::1]'
  ],

ou

'trusted_domains' =>
  array (
    0 => '192.168.0.123', // IP do host que foi instalado o Nextcloud
    1 => 'seudominio.com.br', // Domínio da rede ou DDNS.
  ),

Depois, reinicie o servidor:

sudo reboot


Fonte[editar | editar código-fonte]

  • https:/#/docs.nextcloud.com/server/23/admin_manual/installation/example_ubuntu.html