放弃百度网盘吧!搭建自己的私有云盘seafile

放弃百度网盘吧!搭建自己的私有云盘seafile

SofM 2019-12-18 17:32:58

seafile云盘你可以在内网机器或虚拟机搭建这样比较适合企业内部或者家庭协同用,也可以找个公网的机器或者虚拟机搭建一个可以随时随地查看下载云盘文件。

准备工作

安装wget

yuminstall -y wget

关闭防火墙

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

启动开机启动Mariadb

systemctlstartmariadb

systemctlenablemariadb

Mariadb一些安全设置

mysql_secure_installation

#根据下面提示进行设置

# 第一次运行密码为空,回车。

Entercurrentpasswordforroot(enter for none):

# 需要设置root密码,输入y后回车。

Setrootpassword?[Y/n]y

# 是否删除匿名用户,回车。

Removeanonymoususers?[Y/n]

# 是否禁止root远程登录,回车。

Disallowrootloginremotely?[Y/n]

# 是否删除test数据库,回车。

Removetestdatabaseandaccesstoit?[Y/n]

# 是否重新加载权限表,回车。

Reloadprivilegetablesnow?[Y/n]

安装依赖

yuminstall-y python-memcached \

python-ldap \

python-urllib3 \

python-imaging \

MySQL-python \

python-distribute\

ffmpeg \

ffmpeg-devel

安装seafile

#新建一个放置压缩包的目录

mkdir seafile

#进入目录

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

#进入目录运行脚本安装

cd seafile-server-*

./setup-seafile-mysql.sh

根据下列提示进行安装

# 显示给客户端的服务名,输入服务名后回车。

Whatisthe name of the server?Itwill be displayed on the client.

3-15letters or digits

[ server name ]OpsBakPE

# 输入ip或域名,由于内部使用直接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

# 使用默认,将数据文件放在/root/seafile-data下,回车。

Wheredoyou want to put your seafile data?

Pleaseuse a volume with enough free space

[default"/root/seafile-data"]

# 使用默认的文件服务端口8082,回车。

Whichportdoyou want to useforthe seafile fileserver?

[default"8082"]

# 使用新的seahub数据库,输入1后回车。

-------------------------------------------------------

Pleasechoose a way to initialize seafile databases:

-------------------------------------------------------

[1]Createnew ccnet/seafile/seahub databases

[2]Useexisting ccnet/seafile/seahub databases

[1or2]1

# 由于刚才装了mariadb,使用默认本地,回车。

Whatisthe host of mysql server?

[default"localhost"]

# mariadb的默认端口就是3306,回车。

Whatisthe port of mysql server?

[default"3306"]

# 使用默认的seafile作为seafile使用mariadb的用户,回车。

Enterthe nameformysql user of seafile.Itwould be createdifnot exists.

[default"seafile"]

# 输入mariadb的用户seafile的密码,回车。

Enterthe passwordformysql user"seafile":

[ passwordforseafile ]

# 使用默认ccnet-db作为ccnet-server使用的数据库名,回车。

Enterthe database nameforccnet-server:

[default"ccnet-db"]

# 使用默认seafile-db作为seafile-server使用的数据库名,回车。

Enterthe database nameforseafile-server:

[default"seafile-db"]

# 使用默认seahub-db作为seahub使用的数据库名,回车。

Enterthe database nameforseahub:

[default"seahub-db"]

检查无误后回车进行安装

稍等片刻安装完成

启动seafile、seahub

./seafile.shstart

#这里加了80端口,不加端口的情况下默认运行在8000端口上

./seahub.sh start 80

#第一次启动 seahub 时,seahub.sh脚本会提示创建seafile管理员帐号

访问seafile

浏览器访问http://部署seafile的虚拟机IP,使用刚才创建的管理员账号登录。

安装完成

----------------------------------------------------------------------------------------------

以下是seafile云盘支持的客户端附上下载链接:

https://www.seafile.com/download/

你可能感兴趣的:(放弃百度网盘吧!搭建自己的私有云盘seafile)