惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

Rat's Blog - NextCloud

一个可以自动安装多网站程序的面板 :YunoHost安装教程 - Rat's Blog Cloudbox:一个强大的多功能云媒体服务,可自动获取视频资源并在线播放 - Rat's Blog Sharecmd:一个可以将文件上传至Google Drive/Dropbox并自动生成分享链接的工具 - Rat's Blog Caddy环境下一些Web应用程序的配置参考 - Rat's Blog Ubuntu使用Snap快速安装NextCloud网盘,并配置域名及SSL证书 - Rat's Blog 使用Docker快速安装NextCloud个人私有云盘 - Rat's Blog 使用Docker快速安装Aria2+AriaNg+Filerun/Nextcloud,在线下载BT磁链/在线观看/全功能文件管理/云盘应用 - Rat's Blog
使用NextCloud来搭建我们的私有网盘、并结合Redis优化性能 - Rat's Blog
博主: Rat's · 2017-06-15 · via Rat's Blog - NextCloud

说明:现在越来越多云盘都相继宣布关闭,差不多都去用百度云盘了,而我们手上有些比如小姐姐电影之类传上去就会被和谐,于是我们有必要自己搭建个私有云来存这些资源了,也安全,这里推荐NextCloud,一款继ownCloud之后,又一个很不错的私有云。

简介

Nextcloud是一套用于创建和使用文件托管服务的客户端-服务器软件。它在功能上类似于Dropbox,虽然Nextcloud是免费的和开源的,允许任何人在私人服务器上安装和操作它。与Dropbox等专有服务相反,开放架构允许以应用程序的形式向服务器添加附加功能。

虽然Nextcloud作为ownCloud的衍生版本,在其基础上做了许多改进,但有一些差异。ownCloud提供了一个开源社区版本,但它们还提供了一个专有的企业版,具有附加功能和支持订阅。相比之下,Nextcloud是完全开源的。

截图

请输入图片描述
请输入图片描述

更新

【2019年6月28日】
更新教程,替换为宝塔安装,并新增Redis缓存优化方案以提高NextCloud运行速度。

安装

如果不喜欢折腾的,可参考1分钟就能安装完成的方法:Snap安装教程Docker安装教程

环境要求:PHP 5.6 +MysqlNginxRedis(非必需)。

1、安装宝塔

#CentOS系统
wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
#Ubuntu系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
#Debian系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

安装完成后,进入面板,点击左侧软件商店,然后安装PHP 5.6+MysqlNginxRedis

然后点击左侧软件商店-PHP设置-安装扩展,安装Redis模块即可

接下来点击左侧网站-添加站点,填好域名和Mysql数据库用户名和密码信息。

2、上传Nextcloud程序
Nextcloud程序下载地址→传送门,目前为16.0.1版本,使用命令:

#进入站点根目录,自行修改路径
cd /www/wwwroot/www.moerats.com
#下载最新版程序,记得随时将链接换成最新版的下载地址
wget https://download.nextcloud.com/server/releases/nextcloud-16.0.1.zip
#解压并移动到根目录
unzip nextcloud-*.zip && rm -rf nextcloud-*.zip index.html
mv nextcloud/* . && rm -rf nextcloud
chown -R www:www ./

3、伪静态设置
点击站点设置-伪静态设置,添加以下代码:

location / {
    rewrite ^ /index.php$request_uri;
}

location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
    deny all;
}

location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
    deny all;
}

location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
    try_files $uri/ =404;
    index index.php;
}

location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
    try_files $uri /index.php$request_uri;
    add_header Cache-Control "public, max-age=15778463";
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;
    add_header Referrer-Policy no-referrer;

    access_log off;
}

location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
    try_files $uri /index.php$request_uri;
    access_log off;
}

4、新增Redis缓存配置
使用宝塔点击左侧文件,找到网站根目录的config/config.php配置文件,在后面新增以下代码:

'memcache.locking' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => [
     'host' => '127.0.0.1',
     'port' => 6379,
],

5、安装Nextcloud
请输入图片描述
打开网址,选择Mysql数据库,填上数据库信息,并设置管理员账号和密码后,点击安装即可!到这里属于我们的私有云盘Nextcloud就搭建好了。

最后该网盘挺不错的,特别是更新到15.0版本之后,不过加载速度在国内还是慢点,官方推荐的是用APCu缓存,相比较Redis更快,不过博主一般只在小内存上跑,所以就直接使用了Redis缓存。如果你的内存很大,可以看下APCu使用文档→传送门,配置也不难。


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/175/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。