放棄百度網(wǎng)盤吧!搭建自己的私有云盤seafile
SofM?2019-12-18 17:32:58
seafile云盤你可以在內(nèi)網(wǎng)機(jī)器或虛擬機(jī)搭建這樣比較適合企業(yè)內(nèi)部或者家庭協(xié)同用,也可以找個(gè)公網(wǎng)的機(jī)器或者虛擬機(jī)搭建一個(gè)可以隨時(shí)隨地查看下載云盤文件。
準(zhǔn)備工作
安裝wget
yuminstall -y wget
關(guān)閉防火墻
systemctlstopfirewalld
systemctldisablefirewalld
安裝epel、Nux Dextop源
rpm -ivhhttp://mirrors.ustc.edu.cn/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm --importhttp://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvhhttp://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
2.部署seafile
安裝MySQL或Mariadb
yum -yinstallmariadb mariadb-server
啟動(dòng)開機(jī)啟動(dòng)Mariadb
systemctlstartmariadb
systemctlenablemariadb
Mariadb一些安全設(shè)置
mysql_secure_installation
#根據(jù)下面提示進(jìn)行設(shè)置
# 第一次運(yùn)行密碼為空,回車。
Entercurrentpasswordforroot(enter for none):
# 需要設(shè)置root密碼,輸入y后回車。
Setrootpassword?[Y/n]y
# 是否刪除匿名用戶,回車。
Removeanonymoususers?[Y/n]
# 是否禁止root遠(yuǎn)程登錄,回車。
Disallowrootloginremotely?[Y/n]
# 是否刪除test數(shù)據(jù)庫(kù),回車。
Removetestdatabaseandaccesstoit?[Y/n]
# 是否重新加載權(quán)限表,回車。
Reloadprivilegetablesnow?[Y/n]
安裝依賴
yuminstall-y python-memcached \
python-ldap \
python-urllib3 \
python-imaging \
MySQL-python \
python-distribute\
ffmpeg \
ffmpeg-devel
安裝seafile
#新建一個(gè)放置壓縮包的目錄
mkdir seafile
#進(jìn)入目錄
cd seafile
#獲取安裝包
wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_6.2.5_x86-64.tar.gz
#解壓安裝包
tar zxf seafile-server_6.2.5_x86-64.tar.gz
#進(jìn)入目錄運(yùn)行腳本安裝
cd seafile-server-*
./setup-seafile-mysql.sh
根據(jù)下列提示進(jìn)行安裝
# 顯示給客戶端的服務(wù)名,輸入服務(wù)名后回車。
Whatisthe name of the server?Itwill be displayed on the client.
3-15letters or digits
[ server name ]OpsBakPE
# 輸入ip或域名,由于內(nèi)部使用直接ip,輸入ip后回車。
Whatisthe ip or domain of the server?
Forexample: www.mycompany.com,192.168.1.101
[Thisserver's ip or domain ]192.168.16.203
# 使用默認(rèn),將數(shù)據(jù)文件放在/root/seafile-data下,回車。
Wheredoyou want to put your seafile data?
Pleaseuse a volume with enough free space
[default"/root/seafile-data"]
# 使用默認(rèn)的文件服務(wù)端口8082,回車。
Whichportdoyou want to useforthe seafile fileserver?
[default"8082"]
# 使用新的seahub數(shù)據(jù)庫(kù),輸入1后回車。
-------------------------------------------------------
Pleasechoose a way to initialize seafile databases:
-------------------------------------------------------
[1]Createnew ccnet/seafile/seahub databases
[2]Useexisting ccnet/seafile/seahub databases
[1or2]1
# 由于剛才裝了mariadb,使用默認(rèn)本地,回車。
Whatisthe host of mysql server?
[default"localhost"]
# mariadb的默認(rèn)端口就是3306,回車。
Whatisthe port of mysql server?
[default"3306"]
# 使用默認(rèn)的seafile作為seafile使用mariadb的用戶,回車。
Enterthe nameformysql user of seafile.Itwould be createdifnot exists.
[default"seafile"]
# 輸入mariadb的用戶seafile的密碼,回車。
Enterthe passwordformysql user"seafile":
[ passwordforseafile ]
# 使用默認(rèn)ccnet-db作為ccnet-server使用的數(shù)據(jù)庫(kù)名,回車。
Enterthe database nameforccnet-server:
[default"ccnet-db"]
# 使用默認(rèn)seafile-db作為seafile-server使用的數(shù)據(jù)庫(kù)名,回車。
Enterthe database nameforseafile-server:
[default"seafile-db"]
# 使用默認(rèn)seahub-db作為seahub使用的數(shù)據(jù)庫(kù)名,回車。
Enterthe database nameforseahub:
[default"seahub-db"]
檢查無(wú)誤后回車進(jìn)行安裝
稍等片刻安裝完成
啟動(dòng)seafile、seahub
./seafile.shstart
#這里加了80端口,不加端口的情況下默認(rèn)運(yùn)行在8000端口上
./seahub.sh start 80
#第一次啟動(dòng) seahub 時(shí),seahub.sh腳本會(huì)提示創(chuàng)建seafile管理員帳號(hào)
訪問seafile
瀏覽器訪問http://部署seafile的虛擬機(jī)IP,使用剛才創(chuàng)建的管理員賬號(hào)登錄。
安裝完成
----------------------------------------------------------------------------------------------
以下是seafile云盤支持的客戶端附上下載鏈接:
https://www.seafile.com/download/