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;


seafile_第1张图片


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" ] 


./reset-admin.sh     创建登入用户名 密码/修改密码

E-mail address: [email protected]

Password: 

Password (again): 

Superuser created successfully


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 设置开机启动默认没有启动脚本


http://serverip:8000

seafile_第2张图片


seafile_第3张图片


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)


seafile_第4张图片

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


seafile_第5张图片

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


seafile_第6张图片