diff --git a/manual/deploy/README.md b/manual/deploy/README.md index e414f594..e03b8a07 100644 --- a/manual/deploy/README.md +++ b/manual/deploy/README.md @@ -1,24 +1,15 @@ -# Deploying Seafile under Linux +# Deploying Seafile -Here we describe how to deploy Seafile from prebuild binary packages. - -## Deploy Seafile in Home/Personal Environment - -* [Deploying Seafile with SQLite](using_sqlite.md) - -## Deploy Seafile in Production/Enterprise Environment - -In production environment we recommend using MySQL as the database and config Seafile web behind Nginx or Apache. For those who are not familiar with Nginx and Apache. We recommend Nginx, since it is easier to config than Apache. - -We provide three ways to deploy Seafile services: +We provide three ways to deploy Seafile services. Since version 8.0, **Docker is the recommended way**. * Using [Docker](../docker/deploy_seafile_with_docker.md) * Using [installation script](https://github.com/haiwen/seafile-server-installer) * Manually installing Seafile and setting up database, memcached and Nginx/Apache. See the following section. -### Install Seafile manually +## Manually deployment options * [Deploying Seafile with MySQL](using_mysql.md) +* [Deploying Seafile with SQLite](using_sqlite.md), note, deploy Seafile with SQLite is no longer recommended * [Config Seahub with Nginx](deploy_with_nginx.md) * [Enabling Https with Nginx](https_with_nginx.md) * [Config Seahub with Apache](deploy_with_apache.md) @@ -28,15 +19,15 @@ We provide three ways to deploy Seafile services: * [Firewall settings](using_firewall.md) * [Logrotate](using_logrotate.md) -### LDAP and AD integration +## LDAP and AD integration [LDAP/AD Integration](using_ldap.md) -### Single Sign On +## Single Sign On Seafile supports a few Single Sign On authentication protocols. See [Single Sign On](single_sign_on.md) for a summary. -### Other Deployment Issues +## Other Deployment Issues * [Deploy Seafile behind NAT](deploy_seafile_behind_nat.md) * [Deploy Seahub at Non-root domain](deploy_seahub_at_non-root_domain.md) @@ -44,12 +35,12 @@ Seafile supports a few Single Sign On authentication protocols. See [Single Sign Check [configuration options](../config/README.md) for server config options like enabling user registration. -### Trouble shooting +## Trouble shooting 1. Read [Seafile Server Components Overview](../overview/components.md) to understand how Seafile server works. This will save you a lot of time. 2. [Common Problems for Setting up Server](common_problems_for_setting_up_server.md) 3. Go to our [forum](https://forum.seafile.com/) for help. -### Upgrade Seafile Server +## Upgrade Seafile Server * [Upgrade Seafile server](upgrade.md) diff --git a/manual/deploy/add_memcached.md b/manual/deploy/add_memcached.md index 9f42674a..8b61064f 100644 --- a/manual/deploy/add_memcached.md +++ b/manual/deploy/add_memcached.md @@ -4,32 +4,14 @@ Seahub caches items (avatars, profiles, etc) on the file system in /tmp/seahub_c First, make sure `libmemcached` library and development headers are installed on your system. -**For Seafile 7.0.x** +**For Seafile 7.1+** ``` -# on Debian/Ubuntu 16.04 -apt-get install memcached libmemcached-dev -y - -systemctl enable --now memcached - -``` - -``` -# on CentOS 7 -yum install memcached libffi-devel -y - -systemctl enable --now memcached - -``` - -**For Seafile 7.1.x** - -``` -# on Debian/Ubuntu 18.04 +# on Debian/Ubuntu 18.04+ apt-get install memcached libmemcached-dev -y pip3 install --timeout=3600 pylibmc django-pylibmc -systemctl enable --now memcached +systemctl enable --now memcached ``` @@ -54,32 +36,22 @@ CACHES = { ``` -If you use a memcached cluster, your configuration depends on your Seafile server version. You can find how to setup memcached cluster [here](../deploy_pro/memcached_mariadb_cluster.md). -## Seafile server before 6.2.11 - -Please replace the `CACHES` variable with the following. This configuration uses consistent hashing to distribute the keys in memcached. More information can be found on [pylibmc documentation](http://sendapatch.se/projects/pylibmc/behaviors.html) and [django-pylibmc documentation](https://github.com/django-pylibmc/django-pylibmc). Supposed your memcached server addresses are 192.168.1.13\[4-6]. +**For Seafile 7.0.x** ``` -CACHES = { - 'default': { - 'BACKEND': 'django_pylibmc.memcached.PyLibMCCache', - 'LOCATION': ['192.168.1.134:11211', '192.168.1.135:11211', '192.168.1.136:11211',], - 'OPTIONS': { - 'ketama': True, - 'remove_failed': 1, - 'retry_timeout': 3600, - 'dead_timeout': 3600 - } - }, - 'locmem': { - 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - }, -} -COMPRESS_CACHE_BACKEND = 'locmem' +# on Debian/Ubuntu 16.04 +apt-get install memcached libmemcached-dev -y + +systemctl enable --now memcached ``` -## Seafile Server 6.2.11 or newer +``` +# on CentOS 7 +yum install memcached libffi-devel -y + +systemctl enable --now memcached + +``` -The configuration is the same as single node memcached server. Just replace the IP address with the floating IP. diff --git a/manual/deploy/common_problems_for_setting_up_server.md b/manual/deploy/common_problems_for_setting_up_server.md index b00af9d1..8582efca 100644 --- a/manual/deploy/common_problems_for_setting_up_server.md +++ b/manual/deploy/common_problems_for_setting_up_server.md @@ -1,8 +1,5 @@ # Common Problems for Setting up Server -#### "Error when calling the metaclass bases" during Seafile initialization - -Seafile uses Django 1.5, which requires Python 2.6.5+. Make sure your Python version is 2.7. #### Seafile fails to start: "failed to run "seaf-server -t" (Ubuntu 20.04) @@ -25,15 +22,6 @@ mysql> ALTER USER 'seafile'@'127.0.0.1' identified with mysql_native_password by PASSWORD is the password of the MySQL user seafile. You can find this password in the log file seafile.conf in /opt/seafile/conf. - -#### Seahub.sh can't start, the error message contains: "Could not import settings 'seahub.settings', libpython2.7.so.1.0: can not open shared object file" - -You probably encounter this problem in Ubuntu 14.04. Seafile pro edition requires libpython2.7. Install it by: - -``` -sudo apt-get install libpython2.7 -``` - #### Failed to upload/download file online * Check your SERVICE_URL setting in ccnet.conf and FILE_SERVER_ROOT setting in seahub_settings.py @@ -41,19 +29,6 @@ sudo apt-get install libpython2.7 * Using chrome/firefox debug mode to find which link is given when click download button and what's wrong with this link -#### Error on Apache log: "File does not exist: /var/www/seahub.fcgi" - -Make sure you use "FastCGIExternalServer /var/www/seahub.fcgi -host 127.0.0.1:8000" in httpd.conf or apache2.conf, especially the "/var/www/seahub.fcgi" part. - -#### Error on Apache log: "FastCGI: comm with server "/var/www/seahub.fcgi" aborted: idle timeout (30 sec)" - -When accessing file history in huge libraries you get HTTP 500 Error. - -Solution: - -Change in in httpd.conf or apache2.conf from "FastCGIExternalServer /var/www/seahub.fcgi -host 127.0.0.1:8000" -to "FastCGIExternalServer /var/www/seahub.fcgi -host 127.0.0.1:8000 -idle-timeout 60" - #### Seafile with Apache / HTTPS has text only (no CSS formatting / images) The media folder (Alias location identified in /etc/apache2/sites-enabled/000-default (Ubuntu) has inappropriate permissions diff --git a/manual/deploy/deploy_http_sync.md b/manual/deploy/deploy_http_sync.md deleted file mode 100644 index 513f71cb..00000000 --- a/manual/deploy/deploy_http_sync.md +++ /dev/null @@ -1,84 +0,0 @@ -# Configure Syncing via HTTP Protocol - -Starting from version 4.0.0, Seafile supports file syncing via HTTP protocol. The server configuration depends on which version of Seafile client do you use. - -Client version >= 4.2 use http syncing protocol exclusively, the cases are - -* If you're not using https, you don't have to configure Nginx or Apache to use http sync. The client can talk directly with the file server on port 8082. -* If you're using https, you have to configure Nginx or Apahce. - -If you'are using clients version < 4.2, - -* If you want to use http(s) sync, you have to configure Nginx or Apache. -* If you don't configure Nginx or Apache, the client falls back to use non-http syncing protocol (using port 10001 and 12001). - -Servers >= 4.0 are compatible with all syncing protocols, any version of client should work with the server. - -## Nginx - -Follow [this guide](deploy_with_nginx.md) to configure Nginx without HTTPS, or [this guide](https_with_nginx.md) to configure Nginx with HTTPS. - -The section in Nginx config file related to HTTP sync is - -``` - location /seafhttp { - rewrite ^/seafhttp(.*)$ $1 break; - proxy_pass http://127.0.0.1:8082; - client_max_body_size 0; - proxy_connect_timeout 36000s; - proxy_read_timeout 36000s; - } -``` - -there are two things to note: - -* You must use the path "/seafhttp" for http syncing. This is hard coded in the client. -* You should add the "client_max_body_size" configuration. The value should be set to 0 (means no limit) or 100M (suffice for most cases). - -## Apache - -Follow [this guide](deploy_with_apache.md) to configure Apache without HTTPS, or [this guide](https_with_apache.md) to configure Nginx with HTTPS. - -The section in Apache config file related to HTTP sync is - -``` - # - # seafile fileserver - # - ProxyPass /seafhttp http://127.0.0.1:8082 - ProxyPassReverse /seafhttp http://127.0.0.1:8082 - RewriteRule ^/seafhttp - [QSA,L] -``` - -Note that you must use the path "/seafhttp" for http syncing. This is hard coded in the client. - -## Client Side Configuration for HTTPS - -If you buy a valid SSL certificate, the syncing should work out of the box. If you use self-signed certificate, when you first add an account on the client, it'll pop up a window for you to confirm the server's certificate. If you choose to accept the certificate, the client will use that for https connection. - -The client loads trusted CA list from the system trusted CA store on start. It then combines those CA list with the user accepted certificates. The combined list is then used for certificate verification. - -If you follow certificate generation instruction in [this guide](https_with_nginx.md) to generate your self-signed certificate, the syncing should work after confirmation. - -There may be cases when you can't establish https connection to the server. You can try two work-arounds: - -1. Add your self-signed certificate to system trusted CA store. -2. Open the client "settings" window, in "advanced" tab, check "Do not verifiy server certificate in HTTPS sync". - -## FAQ and Trouble Shooting - -### My Client Doesn't Sync after Upgrading to 4.2.x - -Older clients fall back to non-http sync protocol if http sync fails. So you may get the false sense that the old client works with http sync. But actually it doesn't. Client 4.2 use http sync exclusively, so it doesn't sync any more. You have to correctly configure the server for http sync. - -### Choosing Ciphers on Nginx/Apache - -You should choose strong ciphers on the server side. The following Nginx cipher list is tested to be working fine: - -``` -ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS; -``` - -You may fine tune the list to meet your needs. - - diff --git a/manual/deploy/new_directory_layout_5_0_0.md b/manual/deploy/new_directory_layout_5_0_0.md deleted file mode 100644 index f8cd4ceb..00000000 --- a/manual/deploy/new_directory_layout_5_0_0.md +++ /dev/null @@ -1,36 +0,0 @@ -# Config files location change in Seafile Server 5.0.0 - -Seafile server has various components, each of them has its own config files. These files used to be in different directories, which is inconvenient to manage. - -This is the layout before Seafile Server 5.0.0: - -```sh -└── seahub_settings.py -└── ccnet/ - └── ccnet.conf -└── seafile/ - └── seafile.conf -└── conf/ - └── seafdav.conf -└── pro-data/ - └── seafevents.conf # (professional edition only) -└── seafile-server-latest/ -``` - -Since Seafile Server 5.0.0, all config files are moved to the **conf** folder: - -```sh -└── conf/ - └── ccnet.conf - └── seafile.conf - └── seafdav.conf - └── seahub_settings.py - └── seafevents.conf # (professional edition only) -└── ccnet/ -└── seafile/ -└── pro-data/ -``` - -This way, it's much easier to manage the configurations since all files can be found in the same place. - -When you upgrading to seafile 5.0.0, the upgrade script would move these files to the central **conf/** folder for you. diff --git a/manual/deploy_pro/web_resumable_upload.md b/manual/deploy_pro/web_resumable_upload.md deleted file mode 100644 index 1e33170d..00000000 --- a/manual/deploy_pro/web_resumable_upload.md +++ /dev/null @@ -1,25 +0,0 @@ -# Web Resumable File Upload - -When uploading a large file in the web interface, if the network is unreliable, the upload can be interrupted. It's convenient if the upload can be resumed from where it stopped last time. In Seafile Professional Server 4.4.0 and above, this feature is supported. - -This feature works as following: - -1. A user uploads a large file on the web interface, and the connection is interrupted after some part of the file has been uploaded. -2. The server remembers where the upload stopped. -3. When the same file is uploaded to the same library and folder, the server tells the browser where to start the upload. - -Limitations: - -1. Only supports resumble upload. File update and folder upload is not resumable. -2. Only supports Chrome, Firefox, IE 10+. - -To enable this feature, add following options to seahub_settings.py: - -``` -ENABLE_RESUMABLE_FILEUPLOAD = True -``` - -In Seafile cluster, in order to make this feature work as espected, one of the following two special configurations must be done: - -1. seafile-server-latest/seafile-data/httptemp folder should be shared amoung all front end Seafile Servers via NFS. -2. Or, configure the load balancer to always send requests from the same IP address to a fixed back end server. diff --git a/manual/deploy_windows/deploy_with_windows.md b/manual/deploy_windows/deploy_with_windows.md deleted file mode 100644 index 1e9937ae..00000000 --- a/manual/deploy_windows/deploy_with_windows.md +++ /dev/null @@ -1,3 +0,0 @@ -# Deploy with Windows - -The document is moved to https://download.seafile.com/published/support/windows-server/deploy_with_windows.md diff --git a/manual/deploy_windows/migrate_from_win_to_linux.md b/manual/deploy_windows/migrate_from_win_to_linux.md deleted file mode 100644 index 6018b923..00000000 --- a/manual/deploy_windows/migrate_from_win_to_linux.md +++ /dev/null @@ -1,40 +0,0 @@ -# Migrate From Windows to Linux - -This tutorial show you how to migrate Seafile form Windows(using SQLite) to Linux. - -### 1. Deploying Seafile Under Linux - -First, you should [Deploy Seafile with SQLite](../deploy/using_sqlite.md). And we assume that you deploy Seafile under `/home/haiwen/` directory. - -### 2. Replace Config Files And Databases - -#### Delete config files and databases in Linux - -``` -rm /home/haiwen/seahub_settings.py -rm /home/haiwen/seahub.db -rm -r /home/haiwen/seafile-data -cp /home/haiwen/ccnet/seafile.ini /home/haiwen/seafile.ini -rm -r /home/haiwen/ccnet -``` - -> Note: `seafile.ini` is used to record the path to `seafile-data`, we will use it later, so we just copy it out, not delete it. - -#### Copy config files and databases to Linux - -- copy file `seahub_settings.py` from Windows **seafile-server** to Linux `/home/haiwen/`; - -- copy file `seahub.db` from Windows **seafile-server** to Linux `/home/haiwen/`; - -- copy sub-directory `seafile-data` from Windows **seafile-server** to Linux `/home/haiwen/`; - -- copy sub-directory `ccnet` from Windows **seafile-server** to Linux `/home/haiwen/`; - -- copy `/home/haiwen/seafile.ini` to new Linux **ccnet** directory. - -### Start Seafile - -``` -./seafile.sh start -./seahub.sh start -```