GNU/Linux >> Linux Esercitazione >  >> Debian

Come installare Pydio Web File Manager su Debian 9

Pydio è una piattaforma open source per sincronizzare e condividere file online, un’alternativa self-hosted a Google Drive. È scritta principalmente in PHP e Ajax e funziona con Apache o Nginx, PHP e MySQL/MariaDB.

Questa guida installa Pydio Community Edition da sorgente su Debian 9 con stack LAMP.

Requisiti

  • Server fisico, VM o VPS con almeno 2 GB di RAM e Debian 9 aggiornato.
  • Interfaccia di rete con IP statico o DHCP con lease fisso.
  • Accesso root via SSH o utente con sudo.
  • Dominio registrato o locale; in mancanza puoi usare l’IP del server.
  • Server email locale o servizio esterno per le funzioni di registrazione.

Preparazione del sistema

apt update
apt upgrade
hostnamectl set-hostname www.mysharedfiles.com
hostnamectl
cat /etc/hostname
hostname -f
hostname -s
systemctl reboot

Dopo il riavvio, accedi come root e installa le utilità necessarie:

su -
apt install bash-completion zip unzip curl wget imagemagick unoconv
apt install imagemagick unoconv
apt-get install smbclient

Installare Apache e PHP

apt install apache2 libapache2-mod-php7.0 php7.0 php7.0-gd php7.0-opcache php7.0-json php7.0-mbstring php7.0-xml php7.0-cli php7.0-curl php7.0-zip php7.0-xmlrpc php7.0-intl php-imagick php-smbclient
php7.0 -m

Abilita i moduli rewrite e SSL:

a2enmod ssl rewrite
a2ensite default-ssl.conf

Modifica /etc/apache2/sites-enabled/default-ssl.conf e /etc/apache2/sites-enabled/000-default.conf aggiungendo dopo DocumentRoot:

<Directory /var/www/html>
 Options +FollowSymlinks
 AllowOverride All
 Require all granted
</Directory>

Riavvia Apache:

systemctl restart apache2

Configurare il firewall

ufw allow 'WWW Full'
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 22/tcp

Se usi iptables:

apt-get install -y iptables-persistent
iptables -I INPUT -p tcp --destination-port 22 -j ACCEPT
iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT
iptables -I INPUT -p tcp --destination-port 443 -j ACCEPT
netfilter-persistent save
systemctl restart netfilter-persistent
systemctl enable netfilter-persistent.service

Installare MariaDB

apt install mariadb-server mariadb-client php7.0-mysql

Imposta una password per root e rendi sicuro MariaDB:

mysql -h localhost
MariaDB [(none)]> use mysql;
MariaDB [mysql]> update user set plugin='' where user='root';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit
mysql_secure_installation

Rispondi “y” a tutte le domande e imposta una password robusta.

Configurare PHP

cp /etc/php/7.0/apache2/php.ini{,.backup}
nano /etc/php/7.0/apache2/php.ini

Modifica:

file_uploads = On
memory_limit = 128M
post_max_size = 80M
upload_max_filesize = 80M
output_buffering = 0
date.timezone = Europe/London

Aggiungi in fondo al file:

[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

Installa Ioncube:

wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xfz ioncube_loaders_lin_x86-64.tar.gz
cp ioncube/ioncube_loader_lin_7.0.so /usr/lib/php/20151012/
nano /etc/php/7.0/apache2/conf.d/00-ioncube.ini

Aggiungi:

zend_extension=ioncube_loader_lin_7.0.so
systemctl restart apache2

Scaricare e installare Pydio

wget https://download.pydio.com/pub/core/archives/pydio-core-8.0.2.zip
unzip pydio-core-8.0.2.zip
ls
rm /var/www/html/index.html
rm /var/www/html/public/info.php
ls -al pydio-core-8.0.2
cp -rf pydio-core-8.0.2/* /var/www/html/
cp pydio-core-8.0.2/.htaccess /var/www/html/
chown -R www-data:www-data /var/www/html/
ls -al /var/www/html/

Modifica /var/www/html/conf/bootstrap_conf.php impostando la localizzazione desiderata. Crea il database:

mysql -u root -p
MariaDB [(none)]> CREATE DATABASE pydio_db;
MariaDB [(none)]> grant all privileges on pydio_db.* to 'pydio_user'@'localhost' identified by 'mypass123';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit

Apri il browser su https://yourdomain.tld e avvia l’installer. Scegli lingua, titolo applicazione, messaggio di benvenuto, account amministratore e dati del database MySQL. Completa l’installazione e accedi alla dashboard.

Per forzare HTTPS, modifica /var/www/html/public/.htaccess:

# Redirect to HTTPS
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
Debian
  1. Installare Redis Server su Debian 11

  2. Come installare PHP 7.4 / 7.3 / 7.2 / 7.1 su Debian 10 / Debian 9

  3. Come installare MySQL 8.0 / 5.7 su Debian 11 / Debian 10

  4. Come Installare ProFTPD su Debian 8

  5. Come installare MySQL Server su Debian 9

Installare e proteggere MySQL 8 su Debian 10

Come installare Todoman su Debian 11 Server

Come installare e configurare Apache Web Server su Debian 11

Installare FastPanel su Debian 11 in pochi comandi

Come installare I2P su server Debian

Installare Apache Web Server su Debian 11