seafile7.0.3安装

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了seafile7.0.3安装相关的知识,希望对你有一定的参考价值。

1.查看系统版本和系统内核
命令:
cat /etc/redhat-release
uname -r
技术图片

2.编辑selinux文件,关闭selinux(需要重启计算机才能生效)
命令:vi /etc/sysconfig/selinux
技术图片

不重新启动关闭selinux生效方法
命令:setenforce 0
技术图片

3.查看并关闭开机自动启动防火墙
查看防火墙的状态
命令:systemctl status firewalld
技术图片

关闭防火墙开机自动启动(重启生效)
命令:systemctl disable firewalld
技术图片

临时关闭防火墙(立即生效)
命令:systemctl stop firewalld
技术图片

4.安装组件包
4.1 安装epel源
命令:yum -y install epel-release
技术图片

4.2 安装nux
命令:
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
技术图片

4.3 安装python-pip
命令:yum -y install python-pip
技术图片

对pip进行更新
命令:pip install --upgrade pip
技术图片

更新setuptools工具
命令:
pip install --upgrade setuptools
python -m pip install --upgrade pip
技术图片

4.4 安装其它的依赖组件包
命令:yum -y install python-imaging mysql-python python-memcached python-ldap mariadb-server mariadb python-urllib3 ffmpeg ffmpeg-devel
技术图片

4.5 安装pillow moviepy
命令:pip install pillow moviepy
技术图片

5.启动mariadb数据库
命令:systemctl start mariadb
技术图片
对数据库进行密码设置(数据库root用户的密码)
命令:mysql_secure_installation
技术图片
技术图片

登录数据库
命令:
mysql -uroot -p
a123456
技术图片
创建seafile需要的数据库及用户,并对此些数据库进行授权
create database ccnet_db character set = ‘utf8‘;
create database seafile_db character set = ‘utf8‘;
create database seahub_db character set = ‘utf8‘;
create user [email protected]‘192.168.80.%‘ identified by ‘b123456‘;

grant all privileges on ccnet_db.* to [email protected]‘192.168.80.%‘ identified by ‘b123456‘;

grant all privileges on seafile_db.* to [email protected]‘192.168.80.%‘ identified by ‘b123456‘;

grant all privileges on seahub_db.* to [email protected]‘192.168.80.%‘ identified by ‘b123456‘;
flush privileges;
exit
技术图片

6.从官网上下载最新版的seafile-server文件(最新版本为:seafile-server-7.0.3并上传至服务器指定的目录)
安装lrzsz
命令:yum -y install lrzsz
技术图片
上传文件至指定的目录(/usr/local/seafile),如seafile目录不存在,则新建此目录
命令:
mkdir -pv /usr/local/seafile
cd /usr/local/seafile
技术图片

7.解压seafile-server文件
命令:
tar xf seafile-server_7.0.3_x86-64.tar.gz
技术图片

8.对解压出来的目录seafile-server-7.0.3进入改名并删除上传的tar.gz文件
命令:
mv seafile-server-7.0.3 seafile-server
rm -fr /usr/local/seafile/seafile-server_7.0.3_x86-64.tar.gz
技术图片

9.安装seafile

命令:
cd /usr/local/seafile/seafile-server
./setup-seafile-mysql.sh #设置服务器,IP地址,数据存储位置,seafile端口,数据库IP地址,前面创建的用户和三个库等
技术图片
技术图片
技术图片
技术图片
10.启动seafile
命令:
cd /usr/local/seafile/seafile-server
./seafile.sh start
技术图片

11.启动seahub, 开初始化web页面的用户名和密码(第一次运行)
命令:
cd /usr/local/seafile/seafile-server
./seahub.sh start
技术图片
12.安装完成了seafile7.X,默认是不允许直接使用ip:端口访问(192.168.80.120:8001),如果需要使用(192.168.80.120:8001)来访问,修改/usr/local/seafile/conf/gunicorn.conf文件,把里面的
bind="127.0.0.1:8000"修改为bind="0.0.0.0:8001"
命令:
cd /usr/local/seafile/conf
vi gunicorn.conf
技术图片

13.重新启动seahub
命令:
cd /usr/local/seafile/seafile-server
./seahub.sh restart
技术图片

14.打开网页,在地址栏处输入:http://192.168.80.120:8001即可访问seafile了
技术图片

以上是关于seafile7.0.3安装的主要内容,如果未能解决你的问题,请参考以下文章

安装seafile 专业版步骤

seafile安装

Docker 安装 Seafile 版企业网盘

在CentOS下利用Docker一键安装seafile

Seafile 网络磁盘

搭建私人网络硬盘个人网盘,百度网盘——Seafile安装部署指南