华为云上部署Seafile私人网盘
华为云上部署Seafile私人网盘
- 一、环境的准备
- 1、安装Nginx
- 2、安装Mariadb(Mysql)
- 3、安装其他的其他依赖组件
- 二、安装Seafile服务器端(Linux)
- 1、下载seafile安装文件
- 2、安装Seafile
- 三、Seafile配置
- 1、启动seafile服务
- 2、修改配置文件
本教程的服务器采用华为云x86架构云主机。系统为centos7.6,搭配Mariadb数据库
一、环境的准备
1、安装Nginx
在本次部署上不需要
yum install nginx -y
安装成功配置nginx反向代理。
安装完成过开启并设置开机自启动
systemctl start nginx #启动
systemctl enable nginx # 设置开机自启动
2、安装Mariadb(Mysql)
yum安装Mariadb
yum install mariadb-server -y
安装成功
systemctl start mariadb.service #启动
systemctl enable mariadb.service # 设置开机自启动
进行数据库初始化(设置root的密码,后续安装Seafile时需要)
mysql_secure_installation
初始化选项设置Enter current password for root (enter for none): #初次运行直接回车Set root password? [Y/n] #是否设置root用户密码,直接回车New password: #设置root用户的密码(数据库的根密码)Re-enter new password: #再输入一次你设置的密码Remove anonymous users? [Y/n] #是否删除匿名用户,直接回车Disallow root login remotely? [Y/n] #是否禁止root远程登录,这里选择允许。Remove test database and access to it? [Y/n] #是否删除test数据库,直接回车Reload privilege tables now? [Y/n] #是否重新加载权限表,直接回车
3、安装其他的其他依赖组件
参考Seafile安装手册
yum install -y python-setuptools python-imaging python-ldap MySQL-python python-memcached python-urllib3
安装完成
二、安装Seafile服务器端(Linux)
1、下载seafile安装文件
下载方式有很多,可以在本机上去官网下载下载利用wincap软件,将文件传输到linux服务器的opt文件夹里
如果云主机绑定了公网IP,建议使用wget安装。
这里建议下载7.0.x版本,因为seafile 9.0.x 版本不支持在 Centos 系统 tar 包部署,支持 Docker 方式部署
wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.0.5_x86-64.tar.gz
下载成功
mkdir /opt/seafile #创建目录
mv seafile-server_* /opt/seafile #将下载好的文件移动到seafile目录下
cd /opt/seafile #进入seafile目录
tar -xzf seafile-server_* #解压文件
解压完成
mkdir installed #创建目录
mv seafile-server_* installed #将安装包移动到install目录
到此步文件的目录
├── installed
│ └── seafile-server_7.0.5_x86-64.tar.gz
└── seafile-server-7.0.5├── reset-admin.sh├── runtime├── seafile├── seafile.sh├── seahub├── seahub.sh├── setup-seafile-mysql.sh└── upgrade
这样设计目录的好处在于
和 seafile 相关的配置文件都可以放在 /opt/seafile/conf 目录下,便于集中管理.
后续升级时,你只需要解压最新的安装包到 /opt/seafile 目录下.
2、安装Seafile
进入解压后的文件夹
cd seafile-server-7.0.5/
运行安装脚本
./setup-seafile-mysql.sh #运行安装脚本并回答预设的问题
[root@ecs-seafile seafile-server-7.0.5]# ./setup-seafile-mysql.sh #运行安装脚本并回答预设问题
Checking python on this machine ...Checking python module: python-mysqldb ... Done.-----------------------------------------------------------------
This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual athttps://github.com/haiwen/seafile/wikiPress ENTER to continue
-----------------------------------------------------------------
What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ] pdsuWhat is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 120.46.189.121Where do you want to put your seafile data?
Please use a volume with enough free space
[ default "/opt/seafile/seafile-data" ] Which port do you want to use for the seafile fileserver?
[ default "8082" ]
-------------------------------------------------------
Please choose a way to initialize seafile databases:
-------------------------------------------------------
[ server name ] :Seafile服务器的名字(3-15个字符)不能中文。
[ This server’s ip or domain ] :Seafile服务器的ip或者域名,这里使用云主机的公网ip。
[ default “/opt/seafile/seafile-data” ] :Seafile服务器文件的存放位置,这里默认 直接回车。
[ default “8082” ] :服务器的端口,用于同步文件这里选择默认。
进行到这一步, 你会被要求选择一种创建 Seafile 数据库的方式:
[1] Create new ccnet/seafile/seahub databases #如果选择1, 你需要提供根密码. 脚本程序会创建数据库和用户。
[2] Use existing ccnet/seafile/seahub databases #如果选择2, 数据库应该已经被你(或者其他人)提前创建。
在这里我们选择1
What is the host of mysql server?
[ default "localhost" ] #如果你的数据库没有更改,默认即可
What is the port of mysql server?
[ default "3306" ] #数据库端口默认
What is the password of the mysql root user?
[ root password ] #输入数据库初始化的root用户密码
verifying password of user root ... done
Enter the name for mysql user of seafile. It would be created if not exists.
[ default "seafile" ] 设置默认的seafile数据库名称,默认即可
Enter the password for mysql user "seafile":
[ password for seafile ] 设置seafile数据库的密码,自行设置
Enter the database name for ccnet-server:
[ default "ccnet-db" ] 默认,直接回车
Enter the database name for seafile-server:
[ default "seafile-db" ] 默认,直接回车
Enter the database name for seahub:
[ default "seahub-db" ] 默认,直接回车
完成上述后,会有如下提示界面:
然后回车开始配置,创建完成后提示
现在你的目录结构看起来应该是这样:
seafile
├── ccnet # configuration files
│ ├── mykey.peer
│ ├── PeerMgr
│ └── seafile.ini
├── conf
│ └── ccnet.conf
│ └── seafile.conf
│ └── seahub_settings.py
│ └── gunicorn.conf
├── installed
│ └── seafile-server_7.0.0_x86-64.tar.gz
├── seafile-data
├── seafile-server-7.0.0 # active version
│ ├── reset-admin.sh
│ ├── runtime
│ ├── seafile
│ ├── seafile.sh
│ ├── seahub
│ ├── seahub.sh
│ ├── setup-seafile-mysql.sh
│ └── upgrade
├── seafile-server-latest # symbolic link to seafile-server-7.0.0
├── seahub-data
│ └── avatars
至此,seafile安装完成!
三、Seafile配置
1、启动seafile服务
切换到seafile的文件目录
cd /opt/seafile/seafile-server-latest
在 seafile-server-latest 目录下,运行如下命令
启动 Seafile服务
./seafile.sh start # 启动 Seafile 服务
启动成功,如下图所示
启动 Seahub 网站
./seahub.sh start # 启动 Seahub 网站
启动成功,第一次启动会提示设置管理员账户相关信息。
What is the email for the admin account?
[ admin email ] #设置管理员账户邮箱
What is the password for the admin account?
[ admin password ] # 设置管理员密码
[ admin password again]# 确认管理员密码
到此Seafile服务已经安装完成
但是在7.0.x 版本之后,8000端口默认监听在127.0.0.1地址上,这意味着您无法直接通过8000端口访问Seafile服务。建议您配置nginx反向代理。
或者直接修改配置文件
2、修改配置文件
首先需要关闭服务
还是在seafile-server-latest问价夹下进行
./seafile.sh stop./seahub.sh stop
修改文件
vim /opt/seafile/conf/gunicorn.conf
将bind = "127.0.0.1:8000"改为将bind = “0.0.0.0:8000”
:wq保存退出
重新启动服务
./seafile.sh start./seahub.sh start
在本机浏览器直接输入主机地址,就可以访问了,
http://x.x.x.x:8000/
登陆成功后进入网盘
如果访问不成功,在安全组配置中放通8000,8002端口
参考> https://cloud.seafile.com/published/seafile-manual-cn/deploy/using_mysql.md
华为云上部署Seafile私人网盘相关推荐
- 云上武功秘籍(一)华为云上部署金蝶星空ERP
每天琐事缠身,查错.维护.开接口?--不,你可以更加富有创造力! 假期千里迢迢飞回公司机房处理一个小故障?--不,你可以更加自由高效! 如果这就是你的写照,那为什么不选择上云呢? 如果要上云,那为什么 ...
- HTML制作的私人网盘,在自己的服务器上一键搭建私人网盘
最近开始有了搭建私有网盘的想法,主要是考虑到数据安全和私密.同时,会偶尔遇到资源难以下载的情形,于是便想着利用服务器来离线下载.虽然我现在使用命令行无障碍,但是如果是抱着长期管理文件/笔记的想法,那还 ...
- docker部署owncloud私人网盘
docker部署owncloud私人网盘 1.部署mysql数据库 2.部署owncloud 1.部署mysql数据库 [root@tencent ~]# docker pull mysql:5.7 ...
- 【Docker】使用docker安装部署NextCloud私人网盘
[Docker]使用docker安装部署NextCloud私人网盘 1.查询并下载NextCloud镜像 执行命令 docker search nextcloud docker pull nextcl ...
- linux部署来源网盘,在CentOS8.2上搭建Nextcloud私人网盘
前言 Nextcloudd是一个开源的.基于本地的文件共享和协作平台,它允许您保存文件并通过多个设备(如PC.智能手机和平板电脑)访问它们. 同样的我们可以自己购买一个云服务器,部署一个属于自己的私人 ...
- 想要在华为云上部署javaweb项目怎么做
前言 之前使用过华为云部署了一个简单的javaweb 项目,其中遇到了许多问题,现就这一篇博客简单说下我是如何部署项目. 入站规则和出站规则 简单的说,出站就是你访问外网,入站就是外网访问你. 具体说 ...
- 利用阿里云OSS开发一个私人网盘/外链系统,php+js实现
什么是阿里云OSS? 简单地理解,阿里云OSS(以下简称OSS)就是一个储存空间比较大的硬盘. 一般储存空间在40GB-400TB范围内 根据自己的需要去购买,而且便宜! 在阿里云官网可以购买. 我自 ...
- 华为云linux服务器配置,华为公有云服务器CentOS 7下部署Seafile个人网盘
最近买了一台华为ECS云服务器,系统为CentOS7 64位,1核心1G内存,40G硬盘,1M带宽,配置了云监控,报警和基本DDos防御. 虽然配置不高,拿来学习是可以的.但是我想充分利用上云服务器, ...
- 云上武功秘籍(三)华为云上部署金蝶EAS Cloud
每天琐事缠身,查错.维护.开接口?--不,你可以更加富有创造力! 假期千里迢迢飞回公司机房处理一个小故障?--不,你可以更加自由高效! 如果这就是你的写照,那为什么不选择上云呢? 如果要上云,那为什么 ...
最新文章
- Oracle认证成功获取方案
- spring10: 引用类型的自动注入
- PNaCl:Google通过LLVM增强对Chrome中原生应用的支持
- python tkinter_Python+tkinter开发一个电子宠物(2 按钮)
- boost::interprocess::windows_shared_memory用法的测试程序
- springboot切面返回值_SpringBoot实战15-Spring基础-AOP
- [图]美专家称人类可能永远无法飞出太阳系
- jsp:include标签与include指令的区别
- 服务器网站链接ip限制,apache服务器对同一IP地址的连接限制
- 中国女排代言作业帮直播课,作业帮累计用户已超8亿
- php 等比例缩略图,PHP等比例生成缩略图
- css3相关笔记(五)
- 平均值、中位数、众数等统计特性的matlab求解与示例
- linux运行mentohust,Ubuntu下使用MentoHUST代替锐捷认证上网
- Android实现键盘拨号
- arduino/Mixly TEMT6000环境光传感器
- 当WebRTC Pion示例无音频流的时候,如何添加音频模块并通过浏览器播放?
- 巴厘岛7天6晚实用型游记
- 自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!
- MySQL与自然语言处理_zt 计算语言学 与 自然语言处理