seafile参考说明:https://cloud.seafile.com/published/seafile-manual-cn/home.md
seafile专业版下载地址:https://download.seafile.com/d/6e5297246c/?p=%2Fpro&mode=list
1,阿里云centos8,按照操作执行,必要环境
# on CentOS 8
yum install python3 python3-setuptools python3-pip python3-ldap -y
yum install gcc-c++ (如果在进行pip3安装时报错gcc问题,执行该命令)
pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy psd-tools django-pylibmc django-simple-captcha
yum install jre
安装Mysql,具体请自行百度安装方式,建议安装mysql5.7版本,菜鸟教程(结合https://blog.csdn.net/EB_NUM/article/details/105425622建议数据库选择MySQL,SQLite容易出错)
https://blog.csdn.net/evil_wdpp/article/details/107709376
centos8下安装mysql5.7
# 下载安装包 # 可以自行选择下载的版本 https://repo.mysql.com/yum/
wget https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql-community-libs-5.7.33-1.el7.x86_64.rpm
wget https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql-community-common-5.7.33-1.el7.x86_64.rpm
wget https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql-community-client-5.7.33-1.el7.x86_64.rpm
wget https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql-community-server-5.7.33-1.el7.x86_64.rpm
安装
rpm -Uvh mysql-community-libs-5.7.33-1.el7.x86_64.rpm
rpm -Uvh mysql-community-common-5.7.33-1.el7.x86_64.rpm
rpm -Uvh mysql-community-client-5.7.33-1.el7.x86_64.rpm
rpm -Uvh mysql-community-server-5.7.33-1.el7.x86_64.rpm
# 启动 systemctl start mysqld # 查找默认密码 grep 'temporary password' /var/log/mysqld.log # 使用默认密码登录 mysql -u root -p # 更改默认密码 ALTER USER 'root'@'localhost' IDENTIFIED BY 'XXXXXXXX'; # 更改密码校验等级,注意,如未更改密码等级,需要设置符合大写小写数字符号组合密码。 set global validate_password_policy=0; # 远程维护授权 GRANT ALL PRIVILEGES ON *.* TO '登陆账号user'@'%' identified by 'XXXXXXXX'; # 使生效 flush privileges;
如果mysql报如下错误
mysql-community-common(x86-64) >= 5.7.9 is needed by mysql-community-libs-5.7.21-1.el7.x86_64
这个时候需要解决的是将已经安装的rpm报卸载.
通过rpm -qa |grep -i mysql或者是rpm -qa |grep -i mariadb
如果找到那个执行
rpm -e 包名刚才找到的包名即可
mkdir /opt/seafile
mv seafile-pro-server_* /opt/seafile
cd /opt/seafile
#将 seafile-server_* 移动到 seafile 目录下后
tar -xzf seafile-pro-server_*
mkdir installed
mv seafile-pro-server_* installed
cd seafile-server-* ./setup-seafile-mysql.sh #运行安装脚本并回答预设问题
如果你的系统中没有安装上面的某个软件,那么 Seafile初始化脚本会提醒你安装相应的软件包. 该脚本会依次询问你一些问题,从而一步步引导你配置 Seafile 的各项参数: 在这里, 你会被要求选择一种创建 Seafile 数据库的方式:
------------------------------------------------------- Please choose a way to initialize seafile databases: ------------------------------------------------------- [1] Create new ccnet/seafile/seahub databases [2] Use existing ccnet/seafile/seahub databases
如果选择1, 你需要提供根密码. 脚本程序会创建数据库和用户。 如果选择2, ccnet/seafile/seahub 数据库应该已经被你(或者其他人)提前创建。 如果安装正确完成,你会看到下面这样的输出
安装Nginx 添加yum源(该命令执行之后,会在/etc/yum.respos.d下面多出一个nginx.repo)
rpm -ivh http://nginx.org/packages/centos/8/x86_64/RPMS/nginx-1.20.0-1.el8.ngx.x86_64.rpm
最后,还是使用一键安装,免除后顾之忧了,centos8.0+seafile-pro-server_7.1.18_x86-64,下载好seafile-pro-server_7.1.18_x86-64,到https://github.com/haiwen/seafile-server-installer-cn下载seafile-server-7.1-centos-amd64-http
wget https://raw.githubusercontent.com/haiwen/seafile-server-installer-cn/master/seafile-server-7.1-centos-amd64-http
CentOS 8 (64bit)(写这个笔记的时候我尝试使用了centos8.3,环境还是不行,最后换成8.0成功一键安装):
bash seafile-server-centos-7-amd64-http 7.1.18