seafile

£可爱£侵袭症+ 提交于 2020-07-28 20:36:56

Seafile 是一款安全、高性能的开源网盘(云存储)软件。Seafile 提供了主流网盘(云盘)产品所具有的功能,包括文件同步、文件共享等。在此基础上,Seafile 还提供了高级的安全保护功能以及群组协作功能。由于 Seafile 是开源的,你可以把它部署在私有云的环境中,作为私有的企业网盘。Seafile 支持 Mac、Linux、Windows 三个桌面平台,支持 Android 和 iOS 两个移动平台


实验环境

centos7_x64

seafile_server                192.168.10.17

seafile_client_windows  192.168.10.18


实验软件

seafile-server_6.0.8_x86-64.tar.gz

seafile-6.2.11.msi


软件安装

sed -i.bak 's/https/http/g' /etc/yum.repos.d/epel.repo

cat /etc/sysconfig/selinux

SELINUX=disabled

systemctl stop firewalld.service && systemctl disable firewalld.service

python --version     如使用centos6先升级Python 

Python 2.7.5

yum -y install mariadb mariadb-server

yum install -y python-memcached  python-ldap  python-urllib3  python-imaging 

yum install -y MySQL-python python-distribute 

systemctl start mariadb

mysqladmin  -uroot password 数据库密码

mysql -uroot -p数据库密码

MariaDB [(none)]> create user 'root'@'%' identified by '数据库密码';

MariaDB [(none)]> grant all privileges on *.* to 'root'@'%' identified by '数据库密码';

MariaDB [(none)]> flush privileges;


se1.jpg


tar zxvf /root/seafile-server_6.0.8_x86-64.tar.gz

mv /root/seafile-server-6.0.8/ /usr/local/seafile

cd /usr/local/seafile/

./setup-seafile-mysql.sh 

[ server name ] seafileserver

[ This server's ip or domain ] 192.168.10.17

[ default "/usr/local/seafile-data" ]

[ default "8082" ] 

[1] Create new ccnet/seafile/seahub databases

[2] Use existing ccnet/seafile/seahub databases

[ 1 or 2 ] 1 

[ default "localhost" ]

[ default "3306" ] 

[ root password ]  输入数据库root密码

Enter the password for mysql user "seafile":

[ password for seafile ] 

Enter the database name for ccnet-server:

[ default "ccnet-db" ] 

Enter the database name for seafile-server:

[ default "seafile-db" ] 

Enter the database name for seahub:

[ default "seahub-db" ] 


touch  /etc/systemd/system/seafile.service 创建启动脚本

cat /etc/systemd/system/seafile.service 

[Unit]

Description=Seafile

After=mariadb.service


[Service]

Type=oneshot

ExecStart=/usr/local/seafile/seafile.sh start

ExecRestart=/usr/local/seafile/seahub.sh restart

ExecStop=/usr/local/seafile/seafile.sh stop

RemainAfterExit=yes


[Install]

WantedBy=multi-user.target

touch  /etc/systemd/system/seahub.service


cat /etc/systemd/system/seahub.service 

[Unit]

Description=Seafile hub

After=network.target seafile.service


[Service]

ExecStart=/usr/local/seafile/seahub.sh start

ExecRestart=/usr/local/seafile/seahub.sh restart

ExecStop=/usr/local/seafile/seahub.sh stop

Type=oneshot

RemainAfterExit=yes


[Install]

WantedBy=multi-user.target


systemctl daemon-reload

systemctl restart seafile && systemctl enable seafile

systemctl restart seahub && systemctl enable seahub   

systemctl restart mariadb && systemctl enable mariadb 设置开机启动默认没有启动脚本


cd /usr/local/seafile        创建登入用户名 密码

./reset-admin.sh 

E-mail address: xxx@126.com

Password: 

Password (again): 

Superuser created successfully


http://serverip:8000

se2.jpg


se3.jpg


lsof  -i:8000

COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

python2.7 4409 root   10u  IPv4  33878      0t0  TCP *:irdmi (LISTEN)

python2.7 4418 root   10u  IPv4  33878      0t0  TCP *:irdmi (LISTEN)

lsof  -i:8082

COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

seaf-serv 3844 root   20u  IPv4  29148      0t0  TCP *:us-cli (LISTEN)


se1.jpg

windows客户端数据目录 需要自行创建


se2.jpg

用户名/密码为 服务器创建


se4.jpg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!