Pydio Cells còn được gọi là Pydio là một ứng dụng chia sẻ và đồng bộ hóa tệp nguồn mở được viết bằng ngôn ngữ Golang. Nó được chạy trên máy chủ hoặc đám mây và được sử dụng để chia sẻ tệp với máy khách. Đây là một công cụ chia sẻ tài liệu và cộng tác tự lưu trữ cho phép bạn chia sẻ và truy cập nhiều tài liệu khác nhau như tệp, hình ảnh và video từ bất kỳ đâu bằng ứng dụng di động, phần mềm máy tính để bàn hoặc trình duyệt web. Nó cung cấp các máy khách gốc cho Linux, Windows và macOS và máy khách di động cho Android và iOS.
Hướng dẫn này sẽ giải thích cách cài đặt ứng dụng chia sẻ tệp Pydio trên Ubuntu 22.04.
Sau khi cài đặt máy chủ MariaDB, bạn có thể bảo mật cài đặt MariaDB bằng cách sử dụng lệnh sau lệnh:
Tập lệnh này sẽ đặt mật khẩu gốc, xóa người dùng ẩn danh, không cho phép đăng nhập gốc từ xa và xóa cơ sở dữ liệu thử nghiệm như hiển thị bên dưới:
Tiếp theo, đăng nhập vào MariaDB với tư cách là gốc người dùng:
Sau khi đăng nhập, hãy tạo cơ sở dữ liệu và người dùng bằng lệnh sau:
Tiếp theo, cấp tất cả các quyền cho Pydio bằng lệnh sau lệnh:
Tiếp theo, xóa các đặc quyền và thoát khỏi shell MariaDB bằng lệnh sau:
Bạn có thể tải xuống phiên bản mới nhất của Pydio cells bằng lệnh sau:
Sau khi tải xuống hoàn tất, hãy đặt quyền thích hợp cho tệp đã tải xuống và liên kết tệp đó với cổng HTTP bằng lệnh sau:
Tiếp theo, hãy xác minh phiên bản Pydio cells bằng lệnh lệnh sau:
Bạn sẽ nhận được kết quả sau:
Bạn sẽ được yêu cầu chọn các loại cài đặt khác nhau.
Chọn cài đặt dựa trên trình duyệt và nhấn phím Enter. Sau khi Pydio Cells được cấu hình, bạn sẽ nhận được kết quả sau:
Tại thời điểm này, Pydio Cells đã được cài đặt và cấu hình. Bây giờ bạn có thể tiến hành bước tiếp theo.
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22389%22%3E%3C/svg%3E
Đồng ý với Thỏa thuận cấp phép và nhấp vào nút TIẾP THEO. Bạn sẽ thấy trang cấu hình cơ sở dữ liệu.
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22385%22%3E%3C/svg%3E
Cung cấp cấu hình cơ sở dữ liệu của bạn và nhấp vào nút TIẾP THEO. Bạn sẽ thấy trang tạo người dùng quản trị:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22402%22%3E%3C/svg%3E
Cung cấp tên người dùng quản trị, mật khẩu và nhấp vào nút TIẾP THEO. Bạn sẽ thấy trang sau:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22387%22%3E%3C/svg%3E
Bây giờ, hãy nhấp vào nút CÀI ĐẶT NGAY. Bạn sẽ thấy trang đăng nhập Pydio Cells:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22368%22%3E%3C/svg%3E
Cung cấp tên người dùng quản trị, mật khẩu và nhấp vào nút ENTER. Bạn sẽ thấy bảng điều khiển Pydio trên trang sau:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22369%22%3E%3C/svg%3E
Thêm các dòng sau:
Lưu và đóng tệp, sau đó tải lại daemon systemd để áp dụng thay đổi:
Tiếp theo, khởi động và kích hoạt dịch vụ Pydio bằng lệnh sau:
Bạn cũng có thể kiểm tra trạng thái Pydio bằng lệnh sau lệnh:
Bạn sẽ nhận được kết quả đầu ra sau:
Bây giờ bạn có thể truy cập bảng điều khiển Pydio Cells bằng URL https://your-server-ip:8080
Hướng dẫn này sẽ giải thích cách cài đặt ứng dụng chia sẻ tệp Pydio trên Ubuntu 22.04.
Điều kiện tiên quyết
- Máy chủ chạy Ubuntu 22.04.
- Mật khẩu gốc được định cấu hình trên máy chủ.
Cài đặt và định cấu hình MariaDB
Pydio sử dụng MariaDB để lưu trữ dữ liệu của mình, vì vậy bạn phải cài đặt máy chủ cơ sở dữ liệu MariaDB trên máy chủ của mình. Bạn có thể cài đặt bằng cách chạy lệnh sau:
Mã:
apt install mariadb-server -y
Mã:
mysql_secure_installation
Mã:
Set root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
Mã:
mysql -u root -p
Mã:
CREATE DATABASE pydiodb;
CREATE USER 'pydiodb'@'localhost' IDENTIFIED BY 'password';
Mã:
GRANT ALL PRIVILEGES ON pydiodb.* to 'pydiouser'@'localhost';
Mã:
FLUSH PRIVILEGES;
EXIT;
Cài đặt Pydio Cells trên Ubuntu 22.04
Theo mặc định, gói Pydio không có sẵn trong Ubuntu Kho lưu trữ 22.04. Vì vậy, bạn sẽ cần tải xuống từ trang web chính thức của họ.Bạn có thể tải xuống phiên bản mới nhất của Pydio cells bằng lệnh sau:
Mã:
distribId=cells
wget -O /usr/bin/cells https://download.pydio.com/latest/${distribId}/release/{latest}/linux-amd64/${distribId}
Mã:
chmod +x /usr/bin/cells
setcap 'cap_net_bind_service=+ep' /usr/bin/cells
Mã:
cells version
Mã:
Pydio Cells Home Edition Version: 4.0.5 Built: 01 Dec 22 04:24 +0000 Git commit: 406762a4b5bff7b60189291ad4ee16c69a94ecd7 OS/Arch: linux/amd64 Go version: go1.19.3
Cấu hình ô Pydio
Tiếp theo, cấu hình ô Pydio bằng lệnh sau lệnh:
Mã:
cells configure
Mã:
Welcome to Pydio Cells Home Edition installation
Pydio Cells Home Edition (v4.0.5) will be configured to run on this machine.
Make sure to prepare access and credentials to a MySQL 5.6+ (or MariaDB equivalent) server.
Pick your installation mode when you are ready.
? Browser-based (requires a browser access)
Mã:
Use the arrow keys to navigate: ↓ ↑ → ←
? Installation mode: ? Browser-based (requires a browser access) Command line (performed in this terminal)
? Browser-based (requires a browser access)
Installation Server is starting...
Listening to: https://0.0.0.0:8080
2022-12-13T05:43:12.641Z INFO pydio.rest.config starting {"service": "pydio.rest.config", "hook router to": "/a/config"}
2022-12-13T05:43:12.659Z INFO pydio.rest.install starting {"service": "pydio.rest.install", "hook router to": "/a/install"}
Open a browser window to: [https://0.0.0.0:8080]
2022-12-13T05:43:14.741Z INFO pydio.server.caddy ? Created a new local CA at "rootCA.pem" ????
2022-12-13T05:43:14.858Z INFO pydio.server.caddy ? Created a new certificate valid for the following names ????
2022-12-13T05:43:14.858Z INFO pydio.server.caddy - "127.0.0.1"
2022-12-13T05:43:14.858Z INFO pydio.server.caddy - "139.84.138.121"
2022-12-13T05:43:14.859Z INFO pydio.server.caddy - "localhost"
2022-12-13T05:43:14.859Z INFO pydio.server.caddy ? The certificate is at "5b92168f4e3239411477f1f5f42539f4.pem" and the key at "5b92168f4e3239411477f1f5f42539f4-key.pem"
2022-12-13T05:43:14.859Z INFO pydio.server.caddy
2022-12-13T05:43:14.859Z INFO pydio.server.caddy
2022-12-13T05:43:14.859Z INFO pydio.server.caddy ???? If you are behind a reverse proxy, you can either install the RootCA on the proxy machine trust store, or configure your proxy to `insecure_skip_verify` for pointing to Cells.
2022-12-13T05:43:14.860Z INFO pydio.server.caddy ???? If you are developing locally, you may install the RootCA in your system trust store to see a green light in your browser!
2022-12-13T05:43:14.860Z INFO pydio.server.caddy ???? To easily install the RootCA in your trust store, use https://github.com/FiloSottile/mkcert. Set the $CAROOT environment variable to the rootCA folder then use 'mkcert -install'
2022-12-13T05:43:14.860Z INFO pydio.server.caddy
2022-12-13T05:43:14.862Z WARN pydio.server.caddy admin - admin endpoint disabled
2022-12-13T05:43:14.862Z INFO pydio.server.caddy tls.cache.maintenance - started background certificate maintenance{"cache": "0xc0002bdab0"}
2022-12-13T05:43:14.863Z INFO pydio.rest.install ready
2022-12-13T05:43:14.864Z INFO pydio.web.install ready
2022-12-13T05:43:14.865Z INFO pydio.rest.config ready
2022-12-13T05:43:14.865Z WARN pydio.server.caddy tls - stapling OCSP{"error": "no OCSP stapling for [localhost 127.0.0.1 139.84.138.121]: no OCSP server specified in certificate"}
2022-12-13T05:43:14.865Z WARN pydio.server.caddy http - automatic HTTP->HTTPS redirects are disabled{"server_name": "srv0"}
2022-12-13T05:43:14.866Z INFO pydio.server.caddy autosaved config (load with --resume flag) - {"file": "/root/.config/pydio/cells/caddy/autosave.json"}
2022-12-13T05:43:14.866Z INFO pydio.server.caddy tls - cleaning storage unit{"description": "FileStorage:/root/.config/pydio/cells/caddy"}
2022-12-13T05:43:14.866Z INFO pydio.server.caddy tls - finished cleaning storage units
Truy cập Giao diện Web Pydio Cells
Bây giờ bạn có thể truy cập Pydio Cells bằng URL Bạn sẽ thấy trang Thỏa thuận cấp phép Pydio Cells:data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22389%22%3E%3C/svg%3E
Đồng ý với Thỏa thuận cấp phép và nhấp vào nút TIẾP THEO. Bạn sẽ thấy trang cấu hình cơ sở dữ liệu.
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22385%22%3E%3C/svg%3E
Cung cấp cấu hình cơ sở dữ liệu của bạn và nhấp vào nút TIẾP THEO. Bạn sẽ thấy trang tạo người dùng quản trị:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22402%22%3E%3C/svg%3E
Cung cấp tên người dùng quản trị, mật khẩu và nhấp vào nút TIẾP THEO. Bạn sẽ thấy trang sau:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22387%22%3E%3C/svg%3E
Bây giờ, hãy nhấp vào nút CÀI ĐẶT NGAY. Bạn sẽ thấy trang đăng nhập Pydio Cells:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22368%22%3E%3C/svg%3E
Cung cấp tên người dùng quản trị, mật khẩu và nhấp vào nút ENTER. Bạn sẽ thấy bảng điều khiển Pydio trên trang sau:
data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22750%22%20height=%22369%22%3E%3C/svg%3E
Tạo tệp dịch vụ Systemd cho Pydio Cells
Tiếp theo, bạn sẽ cần tạo một tệp dịch vụ systemd để quản lý dịch vụ Pydio. Trước tiên, nhấn CTRL+C để dừng dịch vụ Pydio, sau đó tạo một tệp dịch vụ systemd bằng lệnh sau:
Mã:
nano /etc/systemd/system/cells.service
Mã:
[Unit]
Description=Pydio Cells
Documentation=https://pydio.com
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/bin/cells
[Service]
User=root
Group=root
PermissionsStartOnly=true
AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/cells start
Restart=on-failure
StandardOutput=journal
StandardError=inherit
LimitNOFILE=65536
TimeoutStopSec=5
KillSignal=INT
SendSIGKILL=yes
SuccessExitStatus=0
WorkingDirectory=/root
[Install]
WantedBy=multi-user.target
Mã:
systemctl daemon-reload
Mã:
systemctl enable cells
systemctl start cells
Mã:
systemctl status cells
Mã:
? cells.service - Pydio Cells Loaded: loaded (/etc/systemd/system/cells.service; disabled; vendor preset: enabled) Active: active (running) since Sat 2022-12-13 11:34:24 UTC; 6s ago Docs: https://pydio.com Main PID: 25764 (cells) Tasks: 119 (limit: 2341) Memory: 421.6M CPU: 4.114s CGroup: /system.slice/cells.service ??25764 /usr/bin/cells start ??25769 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.jobs$ ??25775 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.search$ ??25781 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.gateway.websocket$ ??25783 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.pydiods1$ ??25787 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.personal$ ??25790 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.cellsdata$ ??25802 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.versions$ ??25805 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.sync.thumbnail> ??25816 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.tasks$ ??25819 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.objects.local1$ ??25847 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.pydiods1$ ??25848 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.personal$ ??25849 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.cellsdat> ??25850 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.versions$ ??25851 /usr/bin/cells start --fork --config local --registry grpc://:8000 --broker grpc://:8003 ^pydio.grpc.data.index.thumbnai>
Dec 13 12:34:29 ubuntu2204 cells[25764]: 2022-12-13T11:34:29.294Z INFO pydio.test.objects Started
Dec 13 12:34:29 ubuntu2204 cells[25764]: 2022-12-13T11:34:29.307Z INFO pydio.gateway.grpc Activating self-signed configura>
Dec 13 12:34:29 ubuntu2204 cells[25764]: 2022-12-13T11:34:29.308Z INFO pydio.gateway.grpc Started
Dec 13 12:34:30 ubuntu2204 cells[25764]: 2022-12-13T11:34:30.191Z INFO pydio.grpc.data.index.pydiods1 Warning: no private >
Dec 13 12:34:30 ubuntu2204 cells[25764]: 2022-12-13T11:34:30.194Z INFO pydio.grpc.data.index.personal Warning: no private >
Dec 13 12:34:30 ubuntu2204 cells[25764]: 2022-12-13T11:34:30.195Z INFO pydio.grpc.data.index.cellsdata Warning: no private>
Dec 13 12:34:30 ubuntu2204 cells[25764]: 2022-12-13T11:34:30.204Z INFO pydio.grpc.data.index.thumbnails Warning: no privat>
Dec 13 12:34:30 ubuntu2204 cells[25764]: 2022-12-13T11:34:30.212Z INFO pydio.grpc.data.index.versions Warning: no private >
Dec 13 12:34:30 ubuntu2204 cells[25764]: 2022-12-13T11:34:30.326Z INFO pydio.gateway.proxy Restarting proxy {"caddy>