在CentOS 8上安装Pydio单元格文件共享

时间:2020-02-23 14:39:18  来源:igfitidea点击:

Pydio Cell是一个开源文件共享软件。
它提供文件的同步,从而能够在内部和外部在内部和外部提供各种文档(如文件,图像和视频)的共享和访问。
Pydio可以安装在虚拟机或者一个人的物理计算机上。

Pydio还配备了Linux,Windows和MacoS的本机客户端,也是Android和iOS的移动客户端。
Pydio是其他文件共享工具的替代方案,如删除框和nextCloud。
在本教程中,我们将研究如何在CentOS 8上安装和配置pydio for文件共享。

第1步:更新系统

在开始任何安装Pydio服务器之前,请确保CentOS系统是最新的。
运行以下命令:

sudo dnf -y update
sudo yum -y install vim bash-completion unzip wget

还要确保我们禁用SELinux。
打开selinux配置并从"启用"更改为"禁用",然后保存文件。

sudo vim /etc/selinux/config

如图所示进行更改并保存文件

# This file controls the state of SELinux on the system. 
# SELINUX= can take one of these three values: 
#     enforcing - SELinux security policy is enforced. 
#     permissive - SELinux prints warnings instead of enforcing. 
#     disabled - No SELinux policy is loaded. 
SELINUX=disabled 
# SELINUXTYPE= can take one of these three values: 
#     targeted - Targeted processes are protected, 
#     minimum - Modification of targeted policy. Only selected processes are protected.  
#     mls - Multi Level Security protection. 
SELINUXTYPE=targeted

进行更改后,重新启动系统

sudo reboot

第2步:在CentOS 8上安装MariaDB

要在CentOS 8上安装MariaDB服务器,请运行以下命令:

sudo dnf -y install mariadb-server

完成安装后,使用以下命令启动并启用MariaDB。

sudo systemctl start mariadb
sudo systemctl enable mariadb

接下来,安全MySQL并设置root用户密码。

sudo mysql_secure_installation

如下所述:

Enter current password for root (enter for none): Just press Enter
OK, successfully used password, moving on... 
Setting the root password ensures that nobody can log into the MariaDB 
root user without the proper authorization. 
Set root password? [Y/n] Y 
New password:  New-root-password
Re-enter new password: Re-enter New-root-password
Password updated successfully! 
Reloading privilege tables.. 
... Success! 

By default, a MariaDB installation has an anonymous user, allowing anyone 
to log into MariaDB 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, MariaDB 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... 
... Success! 
- 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 MariaDB 
installation should now be secure. 
Thanks for using MariaDB!

我们需要为pydio创建一个新的用户和数据库。
连接到MySQL并运行显示MySQL命令:

$mysql -u root -p

输入我们上面设置的root密码,然后运行下面的mysql命令以创建pydio用户和数据库。

create database cells;
grant all privileges on cells.* to 'pydiouser'@'localhost' identified by 'Hyman@theitroad';
flush privileges;
exit;

第3步:创建pydio用户

我们需要创建PyDio用户和设置密码。
运行以下命令。

sudo useradd -m pydio
sudo passwd pydio

设置用户的密码后,增加文件描述符限制,如下所示。

sudo ulimit -n 8192

第4步:在CentOS 8上安装Pydio单元格

我们需要将PyDio Cell Biinary安装程序下载到我们的CentOS 8.切换到PyDio用户并运行以下命令。

sudo su - pydio
wget https://download.pydio.com/latest/cells/release/%7Blatest%7D/linux-amd64/pydio-cells-%7Blatest%7D-linux-amd64.zip

使用Unzip命令提取压缩文件。
如果未安装Unzip,请先安装并使用它来提取PyDio Cells Installer。

unzip pydio-cells-{latest}-linux-amd64.zip

第5步:在CentOS 8上安装Pydio单元格

解压缩文件后,将添加另一个名为Celler的文件。
要安装pydio单元格,请运行以下命令。

chmod u+x cells
./cells install

安装将开始,系统将提示我们选择我们喜欢的安装方法。
我选择浏览器安装

