From 643c842f7fa5891892715b35dc6b05adb1b293f6 Mon Sep 17 00:00:00 2001 From: Ralf Dyllick-Brenzinger <41058728+dada-dudu@users.noreply.github.com> Date: Mon, 12 Jul 2021 02:08:36 +0200 Subject: [PATCH 1/3] Update download_and_setup_seafile_professional_server.md Added Ubuntu 20.04 and Seafile 8.0 Some other cleanup --- ...d_and_setup_seafile_professional_server.md | 119 +++++++++++++----- 1 file changed, 86 insertions(+), 33 deletions(-) diff --git a/manual/deploy_pro/download_and_setup_seafile_professional_server.md b/manual/deploy_pro/download_and_setup_seafile_professional_server.md index 6d434f21..dfca001b 100644 --- a/manual/deploy_pro/download_and_setup_seafile_professional_server.md +++ b/manual/deploy_pro/download_and_setup_seafile_professional_server.md @@ -6,23 +6,27 @@ Seafile Server Professional Edition (Seafile PE) requires 2 cores and 2GB RAM. I Seafile PE can be used without a paid license with up to three users. Licenses for more user can be purchased in the [Seafile Customer Center](https://customer.seafile.com) or contact Seafile Sales at sales@seafile.com or one of [our partners](https://www.seafile.com/en/partner/). + + ## Setup -### Install Python packages +Seafile prior and including Seafile 7.0 use Python 2. More recent versions use on Python 3. -Seafile PE requires some Python and pip packages. Seafile prior and including Seafile 7.0 use Python 2, more recent versions rely on Python 3. +### Installing prerequisites **For Seafile 7.0.x** ``` -# on Ubuntu 16.04/Ubuntu 18.04 +# Ubuntu 16.04/Ubuntu 18.04 apt-get update apt-get install python2.7 python-setuptools python-mysqldb python-urllib3 python-ldap -y ``` + + ``` -# on CentOS 7 +# CentOS 7 yum install python python-setuptools MySQL-python python-urllib3 python-ldap -y ``` @@ -30,7 +34,7 @@ yum install python python-setuptools MySQL-python python-urllib3 python-ldap -y **For Seafile 7.1.x** ``` -# on Debian 10/Ubuntu 18.04/Ubuntu 20.04 +# Debian 10/Ubuntu 18.04 apt-get update apt-get install python3 python3-setuptools python3-pip -y @@ -39,8 +43,21 @@ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 \ ``` + + ``` -# on CentOS 8 +# Ubuntu 20.04 +apt-get update +apt-get install python 3 python3-setuptools python3-pip memcached libmemcached-dev -y + +pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 \ + django-pylibmc django-simple-captcha python3-ldap +``` + + + +``` +# CentOS 8 yum install python3 python3-setuptools python3-pip -y pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 \ @@ -51,7 +68,7 @@ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 \ **For Seafile 8.0.x** ``` -# on Debian 10/Ubuntu 18.04/Ubuntu 20.04 +# Debian 10/Ubuntu 18.04 apt-get update apt-get install python3 python3-setuptools python3-pip -y @@ -60,8 +77,21 @@ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \ ``` + + ``` -# on CentOS 8 +# Ubuntu 20.04 +apt-get update +apt-get install python3 python3-setuptools python3-pip memcached libmemcached-dev libmysqlclient-dev -y + +pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \ + django-pylibmc django-simple-captcha python3-ldap mysqlclient +``` + + + +``` +# CentOS 8 yum install python3 python3-setuptools python3-pip -y pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \ @@ -69,55 +99,63 @@ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \ ``` -### Install Java Runtime Environment + + +### Installing Java Runtime Environment Java Runtime Environment (JRE) is a requirement for full text search with elasticsearch. -On Debian: - ``` +# Debian sudo apt-get install openjdk-8-jre ``` -On Ubuntu 16.04/Ubuntu 18.04/Ubuntu 20.04: + ``` +# Ubuntu 16.04/Ubuntu 18.04/Ubuntu 20.04 sudo apt-get install openjdk-8-jre sudo ln -sf /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java /usr/bin/ ``` -On CentOS: + ``` +# CentOS sudo yum install java-1.8.0-openjdk ``` -### Install poppler-utils + + +### Installing poppler-utils The package poppler-utils is required for full text search of pdf files. -On Ubuntu/Debian: - ``` +# Ubuntu/Debian sudo apt-get install poppler-utils ``` -On CentOS: + ``` +# CentOS sudo yum install poppler-utils ``` -### Install Python libraries +### Installing Python libraries + +**For Seafile 7.1.x and younger ** First make sure your have installed Python 3.6 or a new version. Then install the following packages: ``` +# Debian 10/Ubuntu 18.04 sudo easy_install pip sudo pip install boto @@ -130,11 +168,22 @@ sudo pip install setuptools --no-use-wheel --upgrade ``` -### Install all libraries required by the Community Edition + + +```` +# Ubuntu 20.04 +sudo pip install boto +```` + + + +### Installing all libraries required by the Community Edition See [Download and Setup Seafile Server With MySQL](../deploy/using_mysql.md). -### Create programm directory for Seafile PE + + +### Creating programm directory for Seafile PE The standard directory for Seafile's program files is `/opt/seafile`. Create this directory and change into it: @@ -146,27 +195,29 @@ cd /opt/seafile The program directory can be changed. The standard directory `/opt/seafile` is assumed for the remainder of these instructions. If you decide to put Seafile in another directory, some commmands need to be modified accordingly. -### Get Seafile PE license -Place the license file in Seafile' programm directory `/opt/seafile`. -If the license file's name is not`seafile-license.txt`, rename it. Also make sure the file can be read by the user executing Seafile. If the file has a different name or cannot be read, Seafile PE will not start. +### Activating Seafile PE license -### Download Seafile PE install package +Save the license file in Seafile's programm directory `/opt/seafile`. Make sure that the name is `seafile-license.txt`, rename it. (If the file has a different name or cannot be read, Seafile PE will not start.) -Since Seafile PE 7.0.17, two install packages are available for every version: + + +### Downloading the Seafile PE install package + +Since Seafile PE 7.0.17, two install packages are available for every version in the [Seafile Customer Center](https://customer.seafile.com) (a user account is necessary, but registration is free): * _seafile-pro-server_8.x.x_x86-64_Ubuntu.tar.gz_, compiled in Ubuntu 18.04 enviroment * _seafile-pro-server_8.x.x_x86-64_CentOS.tar.gz_, compiled in CentOS 7 enviroment The former is for installation on Ubuntu/Debian servers, the latter for CentOS. -The install packages are available in the [Seafile Customer Center](https://customer.seafile.com). A user account is necessary, but registration is free. - Download the install package using wget. -### Uncompress Seafile PE + + +### Uncompressing Seafile PE The install package is a compressed tarball. Uncompress the package using tar: @@ -178,7 +229,7 @@ tar xf seafile-pro-server_8.0.4_x86-64.tar.gz Now you have: ``` -tree -L 1 +#tree -L 1 seafile ├── seafile-license.txt └── seafile-pro-server-8.0.4 @@ -191,6 +242,8 @@ Note: The names of the install packages differ for Seafile CE and Seafile PE. Ta * Seafile CE: `seafile-server_8.0.4_x86-86.tar.gz`; uncompressing into folder `seafile-server-8.0.4` * Seafile PE: `seafile-pro-server_8.0.4_x86-86.tar.gz`; uncompressing into folder `seafile-pro-server-8.0.4` + + ### Setup The setup process of Seafile Professional Server is the same as the Seafile Community Server. See [Download and Setup Seafile Server With MySQL](../deploy/using_mysql.md). @@ -204,8 +257,8 @@ After you have succesfully setup Seafile PE, the directory layout looks like thi ``` #tree -L 2 . -├── seafile-license.txt # license file -├── ccnet # configuration files +├── seafile-license.txt # license file +├── ccnet # configuration files │ ├── mykey.peer │ ├── PeerMgr │ └── seafile.ini @@ -214,7 +267,7 @@ After you have succesfully setup Seafile PE, the directory layout looks like thi │ └── seafile.conf │ └── seahub_settings.py │ └── seafevents.conf -├── pro-data # data specific for professional version +├── pro-data # data specific for professional version ├── seafile-data ├── seafile-pro-server-7.0.7 │ ├── reset-admin.sh @@ -229,7 +282,7 @@ After you have succesfully setup Seafile PE, the directory layout looks like thi │ ├── setup-seafile-mysql.sh │ └── upgrade ├── seahub-data -│ └── avatars # for user avatars +│ └── avatars # for user avatars ├── seahub.db ``` From 11df1240c25bf7a17c93560889134a353c1d1753 Mon Sep 17 00:00:00 2001 From: Ralf Dyllick-Brenzinger <41058728+dada-dudu@users.noreply.github.com> Date: Tue, 13 Jul 2021 00:28:25 +0200 Subject: [PATCH 2/3] Additional cleanup --- ...d_and_setup_seafile_professional_server.md | 102 +++++++++++------- 1 file changed, 61 insertions(+), 41 deletions(-) diff --git a/manual/deploy_pro/download_and_setup_seafile_professional_server.md b/manual/deploy_pro/download_and_setup_seafile_professional_server.md index dfca001b..56dfe718 100644 --- a/manual/deploy_pro/download_and_setup_seafile_professional_server.md +++ b/manual/deploy_pro/download_and_setup_seafile_professional_server.md @@ -10,6 +10,8 @@ Seafile PE can be used without a paid license with up to three users. Licenses f ## Setup +These instructions assume that MySQL/MariaDB server and client are installed and a mysql root user can authenticate using the mysql_native_password plugin. + Seafile prior and including Seafile 7.0 use Python 2. More recent versions use on Python 3. ### Installing prerequisites @@ -68,7 +70,18 @@ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 \ **For Seafile 8.0.x** ``` -# Debian 10/Ubuntu 18.04 +# Debian 10 +apt-get update +apt-get install python3 python3-setuptools python3-pip -y + +pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \ + django-pylibmc django-simple-captcha python3-ldap mysqlclient +``` + + + +``` +# Ubuntu 18.04 apt-get update apt-get install python3 python3-setuptools python3-pip -y @@ -106,8 +119,8 @@ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \ Java Runtime Environment (JRE) is a requirement for full text search with elasticsearch. ``` -# Debian -sudo apt-get install openjdk-8-jre +# Debian 10 +sudo apt-get install default-jre ``` @@ -148,33 +161,6 @@ sudo yum install poppler-utils ``` -### Installing Python libraries - -**For Seafile 7.1.x and younger ** - -First make sure your have installed Python 3.6 or a new version. Then install the following packages: - -``` -# Debian 10/Ubuntu 18.04 -sudo easy_install pip -sudo pip install boto - -``` - -If you receive an error about "Wheel installs require setuptools >= ...", run this between the pip and boto lines above - -``` -sudo pip install setuptools --no-use-wheel --upgrade - -``` - - - -```` -# Ubuntu 20.04 -sudo pip install boto -```` - ### Installing all libraries required by the Community Edition @@ -222,15 +208,23 @@ Download the install package using wget. The install package is a compressed tarball. Uncompress the package using tar: ``` -tar xf seafile-pro-server_8.0.4_x86-64.tar.gz +# Debian/Ubuntu +tar xf seafile-pro-server_8.0.4_x86-64_Ubuntu.tar.gz ``` +``` +# CentOS +tar xf seafile-pro-server_8.0.4_x86-64_CentOS.tar.gz +``` + + + Now you have: ``` #tree -L 1 -seafile +. ├── seafile-license.txt └── seafile-pro-server-8.0.4 └── seafile-pro-server_8.0.4_x86-64.tar.gz @@ -242,8 +236,6 @@ Note: The names of the install packages differ for Seafile CE and Seafile PE. Ta * Seafile CE: `seafile-server_8.0.4_x86-86.tar.gz`; uncompressing into folder `seafile-server-8.0.4` * Seafile PE: `seafile-pro-server_8.0.4_x86-86.tar.gz`; uncompressing into folder `seafile-pro-server-8.0.4` - - ### Setup The setup process of Seafile Professional Server is the same as the Seafile Community Server. See [Download and Setup Seafile Server With MySQL](../deploy/using_mysql.md). @@ -267,6 +259,8 @@ After you have succesfully setup Seafile PE, the directory layout looks like thi │ └── seafile.conf │ └── seahub_settings.py │ └── seafevents.conf +├── logs +├── pids ├── pro-data # data specific for professional version ├── seafile-data ├── seafile-pro-server-7.0.7 @@ -281,6 +275,7 @@ After you have succesfully setup Seafile PE, the directory layout looks like thi │ ├── setup-seafile-mysql.py │ ├── setup-seafile-mysql.sh │ └── upgrade +├── seafile-server-latest -> seafile-pro-server-7.0.7 ├── seahub-data │ └── avatars # for user avatars ├── seahub.db @@ -297,13 +292,35 @@ After you have succesfully setup Seafile PE, the directory layout looks like thi ├── conf │ └── ccnet.conf │ └── gunicorn.conf.py +│ └── __pycache__ │ └── seafdav.conf │ └── seafevents.conf │ └── seafile.conf │ └── seahub_settings.py +├── logs +│   ├── controller.log +│   ├── elasticsearch_deprecation.log +│   ├── elasticsearch_index_indexing_slowlog.log +│   ├── elasticsearch_index_search_slowlog.log +│   ├── elasticsearch.log +│   ├── file_updates_sender.log +│   ├── index.log +│   ├── seafevents.log +│   ├── seafile.log +│   ├── seahub.log +│   └── slow_logs +├── pids +│   ├── elasticsearch.pid +│   ├── seafevents.pid +│   ├── seaf-server.pid +│   └── seahub.pid ├── pro-data # data specific for Seafile PE +│   └── search ├── seafile-data -│ └── library-template +│   ├── httptemp +│   ├── library-template +│   ├── storage +│   └── tmpfiles ├── seafile-pro-server-8.0.4 │   ├── check-db-type.py │   ├── check_init_admin.py @@ -337,20 +354,23 @@ After you have succesfully setup Seafile PE, the directory layout looks like thi │   ├── setup-seafile.sh │   ├── sql │   └── upgrade +├── seafile-server-latest -> seafile-pro-server-8.0.4 ├── seahub-data │ └── avatars # for user avatars ``` +### Tweaking conf files + +Two configuration files must be manually modified: ccnet.conf and gunicorn.conf.py + +In ccnet.conf, add the port 8000 to the `SERVICE_URL` (i.e., SERVICE_URL = http://1.2.3.4:8000/) + +In gunicorn.conf.py, change the bind to "0.0.0.0:8000" (i.e., bind = "0.0.0.0:8000") + ## Performance tuning For more than 50 users, we recommend [adding memcached](../deploy/add_memcached.md). Memcached increases the response time of Seahub, Seafile's web interface, significantly. - -## FAQ - -You may want to read more about Seafile Professional Server: - -* [FAQ For Seafile Professional Server](faq_for_seafile_pro_server.md) From 5b5e6e15716004f0e40c883ff635922e70d06ef3 Mon Sep 17 00:00:00 2001 From: Daniel Pan Date: Tue, 13 Jul 2021 15:32:59 +0800 Subject: [PATCH 3/3] Update download_and_setup_seafile_professional_server.md --- .../download_and_setup_seafile_professional_server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/deploy_pro/download_and_setup_seafile_professional_server.md b/manual/deploy_pro/download_and_setup_seafile_professional_server.md index 56dfe718..d2a40c68 100644 --- a/manual/deploy_pro/download_and_setup_seafile_professional_server.md +++ b/manual/deploy_pro/download_and_setup_seafile_professional_server.md @@ -50,7 +50,7 @@ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 \ ``` # Ubuntu 20.04 apt-get update -apt-get install python 3 python3-setuptools python3-pip memcached libmemcached-dev -y +apt-get install python3 python3-setuptools python3-pip memcached libmemcached-dev -y pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.3.8 \ django-pylibmc django-simple-captcha python3-ldap