当前位置: 移动技术网 > 科技>操作系统>Linux > Centos7.x部署SeaFile私有网盘

Centos7.x部署SeaFile私有网盘

2019年12月16日  | 移动技术网科技  | 我要评论

1.安装依赖环境
yum -y install wge gcc-c++ ..........

2.关闭firewalld防火墙和selinux
systemctl stop firewalld
systemct disable firewalld
cd /etc/selinux/config
把enable更改成disabled

3.安装epel、nux dextop

安装epel

rpm -ivh http://mirrors.ustc.edu.cn/epel/7/x86_64/packages/e/epel-release-7-11.noarch.rpm

安装nux dextop

rpm --import http://li.nux.ro/download/nux/rpm-gpg-key-nux.ro
rpm -uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

4.安装mysql或mariadb
yum -y install mariadb mariadb-server
systemctl enable mariadb
systemctl start mariadb

5.进行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]

6.登录数据库
mysql -uroot -p #能正常进入数据库说明已经部署成功

7.给数据库设置权限

允许任意ip使用root远程连接

create user 'root'@'%' identified by 'root远程登录的密码';

添加权限给该root

grant all privileges on . to 'root'@'%' identified by 'root远程登录的密码';

配置立即生效

flush privileges;

8.安装seafile依赖环境
yum install -y python-memcached python-ldap python-urllib3 python-imaging mysql-python python-distribute ffmpeg ffmpeg-devel

9.下载源码包
wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_6.2.5_x86-64.tar.gz

10.解压源码包
tar -zxf seafile-server_6.2.5_x86-64.tar.gz -c 路径

11.进入已经解压的文件进行安装
cd seafile-server-*
./setup-seafile-mysql.sh

12.根据下面内容进行自行设置

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

what is the name of the server? it will be displayed on the client.

  • 15 letters or digits
    [ server name ] opsbakpe

输入ip或域名,由于内部使用直接ip,输入ip后回车。

what is the ip or domain of the server?
for example: www.mycompany.com, 192.168.1.101
[ this server's ip or domain ] 192.168.16.203

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

where do you want to put your seafile data?
please use a volume with enough free space
[ default "/root/seafile-data" ]

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

which port do you want to use for the seafile fileserver?
[ default "8082" ]

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

please choose a way to initialize seafile databases:

[1] create new ccnet/seafile/seahub databases
[2] use existing ccnet/seafile/seahub databases

[ 1 or 2 ] 1

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

what is the host of mysql server?
[ default "localhost" ]

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

what is the port of mysql server?
[ default "3306" ]

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

enter the name for mysql user of seafile. it would be created if not exists.
[ default "seafile" ]

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

enter the password for mysql user "seafile":
[ password for seafile ]

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

enter the database name for ccnet-server:
[ default "ccnet-db" ]

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

enter the database name for seafile-server:
[ default "seafile-db" ]

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

enter the database name for seahub:
[ default "seahub-db" ]
等待片刻........提示安装成功

13.启动服务
./seafile.sh start

14.启动端口
./seafile.sh start 80 #没有设置端口默认是8000端口

15.访问
http://ip:80/ #如果没设置端口号就默认就行

16.登录账号密码

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网