july
july
发布于 2023-06-04 / 30 阅读
0

Debian安装Seaflie10.0.1

安装

官方的中文文档就有毒,按照以前的文档安装还行不通,又折腾了半天

Seafile需要安装Python依赖

sudo aptitude update
sudo aptitude install python3 python3-setuptools python3-pip libmysqlclient-dev -y
sudo aptitude install memcached libmemcached-dev -y

sudo pip3 install --timeout=3600 django==3.2.* future==0.18.* mysqlclient==2.1.* \
    pymysql pillow==9.3.* pylibmc captcha==0.4 markupsafe==2.0.1 jinja2 sqlalchemy==1.4.3 \
    psd-tools django-pylibmc django_simple_captcha==0.5.* djangosaml2==1.5.* pysaml2==7.2.* pycryptodome==3.16.* cffi==1.15.1 lxml

下载安装包

#创建seafile安装夹
sudo mkdir /opt/seafile

#下载安装包
sudo wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_10.0.1_x86-64.tar.gz

#解压文件夹
sudo tar -xzf seafile-server_*

sudo mkdir installed

#移动文件夹
sudo mv seafile-server_* installed

安装

cd seafile-server-*
sudo bash setup-seafile-mysql.sh

相关问题

MySQL8.0.33身份验证插件问题

MySQL8.0.33RuntimeError: cryptography is required for sha256_password or caching_sha2_password

MySQL8.0更改了身份验证插件,Seafaile出现兼容问题,简单暴力的办法就是修改Mysql的配置文件,使用原来的身份验证插件.

sudo nano /etc/mysql/my.cnf

[mysqld]
default_authentication_plugin=mysql_native_password

## 重启Mysql
sudo systemctl retsart mysql

LC_ALL is not set in ENV, set to en_US.UTF-8

LC_ALL is not set in ENV, set to en_US.UTF-8

启动seahub的时候报了这个问题,当时locale看了一眼,发现改过来也影响现在的环境,在论坛找一圈找到了解决办法,🔗链接。设置systemd脚本的时候,写入环境变量。

Environment="LC_ALL=C"

启动脚本

Seafile启动脚本

sudo nano /etc/systemd/system/seafile.service
[Unit]
Description=Seafile
# add mysql.service or postgresql.service depending on your database to the line below
After=network.target

[Service]
Type=oneshot
ExecStart=/home/seafile/seafile-server-latest/seafile.sh start
ExecStop=/home/seafile/seafile-server-latest/seafile.sh stop
RemainAfterExit=yes
User=seafile
Group=seafile

[Install] 
WantedBy=multi-user.target

Seahub启动脚本

sudo nano /etc/systemd/system/seahub.service
[Unit]
Description=Seafile hub
After=network.target seafile.service

[Service]
# change start to start-fastcgi if you want to run fastcgi
Environment="LC_ALL=C"
ExecStart=/home/seafile/seafile-server-latest/seahub.sh start
ExecStop=/home/seafile/seafile-server-latest/seahub.sh stop
User=seafile
Group=seafile
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

重新加载 systemd 的系统服务配置

sudo systemctl daemon-reload

# 启动seafile
sudo systemctl start seafile.service
sudo systemctl start seahub.service
# 开机自启
sudo systemctl enable seafile.service
sudo systemctl enable seahub.service