一、安装依赖包
1、更新库
apt update && apt upgrade -y
2、安装依赖包
apt-get install sqlite3 build-essential libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev re2c flex python-setuptools cmake -y
二、下载安装包
1、seafile官方提供的ARM包在GitHub上,下载后缀名为“focal-arm64v8l.tar.gz”最新版本。
https://github.com/haiwen/seafile-rpi/releases
2、在线下载:先安装wget,然后再下载,复制GitHub上的安装包地址,然后用wget下载。
wget https://github.com/haiwen/seafile-rpi/releases/download/v9.0.2/seafile-server-9.0.2-focal-arm64v8l.tar.gz
三、解压、部署安装包
1、解压安装包,解压完的名字有点长可以改一个好记一点的,也可以不改。
tar -zxvf seafile-server-9.0.2-focal-arm64v8l.tar.gz
2、进入解压后的文件夹(也就是刚刚说改名的那个解压完的文件夹)执行./命令安装。
setup-seafile.sh
3、提示输入server_name时注意不能使用中文,改好后回车。
What would you like to use as the name of this seafile server?
Your seafile users will be able to see the name in their seafile client.
You can use a-z, A-Z, 0-9, _ and -, and the length should be 3 ~ 15
[server name]: Seafile
4、接下来填写服务器IP或者填写配置好的域名,接着回车。
What is the ip or domain of this server?
For example, www.mycompany.com, or, 192.168.1.101
5、下一个是端口修改,这个默认的端口一般不会被占用,所以可以直接回车不用改。
What tcp port do you want to use for seafile fileserver?
8082 is the recommended port.
[default: 8082 ]
6、当配置完后会显示如下信息
This is your config information:
server name: Seafile #名称随便写
server ip/domain: 192.168.2.8 #服务器IP或者域名
seafile data dir: /Seafile/seafile-data #路径
fileserver port: 8082 #默认端口
If you are OK with the configuration, press [ENTER] to continue.
7、当数据回显以下内容后代表配置成功了
Creating database now, it may take one minute, please wait...
/var/www/html/ssd_html/Seafile/seafile-server-9.0.2
Done.
creating seafile-server-latest symbolic link ... done
Your seafile server configuration has been completed successfully.
run seafile server: ./seafile.sh { start | stop | restart }
run seahub server: ./seahub.sh { start <port> | stop | restart <port> }
If the server is behind a firewall, remember to open these tcp ports:
port of seafile fileserver: 8082
port of seahub: 8000
When problems occur, refer to
https://download.seafile.com/published/seafile-manual/home.md
for more information.
8、修改根目录下conf/gunicorn.conf.py文件,把127.0.0.1改成0.0.0.0。
四、启动服务
过程中会提示输入邮箱和密码,输入的这个账户就是网盘的管理员账户,完成后就可以在浏览器输入服务器IP加端口号8000进入网盘了。
./seafile.sh start
./seahub.sh start