mirror of
https://github.com/haiwen/seafile-server-installer-cn.git
synced 2025-12-26 01:14:55 +00:00
Update README
This commit is contained in:
parent
a032ed00e0
commit
be88196132
166
README.md
166
README.md
|
|
@ -1,126 +1,60 @@
|
|||
# seafile-server-installer
|
||||
These installer scripts offer a quick and easy way to set up the [Seafile Server Community Edition](http://seafile.com/en/home/), using MariaDB, Memcached and NGINX as a Reverse Proxy in under 5 minutes. We're also adding an init script that starts Seafile when booting the server.
|
||||
# Seafile 安装脚本
|
||||
|
||||
### What's it for?
|
||||
Installing the [Seafile Server Community Edition](http://seafile.com/en/home/) on Debian or Ubuntu (64bit) in a standard and more secure manner then the out of the box setup scripts offer. Instead of SQLite we're using MariaDB and instead of Gunicorn we're using NGINX.
|
||||
这里的安装脚本可以帮助您快速的安装好 Seafile 服务器,并配置好 MariaDB, Memcached, WebDAV, Ngnix 和开机自动启动脚本。
|
||||
|
||||
|
||||
### Why?
|
||||
There are just too many ways to misconfigure a manual Seafile server installation. We've notices that many people don't realize that the default installation is unsecure. In other cases people get stuck during the installation or forget a step like changing "FILE_SERVER_ROOT" or use IP addresses instead of resolvable DNS names.
|
||||
This script is derived from our [reference installation for Seafile Server Professional](https://wiki.seafile.com.de/doku.php?id=debian_7_wheezy_64bit). It helps us to standardize the installation procedure and helps with identifying setup errors more easily.
|
||||
### 使用步骤
|
||||
|
||||
安装干净的 Ubuntu 14.04 系统并切换成 root 账号 (sudo -i)。
|
||||
|
||||
获取安装脚本
|
||||
|
||||
```
|
||||
wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-server-ce-ubuntu-14-04-amd64-http
|
||||
```
|
||||
|
||||
运行安装脚本并指定要安装的版本 (4.1.2)
|
||||
|
||||
```
|
||||
bash seafile-server-ce-ubuntu-14-04-amd64-http 4.1.2
|
||||
```
|
||||
|
||||
该脚本运行完后会在命令行中打印配置信息和管理员账号密码,请仔细阅读。该脚本会自动判断服务器的 IP 地址,并设置配置文件中相应选项。如果检测到的 IP 地址不对,会影响网页端文件的上传和下载。如果出现这个问题,您需要修改两个配置条目:
|
||||
|
||||
/opt/seafile/ccnet/ccnet.conf 中的 SERVICE_URL:
|
||||
|
||||
SERVICE_URL = http://www.myseafile.com
|
||||
|
||||
/opt/seafile/seahub_settings.py 中的 FILE_SERVER_ROOT:
|
||||
|
||||
FILE_SERVER_ROOT = 'http://www.myseafile.com/seafhttp'
|
||||
|
||||
|
||||
### How long does the installation take?
|
||||
The installation time will vary depending on your internet connection speed and hardware. On our SSD-based servers we were able to install a production-ready Seafile server in roughly 5 minutes.
|
||||
### 测试
|
||||
|
||||
现在您可以在浏览器中输入服务器地址来进行测试。
|
||||
|
||||
### 升级到专业版/企业版
|
||||
|
||||
* 首先关闭 Seafile 服务: `service seafile-server stop; pkill -f seahub`。其中 `pkill -f seahub` 是为了确保 seahub 进程被关闭掉。
|
||||
* 下载企业版到 /opt/seafile 下,并解压 (tar xf seafile-pro-server_4.1.2_x86-64.tar.gz)
|
||||
* 下载 license 文件,并放置在 /opt/seafile 下
|
||||
* 运行升级脚本
|
||||
|
||||
```
|
||||
cd seafile-pro-server_4.1.2;
|
||||
./pro/pro.py setup --migrate
|
||||
```
|
||||
|
||||
* 改正目录权限: `chown -R seafile.nogroup /opt/seafile/`
|
||||
* 启动 Seafile 服务 `service seafile-server start`
|
||||
|
||||
|
||||
### Operating system
|
||||
It's meant to run on a [Debian Jessie minimal installation](https://www.youtube.com/watch?v=BCwz9oSSt8g) or [Ubuntu Trusty minimal installation](https://www.youtube.com/watch?v=qdCbWOHwBL4). No desktop environment or other weird stuff like hosting panels (Plesk, ISPConfig, etc.)...
|
||||
### 如果安装脚本出错
|
||||
|
||||
如果安装脚本出错,您可以用下列命名来清空重试
|
||||
|
||||
### Which components are used?
|
||||
1. [Newest Seafile Server Community Edition](https://download.seafile.com.de/)
|
||||
2. [NGINX](http://nginx.org/packages/mainline/debian/)
|
||||
3. MariaDB
|
||||
4. Memcached
|
||||
```
|
||||
rm -rf /opt/seafile
|
||||
```
|
||||
|
||||
|
||||
### Which special features are enabled by default?
|
||||
1. HTTPS-Proxy on port 443
|
||||
2. Forced redirect from unenrypted HTTP port 80 to encrypted HTTPS port 443
|
||||
2. Seahub with FastCGI
|
||||
3. [SeafDAV](http://manual.seafile.com/extension/webdav.html) with FastCGI
|
||||
4. Memcached
|
||||
5. Seafile autostart
|
||||
|
||||
|
||||
### What does the installer do?
|
||||
1. Update and upgrade Debian
|
||||
2. Install NGINX from http://nginx.org/packages/mainline/debian/
|
||||
3. Create Seafile init script and add it to systemd startup
|
||||
4. Create unprivilieged system user "seafile" with home directory "/opt/seafile"
|
||||
5. Download and extract latest Seafile server sources from https://download.seafile.com.de/seafile-server_latest_x86-64.tar.gz
|
||||
6. Create "seafile" database user and Seafile databases (DB-Credentials in ~/.my.cnf)
|
||||
7. Initialize various Seafile files
|
||||
8. Enable SeafDAV, Memcached and MariaDB
|
||||
9. Setup Seafile to listen to IP (hostname -i) instead of DNS (*Switch this to DNS before live deployment*)
|
||||
10. Create Seafile admin with individual password
|
||||
11. Install "seafile-server-change-address" script
|
||||
12. Display setup infos and what to do next.
|
||||
|
||||
|
||||
### How do I run it?
|
||||
|
||||
For **Debian Wheezy (64bit)** run the following lines as root:
|
||||
<pre>
|
||||
cd /tmp
|
||||
wget --no-check-certificate https://raw.githubusercontent.com/SeafileDE/seafile-server-installer/master/seafile-ce_debian-wheezy-amd64
|
||||
time bash seafile-ce_debian-wheezy-amd64
|
||||
</pre>
|
||||
|
||||
For **Debian Jessie (32bit)** run the following lines as root:
|
||||
<pre>
|
||||
cd /tmp
|
||||
wget --no-check-certificate https://raw.githubusercontent.com/SeafileDE/seafile-server-installer/master/seafile-ce_debian-jessie-i386
|
||||
time bash seafile-ce_debian-jessie-i386
|
||||
</pre>
|
||||
|
||||
For **Debian Jessie (64bit)** run the following lines as root:
|
||||
<pre>
|
||||
cd /tmp
|
||||
wget --no-check-certificate https://raw.githubusercontent.com/SeafileDE/seafile-server-installer/master/seafile-ce_debian-jessie-amd64
|
||||
time bash seafile-ce_debian-jessie-amd64
|
||||
</pre>
|
||||
|
||||
For **Ubuntu Trusty (64bit)** run the following lines as root:
|
||||
<pre>
|
||||
cd /tmp
|
||||
wget --no-check-certificate https://raw.githubusercontent.com/SeafileDE/seafile-server-installer/master/seafile-server-community_ubuntu-trusty-amd64
|
||||
time bash seafile-server-community_ubuntu-trusty-amd64
|
||||
</pre>
|
||||
|
||||
BETA: For **Uberspace** run the following line as user:
|
||||
<pre>
|
||||
wget https://raw.githubusercontent.com/SeafileDE/seafile-server-installer/master/seafile-ce_uberspace
|
||||
time bash seafile-ce_uberspace
|
||||
</pre>
|
||||
|
||||
|
||||
### Caution!
|
||||
Never run the script on a production server. It's more or less a one trick pony and can seriously damage production systems. So run it only one time and delete it afterwards.
|
||||
|
||||
As a precaution I have added a few simple checks to abort installation if the unprivileged Seafile user or Seafile installation directory pre-exist:
|
||||
|
||||
1. Check if you're running this script as root. If not, abort.
|
||||
2. Check if the user "seafile" exists. If yes, abort.
|
||||
3. Check if the directory "/opt/seafile" exists. If yes, abort.
|
||||
|
||||
|
||||
### How do I update Seafile?
|
||||
You will have to handle Seafile updates/upgrades manually after the initial installation. Consult http://manual.seafile.com/deploy/upgrade.html on how to upgrade Seafile.
|
||||
|
||||
BTW Ideas on how to automate upgrades are very welcome!
|
||||
|
||||
|
||||
### What do I have to do after the installer has finished?
|
||||
1. Delete installer script. You wont need it anymore and might even seriously damage your system if you ran it again.
|
||||
2. Follow the suggested steps at the end of the installation to finalize your Seafile server installation. As a bare minimum you most definitely will want to change the listening IP to a valid DNS name by running "seafile-server-change-address" as root...
|
||||
3. Install a firewall. TCP-Port 443 needs to be accessible. Optionally you can open TCP-Port 80 which redirects to HTTPS
|
||||
|
||||
|
||||
### License
|
||||
Copyright 2015, Alexander Jackson <alexander.jackson@seafile.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the [GNU Affero General Public License](http://www.gnu.org/licenses/agpl-3.0.html) 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.
|
||||
|
||||
|
||||
### Where can I submit bugs or add suggestions?
|
||||
Contact me at alexander.jackson@seafile.de or create an [Issue](https://github.com/SeafileDE/seafile-server-community_debian-jessie-amd64/issues/new) on Github. Or just reply in the [corresponding forum thread](https://forum.seafile-server.org/t/howto-seafile-server-community-edition-on-debian-jessie-amd64/1464).
|
||||
|
|
|
|||
Loading…
Reference in New Issue