#!/bin/bash # if [[ $HOME == "" ]]; then export HOME=/root fi # ------------------------------------------- # Vars # ------------------------------------------- SEAFILE_ADMIN=ice@qq.com SEAFILE_SERVER_USER=seafile SEAFILE_SERVER_HOME=/opt/seafile IP_OR_DOMAIN=127.0.0.1 SEAFILE_VERSION=7.1.0 TIME_ZONE=Asia/Shanghai FILE_SERVER_PACKAGE=seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz INSTALLPATH=${SEAFILE_SERVER_HOME}/seafile-server-${SEAFILE_VERSION}/ # ------------------------------------------- # Additional requirements # ------------------------------------------- # apt-get update # apt-get install -y python3 python3-setuptools python3-pip python3-ldap memcached openjdk-8-jre \ # libmemcached-dev libreoffice-script-provider-python libreoffice pwgen curl nginx # pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy psd-tools \ # django-pylibmc django-simple-captcha service memcached start rm /etc/nginx/sites-enabled/* cp /root/seafile.conf /etc/nginx/sites-available/seafile.conf ln -sf /etc/nginx/sites-available/seafile.conf /etc/nginx/sites-enabled/seafile.conf service nginx restart # ------------------------------------------- # MariaDB # ------------------------------------------- if [[ -f "/root/.my.cnf" ]] ; then echo "MariaDB installed before, skip this part" SQLROOTPW=`sed -n 's/password=//p' /root/.my.cnf` else DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server service mysql restart SQLROOTPW="phea8Mie" mysqladmin -u root password $SQLROOTPW cat > /root/.my.cnf < /opt/seafile.my.cnf <> ${DEST_SETTINGS_PY} < ${TOPDIR}/aio_seafile-server.log<