官网下载服务端程序并解压

http://www.seafile.com/download

安装环境

apt install python2.7 python-setuptools python-imaging python-ldap sqlite3 python-urllib3

安装 seafile

cd seafile-server-*
./setup-seafile.sh  #运行安装脚本并回答预设问题

启动 Seafile

./seafile.sh start # 启动 Seafile 服务

启动 Seahub

./seahub.sh start <port> # 启动 Seahub 网站 (默认运行在8000端口上)

小贴士: 你第一次启动 seahub 时,seahub.sh 脚本会提示你创建一个 seafile 管理员帐号。
服务启动后, 打开浏览器并输入以下地址

http://IP:8000/

你会被重定向到登陆页面。输入你在之前创建的 Seafile 管理员帐号的用户名/密码即可。

支持在线预览 office 文件配置(仅适用于 Pro 版)
安装环境

apt install libreoffice libreoffice-script-provider-python poppler-utils

安装字体

# For ubuntu/debian
apt install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy

重启 Seafile

./seafile.sh restart

安装 DAVfs

apt install davfs2

挂载分区到目录

mkdir /mnt/dav
mount.davfs http://localhost:8080/ /mnt/dav
或
mount -t davfs http://localhost:8080/ /mnt/dav

仅适用于 KVM 虚拟,OpenVZ 需要主机商支持 FUSE 模块。

Debian 8 64 步骤:

下载rintd二进制文件:

wget --no-check-certificate  "https://github.com/linhua55/lkl_study/releases/download/v1.2/rinetd_bbr_powered" -O /root/rinetd

修改权限:

chmod +x rinetd

修改rinetd的配置文件rinetd.conf,添加监听地址:

vi rinetd.conf

内容

# bindadress bindport connectaddress connectport
0.0.0.0 443 0.0.0.0 443
0.0.0.0 80 0.0.0.0 80

设置开机启动

vi /etc/systemd/system/rinetd.service

内容


[Unit]
Description=rinetd

[Service]
ExecStart=/root/rinetd -f -c /root/rinetd.conf raw venet0:0
Restart=always
  
[Install]
WantedBy=multi-user.target

最后执行:

systemctl enable rinetd.service && systemctl start rinetd.service

需要的库

apt install gcc g++ libssl-dev libgcrypt-dev libexpat1-dev libssh2-1-dev libc-ares-dev zlib1g-dev libsqlite3-dev pkg-config

下载最新版 Aria2解压

wget https://github.com/aria2/aria2/releases/download/release-1.32.0/aria2-1.32.0.tar.gz
tar xzvf aria2-1.32.0.tar.gz
cd aria2-1.32.0

编译

./configure
make
make install

文件瘦身

strip -s /usr/local/bin/aria2c

配置文件

mkdir /etc/aria2/
vi /etc/aria2/aria2.conf
touch /路径/aria2.session

配置内容

dir=/home/www/
max-concurrent-downloads=3
input-file=/路径/aria2.session
save-session=/路径/aria2.session
save-session-interval=60
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
rpc-secret=设定访问rpc密码
#https设置
#rpc-secure=true
#rpc-certificate=crt文件位置
#rpc-private-key=key文件位置

启动脚本

vi /etc/init.d/aria2c
chmod +x /etc/init.d/aria2c
/etc/init.d/aria2c start

脚本内容

#!/bin/sh

PREFIX="/usr/local/bin"
NAME="aria2c"
FRIENDLY="Aria2"
CONFFILE="/etc/aria2/aria2.conf"

start() {
  if [ -f "$PIDFILE" ]; then
    echo "$FRIENDLY is already running."
    exit 1
  fi
  echo -n "Starting $FRIENDLY Services: "
  $PREFIX/$NAME --conf-path=$CONFFILE --daemon >/dev/null 2>&1
  if [ "$?" = "0" ]; then
    echo "succeeded."
  else
    echo "failed."
    exit 1
  fi
}

stop() {
  if [ ! -n "pidof $NAME" ]; then
    echo "$FRIENDLY is not running."
    exit 1
  fi
  echo -n "Shutting down $FRIENDLY Services: "
  killall "$NAME"
  if [ "$?" = "0" ]; then
    echo "succeeded."
  else
    echo "failed."
    exit 1
  fi
}

case "$1" in
  start)
    start
  ;;
  stop)
    stop
  ;;
  restart)
    "$0" stop
    sleep 1
    "$0" start
  ;;
  *)
    echo "Usage: $0 (start|stop|restart|usage)"
  ;;
esac
exit 0