Seafile 是一款安全、高性能的開源網盤(雲存儲)軟件。Seafile 提供了主流網盤(雲盤)產品所具備的功能,包括文件同步、文件共享等。在此基礎上,Seafile 還提供了高級的安全保護功能以及羣組協做功能。因爲 Seafile 是開源的,你能夠把它部署在私有云的環境中,做爲私有的企業網盤。Seafile 支持 Mac、Linux、Windows 三個桌面平臺,支持 Android 和 iOS 兩個移動平臺python
實驗環境mysql
centos7_x64linux
seafile_server 192.168.10.17sql
seafile_client_windows 192.168.10.18數據庫
實驗軟件windows
seafile-server_6.0.8_x86-64.tar.gzcentos
seafile-6.2.11.msi安全
軟件安裝服務器
sed -i.bak 's/https/http/g' /etc/yum.repos.d/epel.repodom
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;
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: xxx@126.com
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 設置開機啓動默認沒有啓動腳本
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)
windows客戶端數據目錄 須要自行建立
用戶名/密碼爲 服務器建立