Seafile – поднимаем WebDAV over https

Понадобилось поднять WebDAV, который поддерживается сервером Seafile. Правим seafdav.conf # vi /home/www/seafile/conf/seafdav.conf [WEBDAV] enabled = true port = 8080 fastcgi = false share_name = /seafdav В nginx добавляем запись: # vi /etc/nginx/sites-available/seafile location /seafdav {        proxy_pass http://127.0.0.1:8080;        proxy_set_header Host $host;        proxy_set_header X-Real-IP $remote_addr;       …

Continue reading ‘Seafile – поднимаем WebDAV over https’ »

Seafile – очистка сервера от мусора, потерянных библиотек и файлов

Время от времени серверу требуется очистка от мусора, создаем скрипт: # vi /home/user/bin/cleanup-seafile.sh ##### #!/bin/bash # Uncomment the following line if you rather want to run the script manually. # Display usage if the script is not run as root user # if [[ $USER != “root” ]]; then # echo “This script must be …

Continue reading ‘Seafile – очистка сервера от мусора, потерянных библиотек и файлов’ »

Seafile + memcached – увеличиваем производительность

Устанавливаем, если нет, эти компоненты: # yum install memcached libmemcached -y # pip3 install –timeout=3600 pylibmc django-pylibmc # systemctl enable –now memcached У меня они уже были установлены. Добавляем секцию в : # vi seahub_settings.py. CACHES = { ‘default’: { ‘BACKEND’: ‘django_pylibmc.memcached.PyLibMCCache’, ‘LOCATION’: ‘127.0.0.1:11211’, } } Перегружаем сервисы: # systemctl stop seafile # systemctl stop …

Continue reading ‘Seafile + memcached – увеличиваем производительность’ »

Seafile автозагрузка сервиса

Создаем юниты: # vi /etc/systemd/system/seafile.service [Unit] Description=Seafile # add mysql.service or postgresql.service depending on your database to the line below After=network.target [Service] Type=forking ExecStart=/home/www/seafile/seafile-server-latest/seafile.sh start ExecStop=/home/www/seafile/seafile-server-latest/seafile.sh stop LimitNOFILE=infinity User=nginx Group=www-data [Install] WantedBy=multi-user.target # vi /etc/systemd/system/seahub.service [Unit] Description=Seafile hub After=network.target seafile.service [Service] Type=forking # change start to start-fastcgi if you want to run fastcgi ExecStart=/home/www/seafile/seafile-server-latest/seahub.sh start …

Continue reading ‘Seafile автозагрузка сервиса’ »

Seafile – BACKUP и RESTORE

Резервирование Порядок создания резервной копии хранилища. Делаем дамп MySQL Создаем бэкап файловой структуры ccnet-db: содержит информацию о пользователях и группах seafile-db: содержит библиотеку метаданных seahub-db: хранит таблицы используемые для web front end (seahub) —seafile–server–8.0.x # untar from seafile package —seafile–data # seafile configuration and data (if you choose the default) —seahub–data # seahub data —logs …

Continue reading ‘Seafile – BACKUP и RESTORE’ »

Seafile + Nginx + SSL

Nginx # vi /etc/nginx/sites-available/seafile server { listen 80; server_name seafile.tst-amo.net.ua; server_tokens off; location /seafile { rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https } } server { listen 443 ssl http2; server_name seafile.tst-amo.net.ua; server_tokens off; root /home/www/seafile; # Let’sCript include acme.conf; include /etc/nginx/conf.d/hsts.conf; include /etc/nginx/conf.d/ssl.conf; location / { proxy_pass http://127.0.0.1:8999; proxy_set_header Host $host; …

Continue reading ‘Seafile + Nginx + SSL’ »

Seafile – облачное хранилище

Доустановим нужные компоненты: # yum install python3 python3-setuptools python3-pip python3-devel mysql-devel gcc # pip3 install –timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 django-pylibmc django-simple-captcha python3-ldap mysqlclient Скачиваем нужную версию под свою систему. Я буду ставить последнюю свежую версию 8.0.7 64bit на CentOS 7.9 # mkdir /home/www/seafile # chown nginx:www-data /home/svm/seafile # wget https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_8.0.7_x86-64.tar.gz # cd /home/www/seafile …

Continue reading ‘Seafile – облачное хранилище’ »