* Package scripts that are shipped by upstream in their binary download * Includes setup scripts (setup-seafile.sh to use SQLite, setup-seafile-mysql.{sh,py} to use MySQL) and control scripts (seafile.sh, seahub.sh) * Does not include seafile-admin, which is not shipped in upstream's binary download. Combined with the fact that it hasn't been updated to Python 3 suggests the script has been abandoned. * Replace previous init scripts with a simplified script * Previous init scripts (seafile.init, seahub.init) were modified from older versions of seafile.sh and seahub.sh, but they haven't kept up with changes to upstream's scripts * New init script (seafile-server.init) start/stops both Seafile and Seahub (there is no need to control them separately) by calling upstream's control scripts * Replace previous package config file with new config file * Options in previous config file (seafile.conf) were mainly for using Seahub in FastCGI mode. FastCGI was deprecated in Django 1.7 and removed in 1.9; upstream's control script will only start Seahub using Gunicorn. (Options for Gunicorn including port number can be changed by editing /etc/seafile/conf/gunicorn.conf.py.) * New config file (seafile-server.config) has one option that controls where the Seafile/Seahub data directories are stored * Patch scripts/binaries to use standard, system-wide directory locations * Script files (wrappers for binaries) in /usr/bin * Binaries (not meant to be run directly by the user) in /usr/libexec * Config files in /etc/seafile * Pid/socket files in /var/run/seafile * Logs in /var/log/seafile * Include a new script to create the first admin account * With upstream's original scripts, the user is required to interactively create the first admin account when Seahub is started for the first time * The user will now use the new script (create-seafile-admin.sh) to create the first admin account after setup (using setup-seafile.sh or setup-seafile-mysql.sh) and before starting Seafile/Seahub * seahub.sh is patched to only check if there is at least one admin account and exit with an error if there is no admin account * Remove build config options and add seafile-server-fuse package * The console option controls whether the console window is shown when Seafile server is run on Windows. It has no use on Linux. * The fuse option controls whether seaf-fuse is built. (seaf-fuse is a FUSE implementation that allows the Seafile database/file system to be mounted to a local directory.) seaf-fuse is now always built and is available in a separate package (seafile-server-fuse). * Add myself as a maintainer Signed-off-by: Jeffery To <jeffery.to@gmail.com>
114 lines
3.6 KiB
Markdown
114 lines
3.6 KiB
Markdown
# Seafile Server on OpenWrt
|
|
|
|
## Installation Notes
|
|
|
|
### First-time Installation
|
|
|
|
1. Consider where you would like the Seafile data directory
|
|
(`seafile-data`), Seahub data directory (`seahub-data`), and the
|
|
Seahub database (`seahub.db`, if you will be using SQLite) to be
|
|
stored.
|
|
|
|
This location can be configured in `/etc/config/seafile-server`
|
|
(using the _data_dir_ option); the default is `/usr/share/seafile`.
|
|
|
|
If you are certain you will use a custom location, set this location
|
|
in `/etc/config/seafile-server` before continuing with the other
|
|
installation steps.
|
|
|
|
2. Run one of the two setup scripts:
|
|
|
|
* To use SQLite:
|
|
|
|
# setup-seafile
|
|
|
|
* To use MySQL:
|
|
|
|
# setup-seafile-mysql
|
|
|
|
3. Create a Seafile admin account:
|
|
|
|
# create-seafile-admin
|
|
|
|
4. Start Seafile server:
|
|
|
|
# service seafile-server start
|
|
|
|
|
|
### Upgrading
|
|
|
|
Please run the appropriate upgrade scripts in
|
|
`/usr/share/seafile/seafile-server/upgrade` before using the new
|
|
version.
|
|
|
|
For more information, see
|
|
https://download.seafile.com/published/seafile-manual/upgrade/upgrade.md.
|
|
|
|
Note that since version 7.1, configuration files are stored in
|
|
`/etc/seafile` instead of `/usr/share/seafile`.
|
|
|
|
If you are upgrading from a version before 7.1:
|
|
|
|
1. Run the upgrade scripts in
|
|
`/usr/share/seafile/seafile-server/upgrade` up to 7.1.
|
|
|
|
2. Move the `conf` and `ccnet` directories from `/usr/share/seafile` to
|
|
`/etc/seafile`.
|
|
|
|
3. If you are using a custom Seafile data directory location and have
|
|
set this in `ccnet/seafile.ini`:
|
|
|
|
Starting with 7.1, the Seafile data directory location will be taken
|
|
from `/etc/config/seafile-server`, and any setting in
|
|
`ccnet/seafile.ini` will be ignored.
|
|
|
|
It is strongly recommended to migrate the custom location setting to
|
|
`/etc/config/seafile-server` and rename/remove the `seafile.ini`
|
|
file.
|
|
|
|
Note that the _data_dir_ option in /etc/config/seafile-server
|
|
determines the *parent* path to the Seafile data directory (along
|
|
with the Seahub data directory and the Seahub database, if you are
|
|
using SQLite). The actual Seafile data directory must be named
|
|
`seafile-data`.
|
|
|
|
For example, if your Seafile data directory is
|
|
`/srv/seafile/my-seafile-data`:
|
|
|
|
1. Rename the directory to `seafile-data`, so now the Seafile data
|
|
directory is `/srv/seafile/seafile-data`.
|
|
|
|
2. Move the Seahub data directory (`seahub-data`) from
|
|
`/usr/share/seafile` into `/srv/seafile`.
|
|
|
|
3. If you are using SQLite, move the Seahub database (`seahub.db`)
|
|
from `/usr/share/seafile` into `/srv/seafile`.
|
|
|
|
4. Set the _data_dir_ option in `/etc/config/seafile-server` to the
|
|
parent path, `/srv/seafile`.
|
|
|
|
5. Rename or delete `ccnet/seafile.ini`.
|
|
|
|
4. Review/update your Seahub settings. In previous versions of the
|
|
Seahub OpenWrt package, some of Seahub's default settings (in
|
|
`/usr/share/seafile/seafile-server/seahub/seahub/settings.py`) were
|
|
modified from the defaults shipped by upstream.
|
|
|
|
Starting with 7.1, Seahub's default settings are the same as
|
|
[upstream][seahub_settings], with custom settings added to
|
|
`/etc/seafile/conf/seahub_settings.py` during setup for new
|
|
installations.
|
|
|
|
To use the same custom settings in your upgraded installation, add
|
|
these lines to `/etc/seafile/conf/seahub_settings.py`:
|
|
|
|
# Custom settings for OpenWrt
|
|
USE_I18N = False
|
|
USER_PASSWORD_MIN_LENGTH = 8
|
|
USER_STRONG_PASSWORD_REQUIRED = True
|
|
|
|
[seahub_settings]: https://github.com/haiwen/seahub/blob/v7.1.2-server/seahub/settings.py
|
|
|
|
5. Continue running the upgrade scripts up to the new version.
|
|
|
|
|