From cc0b624944143183c4910c4bc900a4f7e5fee134 Mon Sep 17 00:00:00 2001 From: lian Date: Wed, 25 Aug 2021 17:58:27 +0800 Subject: [PATCH] update --- .travis.yml | 15 - Dockerfile | 18 - Makefile | 4 - README.md | 99 +-- db-backup/db-list.txt | 3 - db-backup/db_backup.sh | 20 - db-backup/table-ignore.txt | 11 - images/system-admin-entrance.png | Bin 0 -> 26967 bytes ....1-ubuntu-amd64-http => seafile-7.1_ubuntu | 0 ....0-ubuntu-amd64-http => seafile-8.0_ubuntu | 33 +- seafile-server-7.1-centos-amd64-http | 616 ----------------- seafile-server-8.0-centos-amd64-http | 623 ------------------ seafile-server-centos-7-amd64-http | 623 ------------------ seafile-server-ubuntu-amd64-http | 532 --------------- startssl-certificate-generator | 169 ----- tests/assert.sh | 139 ---- tests/post-deploy_test.sh | 5 - 17 files changed, 32 insertions(+), 2878 deletions(-) delete mode 100644 .travis.yml delete mode 100644 Dockerfile delete mode 100644 Makefile delete mode 100644 db-backup/db-list.txt delete mode 100755 db-backup/db_backup.sh delete mode 100644 db-backup/table-ignore.txt create mode 100644 images/system-admin-entrance.png rename seafile-server-7.1-ubuntu-amd64-http => seafile-7.1_ubuntu (100%) rename seafile-server-8.0-ubuntu-amd64-http => seafile-8.0_ubuntu (94%) delete mode 100644 seafile-server-7.1-centos-amd64-http delete mode 100644 seafile-server-8.0-centos-amd64-http delete mode 100644 seafile-server-centos-7-amd64-http delete mode 100644 seafile-server-ubuntu-amd64-http delete mode 100644 startssl-certificate-generator delete mode 100644 tests/assert.sh delete mode 100755 tests/post-deploy_test.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 95504a5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: required -language: bash - -services: - - docker - -env: - global: - - LANG=en_US.UTF-8 - - LC_ALL=en_US.UTF-8 - -before_install: - - docker run xiez/seafile-pro:v1.2 /bin/bash -c "export TERM=xterm && echo 2 | bash seafile-server-ubuntu-14-04-amd64-http 5.1.10" - -script: make test diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 5bfc1fb..0000000 --- a/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM ubuntu:14.04 -MAINTAINER Zheng Xie - -RUN apt-get update -RUN apt-get install -y sudo wget python-pip python-setuptools python-imaging python-mysqldb python-ldap python-urllib3 \ -openjdk-7-jre memcached python-memcache pwgen curl openssl poppler-utils libpython2.7 libreoffice \ -libreoffice-script-provider-python ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy nginx - -# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start. -RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d - -WORKDIR /root -ADD . /root/ - -ADD https://download.seafile.com/d/6e5297246c/files/?p=/pro/seafile-pro-server_5.1.10_x86-64.tar.gz&dl=1 /opt/seafile-pro-server_5.1.10_x86-64.tar.gz - -# Clean up for smaller image -RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index e5d0fef..0000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -.PHONY: all test clean - -test: - tests/post-deploy_test.sh diff --git a/README.md b/README.md index 632b975..6aabd2e 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,37 @@ -[![Build Status](https://travis-ci.org/haiwen/seafile-server-installer-cn.svg?branch=master)](https://travis-ci.org/haiwen/seafile-server-installer-cn) - # Seafile 安装脚本 -这里的安装脚本可以帮助您快速的安装好 Seafile 服务器,并配置好 MariaDB, Memcached, WebDAV, Ngnix 和开机自动启动脚本。 +一键安装脚本可以帮助您在 Ubuntu 18.04/20.04 系统上快速的安装好 Seafile 服务器,并配置好 MariaDB, Memcached, WebDAV, Ngnix 和开机自动启动脚本。 + ## 使用步骤 -安装干净的 Ubuntu 16.04/18.04 或 CentOS 7/8 系统,并**做好镜像** (如果安装失败需要还原到镜像)。 +安装干净的 Ubuntu 18.04/20.04,并**做好镜像** (如果安装失败需要还原到镜像)。 + +切换成 root 账号 (`sudo -i`) -切换成 root 账号 (sudo -i) ### 获取安装脚本 -- 适用于 Seafile 7.1.x 及以上版本 +适用于 Seafile 8.0.x 及以上版本 - Ubuntu 18.04 (64bit): - ```sh - wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-server-7.1-ubuntu-amd64-http - ``` - - CentOS 8 (64bit): - ```sh - wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-server-7.1-centos-amd64-http - ``` - -- 适用于 Seafile 6.x.x 及以上版本 - - Ubuntu 16.04/18.04 (64bit): - ```sh - wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-server-ubuntu-amd64-http - ``` - - CentOS 7 (64bit): - ```sh - wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-server-centos-7-amd64-http - ``` - -### 运行安装脚本并指定要安装的版本 (例如 6.0.13) - -Ubuntu 16.04/18.04 (64bit): -``` -bash seafile-server-ubuntu-amd64-http 6.0.13 +```sh +wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-8.0_ubuntu ``` -CentOS 7 (64bit): +### 运行安装脚本并指定要安装的版本 (例如 8.0.0) + ``` -bash seafile-server-centos-7-amd64-http 6.0.13 +bash seafile-8.0_ubuntu 8.0.0 ``` 脚本会让您选择要安装的版本, 按照提示进行选择即可: -* 如果要安装专业版, 需要先将下载好的专业版的包 `seafile-pro-server_6.0.13_x86-64.tar.gz` 放到 `/opt/` 目录下 +* 如果要安装专业版, 需要先将下载好的专业版的包 `seafile-pro-server_8.0.0_x86-64.tar.gz` 放到 `/opt/` 目录下 * 如果是安装开源版,安装脚本在执行过程中会检查 `/opt`目录下是否有指定版本号的安装包,如果存在则会安装此包,否则会从 Seafile 网站下载。所以,为了避免因下载失败而导致安装中断,您可以提前下载好安装包放到`/opt/`目录下。 该脚本运行完后会在命令行中打印配置信息和管理员账号密码,请仔细阅读。(您也可以查看安装日志`/opt/seafile/aio_seafile-server.log`),MySQL 的 root 用户密码存储在 `/root/.my.cnf` 中;MySQL 的 seafile 用户密码存储在 `/opt/seafile.my.cnf` 中。 + ### 通过 Web UI 对服务器进行配置 安装完成后,您需要通过 Web UI 服务器进行基本的配置,以便能正常的从网页端进行文件的上传和下载: @@ -62,67 +39,27 @@ bash seafile-server-centos-7-amd64-http 6.0.13 1. 首先在浏览器中输入服务器的地址,并用管理员账号和初始密码登录 2. 点击界面的右上角的头像按钮进入管理员界面 - - ![管理员入口](http://manual-cn.seafile.com/images/system-admin-entrance.png) + ![管理员入口](./images/system-admin-entrance.png) 3. 进入设置页面填写正确的服务器对外的 SERVICE_URL 和 FILE_SERVER_ROOT,比如 - ``` - SERVICE_URL: http://www.myseafile.com - FILE_SERVER_ROOT: 'http://www.myseafile.com/seafhttp' + SERVICE_URL: http://www.your-domain.com + FILE_SERVER_ROOT: http://www.your-domain.com/seafhttp ``` 现在您可以退出管理员界面,并进行基本的测试。关于服务器的配置选项介绍和日常运维可以参考 https://cloud.seafile.com/published/seafile-manual-cn/config/README.md + ### 如果安装脚本出错 如果安装脚本出错,您需要重置虚拟机到干净的镜像。 + ### 启动关闭服务 自动安装脚本会在系统中安装开机自动启动脚本。您也可以使用该脚本来关闭/启动 Seafile 服务,命令如下: -Ubuntu 16.04/18.04: ``` service seafile-server stop service seafile-server start ``` - -CentOS 7/8: -``` -systemctl stop seafile -systemctl stop seahub - -systemctl start seafile -systemctl start seahub -``` - -## 其他高级配置 - -### 备份 mysql - -* 拷贝 `db-backup` 目录到 `/opt/seafile` -* 修改 `db-backup/db_backup.sh` 中的 `USER` `PASSWD` -* 执行 `crontab -e` 并添加内容 `0 1 * * * /opt/seafile/db-backup/db_backup.sh` (每天凌晨1:00进行备份) - -### 配置邮件发送 - -参考 https://cloud.seafile.com/published/seafile-manual-cn/config/sending_email.md - -## 升级和其他问题 - -### 版本升级 - -* 关闭 seafile-server 相关服务 -* 切换为 seafile 用户 -* 下载高版本的安装包到 /opt/seafile 目录,并解压 -* 进入安装包下的 upgrade 目录,执行相关的升级脚本,具体可参考 https://download.seafile.com/published/seafile-manual/upgrade/upgrade.md -* 启动 seafile-server 相关服务 - -### 迁移社区版到专业版 - -* 关闭 seafile-server 相关服务 -* 切换为 seafile 用户 -* 下载专业版安装包到 /opt/seafile 目录,并解压 -* 进入解压好的安装包目录,执行 ./pro/pro.py setup --migrate,具体可参考 https://cloud.seafile.com/published/seafile-manual-cn/deploy_pro/migrate_from_seafile_community_server.md -* 启动 seafile-server 相关服务 diff --git a/db-backup/db-list.txt b/db-backup/db-list.txt deleted file mode 100644 index c462d2e..0000000 --- a/db-backup/db-list.txt +++ /dev/null @@ -1,3 +0,0 @@ -ccnet_db -seafile_db -seahub_db diff --git a/db-backup/db_backup.sh b/db-backup/db_backup.sh deleted file mode 100755 index 781c3e3..0000000 --- a/db-backup/db_backup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -USER=root -PASSWD=aeneinoi -DATE=`date +%Y%m%d%H%M` -IGN_TAB="" - -for ign_tab in `cat table-ignore.txt`; -do - IGN_TAB=${IGN_TAB}" --ignore-table=${ign_tab}" -done - -for DATABASE in `cat db-list.txt`; -do - mysqldump -u${USER} -p${PASSWD} --opt $DATABASE ${IGN_TAB} > $DATABASE-$DATE.sql -done - -# Compress and clean -tar czvf mysql-back-$DATE.tar.gz *.sql -rm -rf *.sql diff --git a/db-backup/table-ignore.txt b/db-backup/table-ignore.txt deleted file mode 100644 index 5826371..0000000 --- a/db-backup/table-ignore.txt +++ /dev/null @@ -1,11 +0,0 @@ -seahub_db.avatar_uploaded -seahub_db.avatar_avatar -seahub_db.avatar_groupavatar -seahub_db.Event -seahub_db.FileAudit -seahub_db.FileUpdate -seahub_db.PermAudit -seahub_db.UserEvent -seahub_db.UserTrafficStat -seahub_db.VirusFile -seahub_db.VirusScanRecord diff --git a/images/system-admin-entrance.png b/images/system-admin-entrance.png new file mode 100644 index 0000000000000000000000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ArrTmX+oM}N{ z)|Vog^@s1pQ?n;3;A~xEHF{O)0$g-Xp`OqXhh2AZa-|^Er8&MU2a?P`wiX7fjJ?DQ z?T~?iH05H8;D)}`e)O3scRLBLHyJS%5%HR>qy2Q1Zc}Mml#lJ5Bj2{ZLKwKJ1pIP(pTazO``&+!xS4?iWL}My)e*CQQfRP)1hY_s1+gv2+5c=5EkmQAF9(zN8*c5s2|G!j7!o(_`l{V zmomTu{phLBQ3AL;FfMy2BjBq5JP8rqkNE91b}Zq`Bm_W{@+Zpj>T=aGW}*KF4QusA literal 0 HcmV?d00001 diff --git a/seafile-server-7.1-ubuntu-amd64-http b/seafile-7.1_ubuntu similarity index 100% rename from seafile-server-7.1-ubuntu-amd64-http rename to seafile-7.1_ubuntu diff --git a/seafile-server-8.0-ubuntu-amd64-http b/seafile-8.0_ubuntu similarity index 94% rename from seafile-server-8.0-ubuntu-amd64-http rename to seafile-8.0_ubuntu index 43e234c..16204b4 100644 --- a/seafile-server-8.0-ubuntu-amd64-http +++ b/seafile-8.0_ubuntu @@ -1,6 +1,6 @@ #!/bin/bash # -# seafile-server-installer/seafile-server-ubuntu-18-04-amd64 +# seafile-server-installer-cn/seafile-8.0_ubuntu # # Copyright 2015, Alexander Jackson # Copyright 2016, Zheng Xie @@ -38,13 +38,13 @@ fi clear cat < /etc/nginx/sites-available/seafile.conf << EOF @@ -187,7 +191,7 @@ server { access_log /var/log/nginx/seahub.access.log seafileformat; error_log /var/log/nginx/seahub.error.log; } - + location /seafhttp { rewrite ^/seafhttp(.*)$ \$1 break; proxy_pass http://127.0.0.1:8082; @@ -361,7 +365,6 @@ mkdir -p ${DEFAULT_CONF_DIR} # Configure Seafile WebDAV Server(SeafDAV) # ------------------------------------------- sed -i 's/enabled = .*/enabled = true/' ${DEFAULT_CONF_DIR}/seafdav.conf -sed -i 's/fastcgi = .*/fastcgi = true/' ${DEFAULT_CONF_DIR}/seafdav.conf sed -i 's/share_name = .*/share_name = \/seafdav/' ${DEFAULT_CONF_DIR}/seafdav.conf # ------------------------------------------- @@ -499,10 +502,8 @@ cat > ${TOPDIR}/aio_seafile-server.log< ${TOPDIR}/aio_seafile-server.log< -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -# - -if [[ $HOME == "" ]]; then - export HOME=/root -fi - -if [[ $SEAFILE_DEBUG != "" ]]; then - set -x -fi -set -e - -if [[ "$#" -ne 1 ]]; then - echo "You must specif Seafile version to install" - echo "Like: $0 7.1.0" - exit 1 -fi - -clear -cat < /dev/null 2>&1 ; -then - echo "Aborting because user ${SEAFILE_SERVER_USER} already exist" ; exit 1 -fi - -# ------------------------------------------- -# Setup permissive selinux -# ------------------------------------------- -# runtime -enforce=`getenforce` -if [[ "${enforce}" != "Disabled" ]]; then - setenforce 0 -fi -# permanently -sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config - -# ------------------------------------------- -# Setup firewall -# ------------------------------------------- -yum install firewalld -y -# https://www.optimox.de/tutorials/linux-allgemein/centos-firewall-konfigurieren-mit-firewalld -systemctl status firewalld &> /dev/null \ -&& for i in ssh http https ; do firewall-cmd --zone=public --add-service=${i} --permanent ; done \ -&& firewall-cmd --reload - -# ------------------------------------------- -# Additional requirements -# ------------------------------------------- -# extra packages for enterprise linux - -yum install epel-release -y - -yum install python3 python3-setuptools python3-pip python3-ldap memcached java-1.8.0-openjdk \ - libmemcached libreoffice-headless libreoffice-pyuno libffi-devel pwgen curl python3-devel gcc gcc-c++ -y - -pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 psd-tools \ - django-pylibmc django-simple-captcha - -# start memcached on system boot -systemctl enable --now memcached - -# ------------------------------------------- -# Install nginx -# ------------------------------------------- -yum install nginx -y -systemctl enable nginx -rm -rf /etc/nginx/conf.d/* - -cat > /etc/nginx/conf.d/seafile.conf << EOF -log_format seafileformat '\$http_x_forwarded_for \$remote_addr [\$time_local] "\$request" \$status \$body_bytes_sent "\$http_referer" "\$http_user_agent" \$upstream_response_time'; - -server { - listen 80; - server_name seafile.example.com; - - proxy_set_header X-Forwarded-For \$remote_addr; - - location / { - proxy_pass http://127.0.0.1:8000; - proxy_set_header Host \$host; - proxy_set_header X-Real-IP \$remote_addr; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host \$server_name; - proxy_set_header X-Forwarded-Proto \$scheme; - proxy_read_timeout 1200s; - - # used for view/edit office file via Office Online Server - client_max_body_size 0; - - access_log /var/log/nginx/seahub.access.log seafileformat; - error_log /var/log/nginx/seahub.error.log; - } - - location /seafhttp { - rewrite ^/seafhttp(.*)$ \$1 break; - proxy_pass http://127.0.0.1:8082; - client_max_body_size 0; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_connect_timeout 36000s; - proxy_read_timeout 36000s; - - access_log /var/log/nginx/seafhttp.access.log seafileformat; - error_log /var/log/nginx/seafhttp.error.log; - } - location /media { - root ${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub; - } - location /seafdav { - proxy_pass http://127.0.0.1:8080/seafdav; - proxy_set_header Host \$host; - proxy_set_header X-Real-IP \$remote_addr; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host \$server_name; - proxy_set_header X-Forwarded-Proto \$scheme; - proxy_read_timeout 1200s; - - client_max_body_size 0; - - access_log /var/log/nginx/seafdav.access.log seafileformat; - error_log /var/log/nginx/seafdav.error.log; - } -} -EOF - -# Create optimized nginx.conf -cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup -cat > /etc/nginx/nginx.conf <<'ENDOFFILE' -user nginx nginx; -worker_processes 4; - -events { - worker_connections 8096; - multi_accept on; - use epoll; -} - -pid /var/run/nginx.pid; -worker_rlimit_nofile 40000; - -http { - server_tokens off; - server_names_hash_bucket_size 128; - client_max_body_size 50M; - include /etc/nginx/mime.types; - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - access_log /var/log/nginx/access.log main; - error_log /var/log/nginx/error.log warn; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - client_body_timeout 12; - client_header_timeout 12; - keepalive_timeout 15; - send_timeout 10; - # Fully disabled gzip compression to mitigate Django BREACH attack: https://www.djangoproject.com/weblog/2013/aug/06/breach-and-django/ - gzip off; - #gzip_vary on; - #gzip_proxied expired no-cache no-store private auth any; - #gzip_comp_level 9; - #gzip_min_length 10240; - #gzip_buffers 16 8k; - #gzip_http_version 1.1; - #gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/xml font/woff2; - #gzip_disable "MSIE [1-6]."; - include /etc/nginx/conf.d/*.conf; -} -ENDOFFILE - -# Fix NGINX worker_processes to number of CPU cores -CPUS=$(cat /proc/cpuinfo | grep processor | wc | awk '{ print $1 }') -eval "sed -i 's/worker_processes.*/worker_processes $CPUS;/g' /etc/nginx/nginx.conf" - -systemctl restart nginx - -# ------------------------------------------- -# MariaDB -# ------------------------------------------- -if [[ -f "/root/.my.cnf" ]] ; -then - echo "MariaDB installed before, skip this part" - SQLROOTPW=`sed -n 's/password=//p' /root/.my.cnf` -else - yum install mariadb-server -y - systemctl start mariadb - systemctl enable mariadb - - SQLROOTPW=$(pwgen) - - mysqladmin -u root password $SQLROOTPW - - cat > /root/.my.cnf < /etc/systemd/system/seafile.service << EOF -[Unit] -Description=Seafile Server -After=network.target remote-fs.target mariadb.service - -[Service] -ExecStart=${SEAFILE_SERVER_HOME}/seafile-server-latest/seafile.sh start -ExecStop=${SEAFILE_SERVER_HOME}/seafile-server-latest/seafile.sh stop -User=${SEAFILE_SERVER_USER} -Group=${SEAFILE_SERVER_USER} -LimitNOFILE=infinity -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable seafile - -cat > /etc/systemd/system/seahub.service << EOF -[Unit] -Description=Seafile Seahub -After=network.target seafile.service - -[Service] -ExecStart=${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub.sh start -ExecStop=${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub.sh stop -User=${SEAFILE_SERVER_USER} -Group=${SEAFILE_SERVER_USER} -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable seahub - -# Seafile restart script -cat > /usr/local/sbin/seafile-server-restart << 'EOF' -#!/bin/bash -for ACTION in stop start ; do - for SERVICE in seafile seahub ; do - systemctl ${ACTION} ${SERVICE} - done -done -EOF -chmod 700 /usr/local/sbin/seafile-server-restart - -# ------------------------------------------- -# Seafile -# ------------------------------------------- -mkdir -p ${SEAFILE_SERVER_HOME}/installed -cd ${SEAFILE_SERVER_HOME} -if ! is_pro && [[ ! -e /opt/${SEAFILE_SERVER_PACKAGE} ]]; then - curl -OL ${SEAFILE_SERVER_PACKAGE_URL} -else - cp /opt/${SEAFILE_SERVER_PACKAGE} . -fi -tar xzf ${SEAFILE_SERVER_PACKAGE} - -mv ${SEAFILE_SERVER_PACKAGE} installed - - -# ------------------------------------------- -# Seafile DB -# ------------------------------------------- -if [[ -f "/opt/seafile.my.cnf" ]] ; -then - echo "MariaDB installed before, skip this part" - SQLSEAFILEPW=`sed -n 's/password=//p' /opt/seafile.my.cnf` -else - SQLSEAFILEPW=$(pwgen) - - cat > /opt/seafile.my.cnf <> ${DEST_SETTINGS_PY} < ${TOPDIR}/aio_seafile-server.log< -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -# - -if [[ $HOME == "" ]]; then - export HOME=/root -fi - -if [[ $SEAFILE_DEBUG != "" ]]; then - set -x -fi -set -e - -if [[ "$#" -ne 1 ]]; then - echo "You must specif Seafile version to install" - echo "Like: $0 8.0.0" - exit 1 -fi - -clear -cat < /dev/null 2>&1 ; -then - echo "Aborting because user ${SEAFILE_SERVER_USER} already exist" ; exit 1 -fi - -# ------------------------------------------- -# Setup permissive selinux -# ------------------------------------------- -# runtime -enforce=`getenforce` -if [[ "${enforce}" != "Disabled" ]]; then - setenforce 0 -fi -# permanently -sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config - -# ------------------------------------------- -# Setup firewall -# ------------------------------------------- -yum install firewalld -y -# https://www.optimox.de/tutorials/linux-allgemein/centos-firewall-konfigurieren-mit-firewalld -systemctl status firewalld &> /dev/null \ -&& for i in ssh http https ; do firewall-cmd --zone=public --add-service=${i} --permanent ; done \ -&& firewall-cmd --reload - -# ------------------------------------------- -# Additional requirements -# ------------------------------------------- -# extra packages for enterprise linux - -yum install epel-release -y - -yum install python3 python3-setuptools python3-pip python3-ldap memcached java-1.8.0-openjdk \ - libmemcached libreoffice-headless libreoffice-pyuno libffi-devel pwgen curl python3-devel mysql-devel gcc gcc-c++ -y - -pip3 install --timeout=3600 django==2.2.* future mysqlclient pymysql Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \ - psd-tools django-pylibmc django-simple-captcha - -# start memcached on system boot -systemctl enable --now memcached - -# ------------------------------------------- -# Install nginx -# ------------------------------------------- -yum install nginx -y -systemctl enable nginx -rm -rf /etc/nginx/conf.d/* - -cat > /etc/nginx/conf.d/seafile.conf << EOF -log_format seafileformat '\$http_x_forwarded_for \$remote_addr [\$time_local] "\$request" \$status \$body_bytes_sent "\$http_referer" "\$http_user_agent" \$upstream_response_time'; - -server { - listen 80; - server_name seafile.example.com; - - proxy_set_header X-Forwarded-For \$remote_addr; - - location / { - proxy_pass http://127.0.0.1:8000; - proxy_set_header Host \$host; - proxy_set_header X-Real-IP \$remote_addr; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host \$server_name; - proxy_set_header X-Forwarded-Proto \$scheme; - proxy_read_timeout 1200s; - - # used for view/edit office file via Office Online Server - client_max_body_size 0; - - access_log /var/log/nginx/seahub.access.log seafileformat; - error_log /var/log/nginx/seahub.error.log; - } - - location /seafhttp { - rewrite ^/seafhttp(.*)$ \$1 break; - proxy_pass http://127.0.0.1:8082; - client_max_body_size 0; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_connect_timeout 36000s; - proxy_read_timeout 36000s; - - access_log /var/log/nginx/seafhttp.access.log seafileformat; - error_log /var/log/nginx/seafhttp.error.log; - } - location /media { - root ${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub; - } - location /seafdav { - proxy_pass http://127.0.0.1:8080/seafdav; - proxy_set_header Host \$host; - proxy_set_header X-Real-IP \$remote_addr; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host \$server_name; - proxy_set_header X-Forwarded-Proto \$scheme; - proxy_read_timeout 1200s; - - client_max_body_size 0; - - access_log /var/log/nginx/seafdav.access.log seafileformat; - error_log /var/log/nginx/seafdav.error.log; - } -} -EOF - -# Create optimized nginx.conf -cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup -cat > /etc/nginx/nginx.conf <<'ENDOFFILE' -user nginx nginx; -worker_processes 4; - -events { - worker_connections 8096; - multi_accept on; - use epoll; -} - -pid /var/run/nginx.pid; -worker_rlimit_nofile 40000; - -http { - server_tokens off; - server_names_hash_bucket_size 128; - client_max_body_size 50M; - include /etc/nginx/mime.types; - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - access_log /var/log/nginx/access.log main; - error_log /var/log/nginx/error.log warn; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - client_body_timeout 12; - client_header_timeout 12; - keepalive_timeout 15; - send_timeout 10; - # Fully disabled gzip compression to mitigate Django BREACH attack: https://www.djangoproject.com/weblog/2013/aug/06/breach-and-django/ - gzip off; - #gzip_vary on; - #gzip_proxied expired no-cache no-store private auth any; - #gzip_comp_level 9; - #gzip_min_length 10240; - #gzip_buffers 16 8k; - #gzip_http_version 1.1; - #gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/xml font/woff2; - #gzip_disable "MSIE [1-6]."; - include /etc/nginx/conf.d/*.conf; -} -ENDOFFILE - -# Fix NGINX worker_processes to number of CPU cores -CPUS=$(cat /proc/cpuinfo | grep processor | wc | awk '{ print $1 }') -eval "sed -i 's/worker_processes.*/worker_processes $CPUS;/g' /etc/nginx/nginx.conf" - -systemctl restart nginx - -# ------------------------------------------- -# MariaDB -# ------------------------------------------- -if [[ -f "/root/.my.cnf" ]] ; -then - echo "MariaDB installed before, skip this part" - SQLROOTPW=`sed -n 's/password=//p' /root/.my.cnf` -else - yum install mariadb-server -y - systemctl start mariadb - systemctl enable mariadb - - SQLROOTPW=$(pwgen) - - mysqladmin -u root password $SQLROOTPW - - cat > /root/.my.cnf < /etc/systemd/system/seafile.service << EOF -[Unit] -Description=Seafile Server -After=network.target remote-fs.target mariadb.service - -[Service] -ExecStart=${SEAFILE_SERVER_HOME}/seafile-server-latest/seafile.sh start -ExecStop=${SEAFILE_SERVER_HOME}/seafile-server-latest/seafile.sh stop -User=${SEAFILE_SERVER_USER} -Group=${SEAFILE_SERVER_USER} -LimitNOFILE=infinity -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable seafile - -cat > /etc/systemd/system/seahub.service << EOF -[Unit] -Description=Seafile Seahub -After=network.target seafile.service - -[Service] -ExecStart=${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub.sh start -ExecStop=${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub.sh stop -User=${SEAFILE_SERVER_USER} -Group=${SEAFILE_SERVER_USER} -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable seahub - -# Seafile restart script -cat > /usr/local/sbin/seafile-server-restart << 'EOF' -#!/bin/bash -for ACTION in stop start ; do - for SERVICE in seafile seahub ; do - systemctl ${ACTION} ${SERVICE} - done -done -EOF -chmod 700 /usr/local/sbin/seafile-server-restart - -# ------------------------------------------- -# Seafile -# ------------------------------------------- -mkdir -p ${SEAFILE_SERVER_HOME}/installed -cd ${SEAFILE_SERVER_HOME} -if ! is_pro && [[ ! -e /opt/${SEAFILE_SERVER_PACKAGE} ]]; then - curl -OL ${SEAFILE_SERVER_PACKAGE_URL} -else - cp /opt/${SEAFILE_SERVER_PACKAGE} . -fi -tar xzf ${SEAFILE_SERVER_PACKAGE} - -mv ${SEAFILE_SERVER_PACKAGE} installed - - -# ------------------------------------------- -# Seafile DB -# ------------------------------------------- -if [[ -f "/opt/seafile.my.cnf" ]] ; -then - echo "MariaDB installed before, skip this part" - SQLSEAFILEPW=`sed -n 's/password=//p' /opt/seafile.my.cnf` -else - SQLSEAFILEPW=$(pwgen) - - cat > /opt/seafile.my.cnf <> ${DEST_SETTINGS_PY} < ${TOPDIR}/aio_seafile-server.log< -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -# - -if [[ $HOME == "" ]]; then - export HOME=/root -fi - -if [[ $SEAFILE_DEBUG != "" ]]; then - set -x -fi -set -e - -if [[ "$#" -ne 1 ]]; then - echo "You must specif Seafile version to install" - echo "Like: $0 7.0.0" - exit 1 -fi - -clear -cat < /dev/null 2>&1 ; -then - echo "Aborting because user ${SEAFILE_SERVER_USER} already exist" ; exit 1 -fi - -# ------------------------------------------- -# Setup permissive selinux -# ------------------------------------------- -# runtime -enforce=`getenforce` -if [[ "${enforce}" != "Disabled" ]]; then - setenforce 0 -fi -# permanently -sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config - -# ------------------------------------------- -# Setup firewall -# ------------------------------------------- -yum install firewalld fail2ban -y -# https://www.optimox.de/tutorials/linux-allgemein/centos-firewall-konfigurieren-mit-firewalld -systemctl status firewalld &> /dev/null \ -&& for i in ssh http https ; do firewall-cmd --zone=public --add-service=${i} --permanent ; done \ -&& firewall-cmd --reload - -# ------------------------------------------- -# Additional requirements -# ------------------------------------------- -# extra packages for enterprise linux - -yum install epel-release -y -yum upgrade -y - -if [[ ${SEAFILE_VERSION} =~ 6\.[0-9]*\.[0-9]* ]]; then - yum install python-setuptools MySQL-python memcached python-urllib3 \ - pwgen curl openssl python-ldap java-1.8.0-openjdk poppler-utils libreoffice python-requests \ - libreoffice-headless libreoffice-pyuno wqy-microhei-fonts wqy-zenhei-fonts wqy-unibit-fonts \ - gcc libffi-devel python-devel openssl-devel libmemcached libmemcached-devel python2-pip -y - - pip install pylibmc==1.6.0 django-pylibmc==0.6.1 - pip install --timeout=3600 Pillow==4.3.0 - pip install psd-tools==1.4 -else - yum install python-setuptools MySQL-python memcached python-urllib3 \ - pwgen curl openssl python-ldap java-1.8.0-openjdk poppler-utils libreoffice \ - libreoffice-headless libreoffice-pyuno wqy-microhei-fonts wqy-zenhei-fonts wqy-unibit-fonts \ - libffi-devel openssl-devel libmemcached -y -fi - -# start memcached on system boot -systemctl enable --now memcached - -# ------------------------------------------- -# Install nginx -# ------------------------------------------- -yum install nginx -y -systemctl enable nginx -rm -rf /etc/nginx/conf.d/* - -cat > /etc/nginx/conf.d/seafile.conf << EOF -log_format seafileformat '\$http_x_forwarded_for \$remote_addr [\$time_local] "\$request" \$status \$body_bytes_sent "\$http_referer" "\$http_user_agent" \$upstream_response_time'; - -server { - listen 80; - server_name seafile.example.com; - - proxy_set_header X-Forwarded-For \$remote_addr; - - location / { - proxy_pass http://127.0.0.1:8000; - proxy_set_header Host \$host; - proxy_set_header X-Real-IP \$remote_addr; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host \$server_name; - proxy_set_header X-Forwarded-Proto \$scheme; - proxy_read_timeout 1200s; - - # used for view/edit office file via Office Online Server - client_max_body_size 0; - - access_log /var/log/nginx/seahub.access.log seafileformat; - error_log /var/log/nginx/seahub.error.log; - } - - location /seafhttp { - rewrite ^/seafhttp(.*)$ \$1 break; - proxy_pass http://127.0.0.1:8082; - client_max_body_size 0; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_connect_timeout 36000s; - proxy_read_timeout 36000s; - - access_log /var/log/nginx/seafhttp.access.log seafileformat; - error_log /var/log/nginx/seafhttp.error.log; - } - location /media { - root ${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub; - } - location /seafdav { - fastcgi_pass 127.0.0.1:8080; - fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; - fastcgi_param PATH_INFO \$fastcgi_script_name; - fastcgi_param SERVER_PROTOCOL \$server_protocol; - fastcgi_param QUERY_STRING \$query_string; - fastcgi_param REQUEST_METHOD \$request_method; - fastcgi_param CONTENT_TYPE \$content_type; - fastcgi_param CONTENT_LENGTH \$content_length; - fastcgi_param SERVER_ADDR \$server_addr; - fastcgi_param SERVER_PORT \$server_port; - fastcgi_param SERVER_NAME \$server_name; - fastcgi_param REMOTE_ADDR \$remote_addr; - - client_max_body_size 0; - - access_log /var/log/nginx/seafdav.access.log seafileformat; - error_log /var/log/nginx/seafdav.error.log; - } -} -EOF - -# Create optimized nginx.conf -cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup -cat > /etc/nginx/nginx.conf <<'ENDOFFILE' -user nginx nginx; -worker_processes 4; - -events { - worker_connections 8096; - multi_accept on; - use epoll; -} - -pid /var/run/nginx.pid; -worker_rlimit_nofile 40000; - -http { - server_tokens off; - server_names_hash_bucket_size 128; - client_max_body_size 50M; - include /etc/nginx/mime.types; - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - access_log /var/log/nginx/access.log main; - error_log /var/log/nginx/error.log warn; - sendfile on; - tcp_nopush on; - tcp_nodelay on; - client_body_timeout 12; - client_header_timeout 12; - keepalive_timeout 15; - send_timeout 10; - # Fully disabled gzip compression to mitigate Django BREACH attack: https://www.djangoproject.com/weblog/2013/aug/06/breach-and-django/ - gzip off; - #gzip_vary on; - #gzip_proxied expired no-cache no-store private auth any; - #gzip_comp_level 9; - #gzip_min_length 10240; - #gzip_buffers 16 8k; - #gzip_http_version 1.1; - #gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/xml font/woff2; - #gzip_disable "MSIE [1-6]."; - include /etc/nginx/conf.d/*.conf; -} -ENDOFFILE - -# Fix NGINX worker_processes to number of CPU cores -CPUS=$(cat /proc/cpuinfo | grep processor | wc | awk '{ print $1 }') -eval "sed -i 's/worker_processes.*/worker_processes $CPUS;/g' /etc/nginx/nginx.conf" - -systemctl restart nginx - -# ------------------------------------------- -# MariaDB -# ------------------------------------------- -if [[ -f "/root/.my.cnf" ]] ; -then - echo "MariaDB installed before, skip this part" - SQLROOTPW=`sed -n 's/password=//p' /root/.my.cnf` -else - yum install mariadb-server -y - systemctl start mariadb - systemctl enable mariadb - - SQLROOTPW=$(pwgen) - - mysqladmin -u root password $SQLROOTPW - - cat > /root/.my.cnf < /etc/systemd/system/seafile.service << EOF -[Unit] -Description=Seafile Server -After=network.target remote-fs.target mariadb.service - -[Service] -ExecStart=${SEAFILE_SERVER_HOME}/seafile-server-latest/seafile.sh start -ExecStop=${SEAFILE_SERVER_HOME}/seafile-server-latest/seafile.sh stop -User=${SEAFILE_SERVER_USER} -Group=${SEAFILE_SERVER_USER} -LimitNOFILE=infinity -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable seafile - -cat > /etc/systemd/system/seahub.service << EOF -[Unit] -Description=Seafile Seahub -After=network.target seafile.service - -[Service] -ExecStart=${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub.sh start -ExecStop=${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub.sh stop -User=${SEAFILE_SERVER_USER} -Group=${SEAFILE_SERVER_USER} -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable seahub - -# Seafile restart script -cat > /usr/local/sbin/seafile-server-restart << 'EOF' -#!/bin/bash -for ACTION in stop start ; do - for SERVICE in seafile seahub ; do - systemctl ${ACTION} ${SERVICE} - done -done -EOF -chmod 700 /usr/local/sbin/seafile-server-restart - -# ------------------------------------------- -# Seafile -# ------------------------------------------- -mkdir -p ${SEAFILE_SERVER_HOME}/installed -cd ${SEAFILE_SERVER_HOME} -if ! is_pro && [[ ! -e /opt/${SEAFILE_SERVER_PACKAGE} ]]; then - curl -OL ${SEAFILE_SERVER_PACKAGE_URL} -else - cp /opt/${SEAFILE_SERVER_PACKAGE} . -fi -tar xzf ${SEAFILE_SERVER_PACKAGE} - -mv ${SEAFILE_SERVER_PACKAGE} installed - - -# ------------------------------------------- -# Seafile DB -# ------------------------------------------- -if [[ -f "/opt/seafile.my.cnf" ]] ; -then - echo "MariaDB installed before, skip this part" - SQLSEAFILEPW=`sed -n 's/password=//p' /opt/seafile.my.cnf` -else - SQLSEAFILEPW=$(pwgen) - - cat > /opt/seafile.my.cnf <> ${DEST_SETTINGS_PY} < ${TOPDIR}/aio_seafile-server.log< -# Copyright 2016, Zheng Xie -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -# - -if [[ $HOME == "" ]]; then - export HOME=/root -fi - -if [[ $SEAFILE_DEBUG != "" ]]; then - set -x -fi -set -e - -if [[ "$#" -ne 1 ]]; then - echo "You must specif Seafile version to install" - echo "Like: $0 7.0.0" - exit 1 -fi - -clear -cat < /etc/nginx/sites-available/seafile.conf << EOF -log_format seafileformat '\$http_x_forwarded_for \$remote_addr [\$time_local] "\$request" \$status \$body_bytes_sent "\$http_referer" "\$http_user_agent" \$upstream_response_time'; - -server { - listen 80; - server_name seafile.example.com; - - proxy_set_header X-Forwarded-For \$remote_addr; - - location / { - proxy_pass http://127.0.0.1:8000; - proxy_set_header Host \$host; - proxy_set_header X-Real-IP \$remote_addr; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host \$server_name; - proxy_set_header X-Forwarded-Proto \$scheme; - proxy_read_timeout 1200s; - - # used for view/edit office file via Office Online Server - client_max_body_size 0; - - access_log /var/log/nginx/seahub.access.log seafileformat; - error_log /var/log/nginx/seahub.error.log; - } - - location /seafhttp { - rewrite ^/seafhttp(.*)$ \$1 break; - proxy_pass http://127.0.0.1:8082; - client_max_body_size 0; - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; - proxy_connect_timeout 36000s; - proxy_read_timeout 36000s; - - access_log /var/log/nginx/seafhttp.access.log seafileformat; - error_log /var/log/nginx/seafhttp.error.log; - } - location /media { - root ${SEAFILE_SERVER_HOME}/seafile-server-latest/seahub; - } - location /seafdav { - fastcgi_pass 127.0.0.1:8080; - fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; - fastcgi_param PATH_INFO \$fastcgi_script_name; - fastcgi_param SERVER_PROTOCOL \$server_protocol; - fastcgi_param QUERY_STRING \$query_string; - fastcgi_param REQUEST_METHOD \$request_method; - fastcgi_param CONTENT_TYPE \$content_type; - fastcgi_param CONTENT_LENGTH \$content_length; - fastcgi_param SERVER_ADDR \$server_addr; - fastcgi_param SERVER_PORT \$server_port; - fastcgi_param SERVER_NAME \$server_name; - fastcgi_param REMOTE_ADDR \$remote_addr; - - client_max_body_size 0; - - access_log /var/log/nginx/seafdav.access.log seafileformat; - error_log /var/log/nginx/seafdav.error.log; - } -} -EOF - -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 - - SQLROOTPW=$(pwgen) - - mysqladmin -u root password $SQLROOTPW - - cat > /root/.my.cnf < /etc/init.d/seafile-server << EOF -#!/bin/bash -### BEGIN INIT INFO -# Provides: seafile-server -# Required-Start: \$remote_fs \$syslog mysql -# Required-Stop: \$remote_fs \$syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Seafile server -# Description: Start Seafile server -### END INIT INFO - -# Author: Alexander Jackson - -# Change the value of "seafile_dir" to your path of seafile installation -user=${SEAFILE_SERVER_USER} -seafile_dir=${SEAFILE_SERVER_HOME} -script_path=\${seafile_dir}/seafile-server-latest -seafile_init_log=\${seafile_dir}/logs/seafile.init.log -seahub_init_log=\${seafile_dir}/logs/seahub.init.log - - -case "\$1" in - start) - sudo -u \${user} \${script_path}/seafile.sh start >> \${seafile_init_log} - sudo -u \${user} \${script_path}/seahub.sh start >> \${seahub_init_log} - ;; - restart) - sudo -u \${user} \${script_path}/seafile.sh restart >> \${seafile_init_log} - sudo -u \${user} \${script_path}/seahub.sh restart >> \${seahub_init_log} - ;; - stop) - sudo -u \${user} \${script_path}/seafile.sh \$1 >> \${seafile_init_log} - sudo -u \${user} \${script_path}/seahub.sh \$1 >> \${seahub_init_log} - ;; - *) - echo "Usage: /etc/init.d/seafile-server {start|stop|restart}" - exit 1 - ;; -esac -EOF - -chmod +x /etc/init.d/seafile-server -update-rc.d seafile-server defaults - - -# ------------------------------------------- -# Seafile -# ------------------------------------------- -mkdir -p ${SEAFILE_SERVER_HOME}/installed -cd ${SEAFILE_SERVER_HOME} -if ! is_pro && [[ ! -e /opt/${SEAFILE_SERVER_PACKAGE} ]]; then - curl -OL ${SEAFILE_SERVER_PACKAGE_URL} -else - cp /opt/${SEAFILE_SERVER_PACKAGE} . -fi -tar xzf ${SEAFILE_SERVER_PACKAGE} - -mv ${SEAFILE_SERVER_PACKAGE} installed - - -# ------------------------------------------- -# Seafile DB -# ------------------------------------------- -if [[ -f "/opt/seafile.my.cnf" ]] ; -then - echo "MariaDB installed before, skip this part" - SQLSEAFILEPW=`sed -n 's/password=//p' /opt/seafile.my.cnf` -else - SQLSEAFILEPW=$(pwgen) - - cat > /opt/seafile.my.cnf <> ${DEST_SETTINGS_PY} < ${TOPDIR}/aio_seafile-server.log< -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -# -#set -x -# ------------------------------------------- -# Vars -# ------------------------------------------- -CLASS_DEFAULT=1 -RSA=4096 - - -# ------------------------------------------- -# About -# ------------------------------------------- -cat << EOF - - StartSSL certificate creator for NGINX - - Go to https://www.startssl.com and sign up. Decide - if the free class1 certs are good enough or if you - need paid class2 or class3 certificates. Class1 - certificates are the default after signing up. You - don't need to do anything else to issue class1 certs. - - For questions or suggestions please contact me at - alexander.jackson@seafile.de - - ----------------------------------------------------------------- - Hit return to proceed or CTRL-C to abort. - -EOF - -read dummy - - -# ------------------------------------------- -# Start working -# ------------------------------------------- -read -p "New certs class? [$CLASS_DEFAULT]" CLASS -CLASS="${CLASS:-$CLASS_DEFAULT}" - -if [[ $CLASS > 3 ]]; then - echo Wrong class type. Select 1, 2 or 3. Aborting.. ; exit 1 -fi - -read -p "New certs domain name? " DOMAIN - -CERT_DIR=$(pwd)/certs/${DOMAIN} - - -# ------------------------------------------- -# Abort if CERT_DIR exists -# ------------------------------------------- -if [[ -d "${CERT_DIR}" ]] ; -then - echo " Aborting because directory ${CERT_DIR} already exist" ; exit 1 -fi - -mkdir -p ${CERT_DIR} - - -# ------------------------------------------- -# Create certificate signing request and private key in batch mode -# ------------------------------------------- -openssl req -new -nodes -keyout ${CERT_DIR}/${DOMAIN}.key -out ${CERT_DIR}/${DOMAIN}.csr -newkey rsa:${RSA} -batch - - -# ------------------------------------------- -# Print instructions -# ------------------------------------------- -cat << EOF - - Follow these steps next: - - 1. Go to https://www.startssl.com > - 2. Certificates Wizard > - 3. Certificate Target: (Web Server SSL/TLS Certificate) > Continue > - 4. Generate Private Key > Skip > - 5. Submit Certificate Request (CSR) (Paste your csr shown below) - -EOF - -cat ${CERT_DIR}/${DOMAIN}.csr - - - -# ------------------------------------------- -# Print more instructions -# ------------------------------------------- -cat << EOF - - 6. Continue >> - 7. Certificate Request Received > Continue >> - 8. Add Domains: (select your domain) - 9. Optionally Add Domains > Add More < (repeat until happy) > Continue >> - 10. Ready Processing Certificate > Continue >> - -EOF - -echo "Hit return when the certificate is displayed." -read dummy - -echo "Replace content with certificate, save and exit." > ${CERT_DIR}/${DOMAIN}.crt - -nano ${CERT_DIR}/${DOMAIN}.crt - -echo "Creating class ${CLASS} chained certificate for NGINX" - - -# ------------------------------------------- -# Create certificate change for usage with NGINX -# ------------------------------------------- -cat ${CERT_DIR}/${DOMAIN}.crt > ${CERT_DIR}/${DOMAIN}_chained.crt - -if [[ $CLASS -eq 1 ]]; then - wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem >> ${CERT_DIR}/${DOMAIN}_chained.crt -fi - -if [[ $CLASS -eq 2 ]]; then - wget -O - https://www.startssl.com/certs/class2/sha2/pem/sub.class2.server.sha2.ca.pem >> ${CERT_DIR}/${DOMAIN}_chained.crt -fi - -if [[ $CLASS -eq 3 ]]; then - wget -O - https://www.startssl.com/certs/class3/sha2/pem/sub.class3.server.sha2.ca.pem >> ${CERT_DIR}/${DOMAIN}_chained.crt -fi - -wget -O - https://www.startssl.com/certs/ca-sha2.pem >> ${CERT_DIR}/${DOMAIN}_chained.crt - - -# ------------------------------------------- -# List new csr and key for informational value -# ------------------------------------------- -echo "Our newly Created files:" -ls -ahl ${CERT_DIR} - - -# ------------------------------------------- -# Print -# ------------------------------------------- -cat << EOF - - Implementation example for NGINX: - - [...] - ssl on; - ssl_certificate ${CERT_DIR}/${DOMAIN}_chained.crt; - ssl_certificate_key ${CERT_DIR}/${DOMAIN}.key; - [...] - - Finished! - -EOF diff --git a/tests/assert.sh b/tests/assert.sh deleted file mode 100644 index f3d03d8..0000000 --- a/tests/assert.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/bin/bash -# assert.sh 1.0 - bash unit testing framework -# Copyright (C) 2009, 2010, 2011, 2012 Robert Lehmann -# -# http://github.com/lehmannro/assert.sh -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . - -export DISCOVERONLY=${DISCOVERONLY:-} -export DEBUG=${DEBUG:-} -export STOP=${STOP:-} -export INVARIANT=${INVARIANT:-} - -args="$(getopt -n "$0" -l verbose,help,stop,discover,invariant vhxdi $*)" \ -|| exit -1 -for arg in $args; do - case "$arg" in - -h) - echo "$0 [-vxid] [--verbose] [--stop] [--invariant] [--discover]" - echo "`sed 's/./ /g' <<< "$0"` [-h] [--help]" - exit 0;; - --help) - cat < [stdin] - (( tests_ran++ )) - [[ -n "$DISCOVERONLY" ]] && return - # printf required for formatting - printf -v expected "x${2:-}" # x required to overwrite older results - result="$(eval 2>/dev/null $1 <<< ${3:-})" - # Note: $expected is already decorated - if [[ "x$result" == "$expected" ]]; then - [[ -n "$DEBUG" ]] && echo -n . - return - fi - [[ -n "$DEBUG" ]] && echo -n X - result="$(sed -e :a -e '$!N;s/\n/\\n/;ta' <<< "$result")" - [[ -z "$result" ]] && result="nothing" || result="\"$result\"" - [[ -z "$2" ]] && expected="nothing" || expected="\"$2\"" - failure="expected $expected${_indent}got $result" - report="test #$tests_ran \"$1${3:+ <<< $3}\" failed:${_indent}$failure" - tests_errors[$tests_failed]="$report" - (( tests_failed++ )) - if [[ -n "$STOP" ]]; then - [[ -n "$DEBUG" ]] && echo - echo "$report" - exit 1 - fi -} - -assert_raises() { - # assert_raises [stdin] - (( tests_ran++ )) - [[ -n "$DISCOVERONLY" ]] && return - (eval $1 <<< ${3:-}) > /dev/null 2>&1 - status=$? - expected=${2:-0} - if [[ "$status" -eq "$expected" ]]; then - [[ -n "$DEBUG" ]] && echo -n . - return - fi - [[ -n "$DEBUG" ]] && echo -n X - failure="program terminated with code $status instead of $expected" - report="test #$tests_ran \"$1${3:+ <<< $3}\" failed:${_indent}$failure" - tests_errors[$tests_failed]="$report" - (( tests_failed++ )) - if [[ -n "$STOP" ]]; then - [[ -n "$DEBUG" ]] && echo - echo "$report" - exit 1 - fi -} - -_assert_reset diff --git a/tests/post-deploy_test.sh b/tests/post-deploy_test.sh deleted file mode 100755 index 59f6334..0000000 --- a/tests/post-deploy_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -. tests/assert.sh - -echo "Tests for seafile server package..."