- Modifié
Pré-requis:
Avoir effectué ce tuto: https://mondedie.fr/d/5378
Avoir effectué ce tuto: https://mondedie.fr/d/5399
Information:
Nous allons installer Pydio dans un URI. Je ne traiterai pas des sous-domaines ici. Vous devez avoir effectué le tuto sur la mise en place du SSL (partie URI) pour plus de sécurité. Vous devez également avoir rtorrent/rutorrent en place. En effet, nous allons uniquement installer les dépendances manquantes, la configuration du serveur doit déjà être faite. Je me base sur le fichiers de config pris sur le site de Pydio que j'ai légèrement modifié.
Note: rapportez les bugs et suggestion dans ce topic: http://mondedie.fr/d/5561/1
Introduction:
Pydio (ou anciennement Ajaxplorer), est une alternative à Dropbox/Gdrive/Onedrive.
Vous l'hébergerez sur votre serveur. Par conséquent, vous ne serez limité que par la taille de votre disque dur.
Vous pouvez également visionner certaines vidéos (en fonction du format), de la musique et des photos via Pydio et vous aurez la possibilité de partager son contenu. Enfin Pydio dispose d'une application poue IOS et Android.
Dépendances:
apt-get install php5 php5-gd php5-cli php5-mcrypt php5-mysql mysql-server libreoffice ffmpeg
Nous allons maintenant configurer MYSQL.
mysql_install_db
Et Lancez:
/usr/bin/mysql_secure_installation
Complétez comme ceci:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
... Failed! Not critical, keep moving...
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
Création de la base de donnée MYSQL
mysql -u root -p
CREATE DATABASE pydio;
CREATE USER <votre utilisateur>@localhost;
SET PASSWORD FOR <votre utilisateur>@localhost= PASSWORD("<votre mot de passe>");
GRANT ALL PRIVILEGES ON pydio.* TO <votre utilisateur>@localhost IDENTIFIED BY '<votre mot de passe>';
FLUSH PRIVILEGES;
exit
Mise en place de Pydio:
cd /tmp
wget -O pydio-core-5.2.3.tar.gz http://sourceforge.net/projects/ajaxplorer/files/pydio/stable-channel/5.2.3/pydio-core-5.2.3.tar.gz/download
tar zxvf pydio-core*.tar.gz
mv /tmp/pydio-core-5.2.3 /var/www/pydio
chown -R www-data:www-data /var/www/
Configuration NGINX
nano /etc/php5/fpm/php.ini
Trouvez et remplacez ces lignes par celles-ci:
file_uploads = On
post_max_size = 20G
upload_max_filesize = 20G
max_file_uploads = 20000
Maintenant nous allons créer les fichiers de configurations pour Pydio.
nano /etc/nginx/conf.d/pydio_drop
location = /pydio/conf/ { deny all; }
location = /pydio/data/ { deny all; }
location = /pydio/robots.txt { access_log off; log_not_found off; }
location = /pydio/favicon.ico { access_log off; log_not_found off; }
location ~ /pydio/\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
Maintenant le PHP.
nano /etc/nginx/conf.d/pydio_php
location ~ \.php {
try_files $uri =404;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
Le fichier cache.
nano /etc/nginx/conf.d/pydio_cache
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
Enfin le fichier de configuration de Pydio.
nano /etc/nginx/sites-enabled/rutorrent.conf
Commençons par modifier la ligne client_max_body_size. Il faut la passer à 20G.
client_max_body_size 20G;
Enfin ajoutez entre
server {
...
}
ces lignes.
## Début de config Pydio ##
location /pydio {
root /var/www;
index index.php;
access_log /var/log/nginx/pydio.access.log;
error_log /var/log/nginx/pydio.error.log;
include /etc/nginx/conf.d/pydio_drop;
include /etc/nginx/conf.d/pydio_php;
include /etc/nginx/conf.d/pydio_cache;
satisfy any;
allow all;
}
## Fin de config Pydio ##
Configuration du PHP
nano /etc/php5/fpm/php.ini
trouvez cette ligne
output_buffering = 4096
et remplacez par
output_buffering = Off
service php5-fpm restart
service nginx restart
Pydio affiche une erreur lors du premier démarrage, ignorez la, ce n'est rien de grave (Pour la résoudre il faut être sur apache). Vous pouvez cliquer sur le lien en haut de la page (click here to continue to Pydio) pour lancer l'assistant de configuration. Sélectionnez la langue, créez un compte administrateur. N'oubliez pas de sélectionner MYSQL pour la base de donnée. Enfin, créez un compte utilisateur. Profitez bien avec votre nouveau cloud.
Enjoy =)