Cloud

pydio 설치 방법 (centos 8.4)

DaehanCNI 2021. 11. 27. 20:03

오늘은 개인용 cloud package 인 pydio 설치 방법에 대해 알아보도록 하겠습니다. 

 

System Requirements

  • CPU/Memory: 4GB RAM, 2 CPU
  • Storage: 100GB SSD hard drive
  • Operating System:
    • CentOS, RHEL, Scientific Linux (6, 7, 8).
    • An admin user with sudo rights that can connect to the server via SSH
    • Note: The present guide uses a CentOS 7 server. You might have to adapt some commands if you use a different version or flavour.
  • Networking:
    • One Network Interface Controller connected to the internet
    • A registered domain that points toward the public IP of your server: if you already know your IP address, it is a good idea to already add a A Record in your provider DNS so that the record has been already propagated when we need it.

 

시스템 업데이트

sudo yum update

 

 - 사용자 생성 및 환경 변수 설정

# Create pydio user with a home directory
sudo useradd -m -s /bin/bash pydio

# Create necessary folders
sudo mkdir -p /opt/pydio/bin /var/cells/certs
sudo chown -R pydio: /opt/pydio /var/cells

# Add system-wide ENV var
sudo tee -a /etc/profile.d/cells-env.sh << EOF
export CELLS_WORKING_DIR=/var/cells
export CADDYPATH=/var/cells/certs
EOF
sudo chmod 0755 /etc/profile.d/cells-env.sh

 

 - pydio 사용자 환경 변수 설정

sysadmin@server:~$ sudo su - pydio 
pydio@server:~$ echo $CELLS_WORKING_DIR
/var/cells
pydio@server:~$ exit

 

Database 설치

# Install and start the server
sudo yum install MariaDB-server
sudo systemctl enable mariadb
sudo systemctl start mariadb
# Run the script to secure your install
sudo mysql_secure_installation

※ mysql_secure_installation 을 실행하기 전에 database의 root 암호를 설정하셔야 합니다. 

 

 - database 생성 및 사용자 생성

# Open MySQL CLI to create your database and a dedicated user
sudo mysql -u root -p
CREATE DATABASE cells;
CREATE USER 'pydio'@'localhost' IDENTIFIED BY 'cells';
GRANT ALL PRIVILEGES ON cells.* to 'pydio'@'localhost';
FLUSH PRIVILEGES;
exit

 

 pydio package 설치

# As pydio user
sudo su - pydio 

# Download correct binary
distribId=cells 
# or for Cells Enterprise
# distribId=cells-enterprise 
wget -O /opt/pydio/bin/cells https://download.pydio.com/latest/${distribId}/release/{latest}/linux-amd64/${distribId}

# Make it executable
chmod a+x /opt/pydio/bin/cells
exit

# As sysadmin user 
# Add permissions to bind to default HTTP ports
sudo setcap 'cap_net_bind_service=+ep' /opt/pydio/bin/cells

# Declare the cells commands system wide
sudo ln -s /opt/pydio/bin/cells /usr/local/bin/cells

 

 - version 확인 방법

sudo su - pydio 
cells version

 

Configuration

sudo su - pydio 
cells configure

※ Web을 통하여 http://0.0.0.0:8080 접속 후, Database 접속 정보 및 로그인 사용자 정보를 설정합니다. 

 

 - pydio 시작 방법

sudo su - pydio 
cells start

 

방화벽 및 보완

 

 - firewall 설정 방법

sudo firewall-cmd --add-port=8080/tcp
# Open permanently standard HTTP ports on Firewall
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https

 

자동 실행 

 

 - systemd 을 이용한 서비스 설정

sudo vi /etc/systemd/system/cells.service
[Unit]
Description=Pydio Cells
Documentation=https://pydio.com
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/opt/pydio/bin/cells

[Service]
User=pydio
Group=pydio
PermissionsStartOnly=true
AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/opt/pydio/bin/cells start
Restart=on-failure
StandardOutput=journal
StandardError=inherit
LimitNOFILE=65536
TimeoutStopSec=5
KillSignal=INT
SendSIGKILL=yes
SuccessExitStatus=0
WorkingDirectory=/home/pydio

# Add environment variables
Environment=CELLS_WORKING_DIR=/var/cells

[Install]
WantedBy=multi-user.target

 

 - systemd 재 활성화

sudo systemctl daemon-reload
sudo systemctl enable cells
sudo systemctl restart cells

 

 - 동작 확인

# you can check the system logs to insure everything seems OK
sudo journalctl -fu cells -S -1h

 

Troubleshooting 방법

# Pydio file logs
tail -200f /var/cells/logs/pydio.log
# Some of the microservices have their own log files, check:
ls -lsah /var/cells/logs/

# Check systemd files
journalctl -fu cells -S -1h

 

ref:

https://pydio.com/en/docs/kb/deployment/install-cells-centosrhel

 

Install Cells on CentOS/RHEL

Install Cells on CentOS/RHEL Created on 2021/11/12, cells, installation Category:  This guide explains how to configure Cells on an Enterprise-Linux-like system. It contains strongly opinionated choices and best practices. It guides you through the steps

pydio.com