本文介绍如何在Ubuntu 18.04 LTS系统上安装和配置Pydio文件共享服务器的具体步骤。
简介
Pydio是一个类似Dropbox的文件共享服务器,你可以在数据中心,云实例或在家运行的个人计算机中托管。Pydio提供现代文件同步服务的功能,使你可以保存和共享文档、图片、视频、网站数据。
存储在Pydio服务器上的文件可以从Web界面或Linux、macOS、Windows、Android、iOS的本机客户端访问。
步骤1:安装和配置MariaDB/MySQL数据库服务器
Pydio可以在MySQL/MariaDB、PostgreSQL或SQLite数据库上运行,在本文中,我们将使用MariaDB/MySQL。
安装MariaDB数据库服务器后,为Seafile创建用户和数据库。
首次以root用户身份登录MySQL shell:
$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 48
Server version: 10.3.11-MariaDB-1:10.3.11+maria~bionic-log mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
我们将为每个服务器组件创建一个数据库:
CREATE DATABASE pydio;
创建数据库用户并为创建的数据库授予权限:
CREATE USER 'pydio'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL ON pydio.* TO 'pydio'@'localhost';
通过以pydio用户身份登录数据库来确认访问:
$ mysql -u pydio -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 49
Server version: 10.3.11-MariaDB-1:10.3.11+maria~bionic-log mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SHOW DATABASES;
Database |
pydio |
4 rows in set (0.001 sec)
MariaDB [(none)]> QUIT
Bye
步骤2:安装PHP
使用以下命令安装Pydio所需的PHP和扩展:
sudo apt -y install php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-intl php-opcache
步骤3:安装Postfix SMTP服务器
步骤4:安装Apache Web Server
我们将使用Apache HTTP服务器在Ubuntu 18.04上托管Pydion,使用以下命令安装它:
sudo apt -y install apache2 libapache2-mod-php
在以下两个文件上配置PHP:
sudo vim /etc/php/7.2/apache2/php.ini
sudo vim /etc/php/7.2/cli/php.ini
设置:
upload_max_filesize = 1G
post_max_size = 1G
output_buffering = Off
启用Apache重写模块:
sudo sudo a2enmod rewrite
sudo systemctl restart apache2
步骤5:安装和配置Pydio文件共享服务器
安装apt-transport-https:
sudo apt update
sudo apt -y install apt-transport-https
配置pydio存储库:
echo "deb https://download.pydio.com/pub/linux/debian/ xenial main" | sudo tee /etc/apt/sources.list.d/pydio.list
导入GPG密钥:
wget -qO - https://download.pydio.com/pub/linux/debian/key/pubkey | sudo apt-key add -
更新包列表并安装Pydio:
sudo apt update
sudo apt -y install pydio pydio-all php-xml
安装将把Pydio Apache配置文件放在/etc/apache2/conf-enabled/pydio.conf下。
安装后重新启动Apache:
sudo systemctl restart apache2
至此,在Ubuntu 18.04 LTS系统上安装成功Pydio文件共享服务器了。
步骤6:访问Pydio文件共享服务器Web界面
访问你的Pydio文件共享服务器地址以完成安装,URL为http://[ServerName|IPAddress]/pydio。
确认所有Checks返回OK并单击继续安装PYDIO:
单击启动向导以开始Web设置:
设置应用程序名称和欢迎消息:
设置管理员用户帐户:
配置数据库连接详细信息并单击TEST DB CONNECTION:
设置服务器URL并安装Pydio:
完成后,使用创建的用户名和密码登录Pydio:
成功登陆到Pydio管理页面:
在Pydio管理页面中上传和管理我的文件下的文件:
到这里,我们安装和配置Pydio的工作已经完成了。
相关主题