Welcome to Pydio Cells Home Edition installation 
Pydio Cells Home Edition will be configured to run on this machine. Make sure to prepare the following data 
- IPs and ports for binding the webserver to outside world 
- MySQL 5.6+ (or MariaDB equivalent) server access 
Pick your installation mode when you are ready. 
✔ Browser-based (requires a browser access)

使用箭头键选择安装类型,然后按Enter键。
接下来,指定使用箭头键侦听的URL和端口

? Internal Url (address that the webserver will listen to, use ip:port or yourdomain.tld:port, without http/https):  
+   Other 
 ▸ <your-server-ip>:8080
   127.0.0.1:8080
   localhost:8080
↓   0.0.0.0:8080

我也选择不使用TLS,但如果我们有FQDN安装,则可以选择TLS。

? Choose TLS activation mode. Please note that you should enable SSL even behind a reverse proxy, as HTTP2 'TLS => Clear' is generally not supported:  
 ▸ Provide paths to certificate/key files 
   Use Let's Encrypt to automagically generate certificate during installation process 
   Generate your own locally trusted certificate (for staging env or if you are behind a reverse proxy) 
   Disable TLS (staging environments only, never recommended!)

确认安装URL,然后单击"enter"以启动PyDIO单元格。
同时继续在浏览器上打开它以继续安装。

Your instance will be accessible at http://<your-server-ip>:8080. If you are behind a reverse proxy or inside a private network, you Jan need to manually set an alternative External URL. Do not change this is you are not sure! 
Use the arrow keys to navigate: ↓ ↑ → ←  
? Setup a different URL for external access:  
 ▸ Use http://<your-server-ip>:8080
   Set another URL

单击"输入要使用的URL的输入时,PyDio单元格应开始,我们应该能够使用指定的URL从浏览器访问。

2017-08-05T08:50:29.684-0400    INFO    pydio.gateway.rest      started 
2017-08-05T08:50:29.979-0400    INFO    Registering /install/events for Polling 
2017-08-05T08:50:29.979-0400    INFO    pydio.rest.install      started 
Activating privacy features... done. 
http://<your-server-ip>:80  
Installation Server is starting ... <your-server-ip>:80 
external URL: http://<your-server-ip>:80 
2017-08-05T08:50:32.180-0400    INFO    pydio.gateway.proxy     Restarting proxy        {"caddyfile": "\n\t\t http://<your-server-ip>:80  {\n\t\t\t root \"/root/.config/pydio/cells/static/install\"\n\t\t\t proxy /install <your-server-ip>:41233\n\t\t \t\n\t\t\t\n\t\t }\n\t "} 
2017-08-05T08:50:32.181-0400    INFO    pydio.gateway.proxy     Restart done 
Opening URL http://<your-server-ip>:8080 in your browser. Please copy/paste it if the browser is not on the same machine.

步骤6:PyDio单元格浏览器安装。

将URL放在浏览器上后,我们应该能够访问PyDio单元格继续设置。
同意pydio单元格术语,然后单击下一步。

在下一个屏幕截图中,提供详细信息以如图所示连接到Pydio数据库,然后单击下一步

在我的Setup数据库详细信息中是:数据库名称:CellsDatabase用户:PyDiouserDatabase密码:Hyman @ OniTora

在下一个窗口中,提供管理员用户详细信息。
还选择默认语言。
点击下一步

在高级设置之后,请单击"立即安装"。
确认设置,然后单击"重新加载"。
然后,我们将看到提示我们登录PyDio单元格的剪辑。
为我们提供管理凭据以登录。

我们将受到Pydio细胞的欢迎。
我们可以启动Pydio巡回赛或者跳过并开始使用它。

要开始上传或者创建新文件和文件夹,请单击"个人文件"或者"公共文件"。

单击"上载"以浏览上传的文件或者文件夹。

第7步:从终端启动Pydio小区

要从终端再次启动PyDio单元格,请运行以下命令:

sudo su - pydio
cd ~/
./cells start &

步骤8:在Ubuntu和其他基于Linux的系统上配置Pydio单元格客户端。

Linux用户可以使用Inbuilt Nautilus文件管理器连接到Pydio。
打开文件并查找"其他位置"

单击"连接到服务器"并提供PyDIO服务器凭据以连接到它。
由于它是WebDAV客户端,连接URL应该像DAV://<你的服务器-IP>:8080/DAV /