CentOS 7.6安装部署Seafile服务器
创始人
2025-01-17 22:03:10
0

今天飞飞和你们分享CentOS 7.6上安装基于MySQL/MariaDB的Seafile服务器的方法,包括下载和安装7.0.5版本、配置数据库、启动服务器等步骤。安装成功后,需要通过nginx反向代理才能访问seafile服务。

通过预编译好的安装包来安装并运行基于 MySQL/MariaDB 的 Seafile 服务器。(MariaDB 是 MySQL 的分支)

下载seafile安装包

目前官方最新更新的11.0.5版本还未在CentOS系统上测试过,所以还是选择安装7.0.5版本

mkdir /opt/seafile   #在opt目录新建seafile文件夹 cd /opt/seafile      #切换到seafile目录 wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.0.5_x86-64.tar.gz tar -xzf seafile-server_7.0.5_x86-64.tar.gz    #解压 

为了方便版本升级,我们可以将seafile安装包放在/opt/seafile独立的文件夹内

mkdir installed   #新建installed文件夹 

将tar -xzf seafile-server_7.0.5_x86-64.tar.gz文件转移到installed文件夹中

mv seafile-server_7.0.5_x86-64.tar.gz /installed 

依赖下载

yum install python python-setuptools MySQL-python python-urllib3 python-ldap -y 

下载宝塔面板

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh 1ba5f33df 

在宝塔面板中安装MySQL、nginx和phpMyAdmin,方便获取数据库的root密码,安装时需要用。

安装seafile服务器

cd seafile-server-7.0.5 ./setup-seafile-mysql.sh  #运行安装脚本并回答预设问题 
Press ENTER to continue   #回车继续 
What is the name of the server? It will be displayed on the client. 3 - 15 letters or digits [ server name ]  #服务器的名称,随便填写 
What is the ip or domain of the server? For example: www.mycompany.com, 192.168.1.101 [ This server's ip or domain ]   #服务器IP或是域名,示例www.fwqdby.com,**.***.***.*** 
Where do you want to put your seafile data? Please use a volume with enough free space [ default "/opt/seafile/seafile-data" ]   #存放seafile数据的路径,默认是/opt/seafile/seafile-data 
Which port do you want to use for the seafile fileserver? [ default "8082" ]   #seafile服务器的端口,默认是8082,如果是云服务器,需要在防火墙/安全组放行 
[1] Create new ccnet/seafile/seahub databases [2] Use existing ccnet/seafile/seahub databases   #创建seafile数据库的方式 

1、提供root密码(非root用户登录密码,数据库root密码),脚本程序新建数据库和用户
2、使用已经提前创建的数据库和用户

我选择的是1,新建数据库和用户
在这里插入图片描述

What is the host of mysql server? [ default "localhost" ]   #MySQL数据库的访问权限,默认是localhost,默认就好 
What is the port of mysql server? [ default "3306" ]   #MySQL服务器的端口,默认是3306 
What is the password of the mysql root user? [ root password ]   #MySQL服务器root用户的密码,如果是你不知道,可以在宝塔的数据库-root密码中查看,密码是不会显示出来的,输入后直接回车 
Enter the name for mysql user of seafile. It would be created if not exists. [ default "seafile" ]   #seafile数据库用户名,默认seafile 
Enter the password for mysql user "seafile": [ password for seafile ]   #seafile数据库用户密码,可自定义,输入回车即可 
Enter the database name for ccnet-server: [ default "ccnet-db" ]   #输入ccnet服务器的数据库名称,默认ccet-db 
Enter the database name for seafile-server: [ default "seafile-db" ]   #输入seafile服务器的数据库名称,默认seafile-db 
Enter the database name for seahub: [ default "seahub-db" ]    #输入seahub的数据库名称,默认seahub-db 

确认好数据库配置没问题后,回车继续

如果是安装成功,你可以看到如下输出

在这里插入图片描述
安装成功后,你的seafile文件夹里会有个seafile-server-latest文件夹,为指向当前seafile服务器文件夹的符号连接,后面升级新版本后,升级脚本会自动更新使其始终指向最新的seafile服务器文件。

启动Seafile服务器和seahub网站

在seafile-server-latest目录下运行seafile.sh和seahub.sh

cd /opt/seafile/seafile-server-latest   #切换到seafile-server-latest目录下 ./seafile.sh start  #启动seafile服务 ./seahub.sh start   #启动seahub网站(默认运行在127.0.0.1:8000端口上) 

第一次启动seahub时,脚本会引导你创建一个seafile管理员账号。

What is the email for the admin account? [ admin email ]   #输入管理员邮箱 
What is the password for the admin account? [ admin password ]   #输入管理员密码,可自定义 
Enter the password again: [ admin password again ]   #再一次输入管理员密码 
Seahub is started #说明已经启动成功了。 

7.0.x版本后,8000端口默认监听在127.0.0.1地址上,这意味着无法直接通过8000端口访问seafile服务。需要配置nginx反向代理

以上就是关于CentOS 7.6服务器安装部署seafile服务器的方法

感谢您的阅读,服务器大本营助您成为更专业的服务器管理员!-

相关内容

热门资讯

必备辅助推荐!湖北休闲辅助(关... 必备辅助推荐!湖北休闲辅助(关于辅助软件)确实有透视方针运湖北休闲辅助辅助工具,进入游戏界面。进入湖...
科技分享!丰城双剑辅助(总结辅... 科技分享!丰城双剑辅助(总结辅助神器)真是有透视演示1、丰城双剑辅助免费脚本咨询教程、丰城双剑辅助免...
热点推荐!微信开心泉州有技巧吗... 热点推荐!微信开心泉州有技巧吗(解迷辅助器)确实有透视手段该软件可以轻松地帮助玩家将微信开心泉州有技...
分辨真假!闲逸游戏辅助软件下载... 分辨真假!闲逸游戏辅助软件下载(详情辅助工具)切实有透视教材1、进入到闲逸游戏辅助软件下载是否有挂之...
盘点十款!传送屋有挂吗(了解辅... 盘点十款!传送屋有挂吗(了解辅助挂)确实有透视演示所有人都在同一条线上,像星星一样排成一排,每一代传...
重大发现!小程序66徐州辅助(... 重大发现!小程序66徐州辅助(关于辅助教程)一直有透视手册该软件可以轻松地帮助玩家将小程序66徐州辅...
实测揭晓!胡乐胡乐辅助脚本可靠... 实测揭晓!胡乐胡乐辅助脚本可靠吗(科普辅助软件)一贯有透视秘籍1、打开软件启动之后找到中间准星的标志...
免费测试版!邯郸胡乐挂辅助(解... 免费测试版!邯郸胡乐挂辅助(解谜辅助神器)原来有透视手段1、进入到邯郸胡乐挂辅助是否有挂之后,能看到...
一分钟了解!潮汕鱼虾蟹app源... 一分钟了解!潮汕鱼虾蟹app源码(专业辅助器)果然有透视模板一、潮汕鱼虾蟹app源码游戏安装教程牌型...
盘点一款!福麻圈辅助器(关于辅... 盘点一款!福麻圈辅助器(关于辅助神器)本来有透视练习1、超多福利:超高返利,海量正版游戏,福麻圈辅助...