一、簡介
Seafile是一個開源、專業、可靠的雲存儲平臺;解決文件集中存儲、共享和跨平臺訪問等問題,由北京海文互知網絡有限公司開發,發佈於2012年10月;除了一般網盤所提供的雲存儲以及共享功能外,Seafile還提供消息通信、羣組討論等輔助功能,幫助更好的圍繞文件展開協同工作。
官網:https://www.seafile.com/home/
下載:https://www.seafile.com/download/
Centos 服務安裝包:http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.0.5_x86-64.tar.gz
Windows 服務安裝包:http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_6.0.7_win32.tar.gz
二、基本環境
1、系統說明
系統:CentOS-7-x86_64-Minimal-1708
下載地址:
http://archive.kernel.org/centos-vault/7.4.1708/isos/x86_64/
2、安裝虛擬機
安裝過程可參考:
https://blog.csdn.net/llwy1428/article/details/89328381
三、安裝搭建
1、安裝基本工具
[root@compute ~]# yum install -y wget vim net-tools epel-release
2、配置防火牆
關閉防火牆,並設置開機禁止啓動
關閉防火牆 : systemctl stop firewalld
查看狀態 : systemctl status firewalld
開機禁用 : systemctl disable firewalld
3、安裝數據庫
安裝 MariaDb(Mysql)
https://blog.csdn.net/llwy1428/article/details/84965680
Mariadb一些安全設置(參考)
mysql_secure_installation
#根據下面提示進行設置
# 第一次運行密碼爲空,回車。
Enter current password for root (enter for none):
# 需要設置root密碼,輸入y後回車。
Set root password? [Y/n] y
# 是否刪除匿名用戶,回車。
Remove anonymous users? [Y/n]
# 是否禁止root遠程登錄,回車。
Disallow root login remotely? [Y/n]
# 是否刪除test數據庫,回車。
Remove test database and access to it? [Y/n]
# 是否重新加載權限表,回車。
Reload privilege tables now? [Y/n]
[root@compute ~]# netstat -lntp
4、設置數 MariaDb(Mysql)據庫開機啓動
[root@compute ~]# systemctl enable mariadb
5、下載安裝 seafile-server
進入 /opt 目錄
下載安裝包
[root@compute opt]# wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.0.5_x86-64.tar.gz
6、解壓安裝包
[root@compute opt]# tar zxvf seafile-server_7.0.5_x86-64.tar.gz
查看目錄
7、安裝依賴
[root@compute ~]# yum install -y python-memcached python-ldap python-urllib3 python-imaging MySQL-python python-distribute ffmpeg ffmpeg-devel
8、初始化 seafile-server
進入文件目錄
[root@compute ~]# cd /opt/seafile-server-7.0.5/
執行初始化腳本
[root@compute seafile-server-7.0.5]# ./setup-seafile-mysql.sh
說明:
# 顯示給客戶端的服務名,輸入服務名後回車。
[ server name ] server
# 輸入ip或域名,由於內部使用直接ip,輸入ip後回車。
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 192.168.11.62
# 使用默認,將數據文件放在/root/seafile-data下,回車。
[ default "/opt/seafile-data" ]
# 使用默認的文件服務端口8082,回車。
[ default "8082" ]
# 使用新的seahub數據庫,輸入1後回車。
[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases
[ 1 or 2 ] 1
# 由於剛纔裝了mariadb,使用默認本地,回車。
[ default "localhost" ]
# mariadb的默認端口就是3306,回車。
[ default "3306" ]
# 使用默認的seafile作爲seafile使用mariadb的用戶,回車。
[ default "seafile" ]
Enter the password for mysql user "seafile":(數據庫密碼)
[ password for seafile ]
# 使用默認ccnet-db作爲ccnet-server使用的數據庫名,回車。
[ default "ccnet-db" ]
# 使用默認seafile-db作爲seafile-server使用的數據庫名,回車。
[ default "seafile-db" ]
# 使用默認seahub-db作爲seahub使用的數據庫名,回車。
[ default "seahub-db" ]
過程截圖如下:
9、啓動seafile、seahub
[root@compute seafile-server-7.0.5]# ./seafile.sh start
10、初始化管理員賬號
[root@compute seafile-server-7.0.5]# ./seahub.sh start 80
11、修改配置文件
關閉服務
[root@compute ~]# /opt/seafile-server-7.0.5/seafile.sh stop
[root@compute ~]# /opt/seafile-server-7.0.5/seahub.sh stop
修改配置文件
[root@compute ~]# vim /opt/conf/gunicorn.conf
12、啓動服務
[root@compute ~]# /opt/seafile-server-7.0.5/seafile.sh start
[root@compute ~]# /opt/seafile-server-7.0.5/seahub.sh start
13、瀏覽器訪問
http://部署seafile的虛擬機IP,使用剛纔創建的管理員賬號登錄。
設置系統信息
至此 Centos7 私有云盤 seafile 安裝完畢!
參考:
https://cloud.seafile.com/published/seafile-manual-cn/deploy/using_mysql.md