网上有很多教程,但是在安装过程中大多都会遇到一些问题
首先,安装依赖
sudo pip3 install certifi idna
sudo apt install sqlite3
sudo apt install python3-setuptools python3-simplejson python3-pil
以上命令在raspbian上执行成功,但如果你在树莓派上安装的事Ubuntu或其他操作系统,你可能会遇到一些问题,用如下命令可以解决:
aptitude install libc6:armhf
下面从Github下载软件包
Ubuntu Bionic:
wget https://github.com/haiwen/seafile-rpi/releases/download/v7.1.4/seafile-server_7.1.4_pi-bionic-stable.tar.gz
Ubuntu buster
wget https://github.com/haiwen/seafile-rpi/releases/download/v7.1.4/seafile-server_7.1.4_pi-buster-stable.tar.gz
Raspbian
wget https://github.com/haiwen/seafile-rpi/releases/download/v7.1.4/seafile-server_7.1.4_pi-stretch-stable.tar.gz
最后解压,运行安装脚本
tar -xzvf *-stable.tar.gz
cd seafile-server_*
./setup-seafile.sh
安装脚本需要你填写一些基本信息: 服务器IP,服务端口和数据库信息
安装完成后,你需要运行启动脚本,但是在这之前你也许会需要先安装Nginx,用Nginx反向代理seafile端口,因为Seafile默认端口不向外网开放,当然你可以改变这一配置,下文会提到
apt install nginx
Nginx配置文件
server {
listen <replace it with the port you want>;
server_name <replace it with your doamin or IP>;
location / {
proxy_pass http://127.0.0.1:8000;
index index;
}
}
或者用上文提到的方法,编辑Seafile配置文件
vim ../conf/gunicorn.conf
找到这行:
# default localhost:8000
bind = "127.0.0.1:8000"
改为,bind = "0.0.0.0:8000"
运行启动脚本
./seafile.sh start
./seahub.sh start
如果遇到了错误,可以运行./seahub.sh start-fastcgi
来查看具体错误信息
至此,大功告成!