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

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

Rat's Blog - OneIndex

CuteOne:一款基于Python3的OneDrive多网盘挂载程序,带会员/同步等功能 - Rat's Blog Aria2+Aria2Ng+OneIndex一键安装脚本,下载后自动上传至OneDrive - Rat's Blog OneIndex一键安装脚本 for Debian - Rat's Blog
一款好用、美观的OneDrive目录列表程序:OLAINDEX - Rat's Blog
博主: Rat's · 2018-10-14 · via Rat's Blog - OneIndex

说明:之前我们使用的最多的OneDrive目录列表程序就是Oneindex,博主已经写了很多使用教程了,最近有大佬受Oneindex启发,功能借鉴其思想,写出一个基于laravel5框架的OneDrive目录列表程序,看上去很不错,这里分享下。

截图

请输入图片描述

简介

  • OneDrive目录索引;
  • 基于最新PHP框架laravel5搭建而成;
  • 基于bootswatch响应式页面布局,适配PC、平板、手机;

功能

  • OneDrive目录查看索引,支持分页查看;
  • 图床功能(国内不太稳低);
  • 支持文件路径一键复制、下载;
  • 支持代码、图片、文本文件即时预览;
  • 支持音视频播放(兼容大部分格式),视频播放采用Dplayer,音乐播放采用Aplayer
  • 支持文件夹加密(需管理员);
  • 支持文件上传(需管理员);
  • 支持readme/head说明文件添加/编辑/删除;
  • 支持文件搜索(需管理员);
  • 支持自定义创建文件夹(需管理员);
  • 支持文件/文件夹删除(需管理员);
  • 后台基本管理,支持主题,预览设置等等(清理缓存后及时生效)(需管理员)。
  • v2.0全新路径显示(pathinfo
  • 添加看图相册
  • 配置文件化,不再依赖数据库

TODO

  • 共享目录支持
  • 支持视频字幕,音频歌词
  • 支持后台大文件上传,断点续传

环境要求

PHP >= 7.1.3
OpenSSL PHP
PHP PDO 扩展
PHP Mbstring 扩展
PHP Tokenizer 扩展
PHP XML 扩展
PHP Ctype 扩展
PHP JSON 扩展
PHP Fileinfo 扩展(非必需,但最好安装)

安装

Github地址:https://github.com/WangNingkai/OLAINDEX

这里为了方便,可以直接使用宝塔搭建lnmp环境。

1、安装宝塔

#Centos系统
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh

#Ubuntu系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh

#Debian系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && bash install.sh

然后进入后台再安装PHP 7.2Nginx,这里基本上除了Fileinfo扩展,其余都默认安装好了。

接下来再找到左侧软件管理-PHP管理-设置-安装Fileinfo扩展(非必需扩展,不过不安装的话,不保证安装程序能成功)。

#如果Fileinfo拓展安装失败,就是内存太小,我们可以添加swap,不适用于ovz
1、脚本添加,脚本地址:https://www.moerats.com/archives/722/。
2、面板添加,找到左侧软件管理-系统工具-安装Linux工具箱,然后进入工具箱添加。

然后同样的在PHP设置里找到禁用函数,删除proc_openproc_get_statusputenv函数,最后重启PHP

2、安装Composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

3、安装程序
我们先点击左侧网站,添加域名,此时网站根目录就是/www/wwwroot/xx.com

运行命令:

#将域名修改成自己的再运行
cd /www/wwwroot/xx.com
git clone https://github.com/WangNingkai/OLAINDEX.git tmp 
mv tmp/.git . 
rm -rf tmp 
git reset --hard 
composer install -vvv #这里确保已成功安装composer,如果报权限问题,建议给予用户完整权限。
chmod -R 777 storage 
chown -R www:www * #此处www根据服务器具体用户组而定
composer run install-app

5、伪静态设置
点击域名设置-网站目录,运行目录选择public,并把防跨站的勾去掉并重启PHP。然后点击伪静态,输入以下代码:

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

最后就可以打开域名进行安装配置了。
请输入图片描述
注意回调地址redirect_uri需要是https地址,可以直接在宝塔开启免费SSL证书。如果你使用上面的一键申请绑定账号失败了,可以试试手动申请client_idclient_secret,申请方法→传送门

后台地址:https://xx.com/admin,密码:12345678

特殊文件功能

#不建议创建和以下同名的文件夹和文件,否则会导致文件无法查看下载
README.md、HEAD.md 、.password 、.deny特殊文件使用

#在文件夹底部添加说明
在onedrive的文件夹中添加README.md文件,使用markdown语法。

#在文件夹头部添加说明
在onedrive的文件夹中添加HEAD.md 文件,使用markdown语法。

#加密文件夹
在onedrive的文件夹中添加.password文件,填入密码,密码不能为空。

#禁止访问文件夹
在onedrive的文件夹中添加.deny文件,该文件夹被禁止访问。

其它设置

#重置全部数据,删除数据库数据
php artisan od:reset

#重置OneDrive登陆账号
php artisan od:logout
    
#升级程序
git pull
composer install -vvv
php artisan od:update

如果你出现了一些问题可以先查看→传送门


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

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

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