本页目录
有了一台自己的服务器,或者是虚拟机,当然要物尽其用了,这一次,我们用 Chevereto 网站程序,来搭建自己的图床。
为什么呢?
- 给自己喜欢的图片,在网络上能有一个自己的家
- 自己搭建的程序,自己用着放心
- 对于经常使用 Markdown 编辑文字的用户,文字中插入图片更方便了
- 避免网站中储存过量图片,管理不便
本站下载安装包:
相关帮助:
官方帮助文档:https://chevereto.com/docs/install
GitHub 下载源码,地址:https://GitHub.com/Chevereto/Chevereto-Free(免费版)
CSDN 的一个方法:https://blog.csdn.net/qq_28616789/article/details/79340236
创建页面,将内容放置再以下代码内:
[cc lang="php"]我的代码[/cc]菜单图标:https://chevereto.com/src/icomoon/
自定义图片链接,如:http://tu.npc.ink/my/Up6.jpg,那么,这个 my,怎么来的?
首先,在网站根目录新建文件夹 my,然后在“仪表盘-图片上传-图像路径一栏,填写 my”即可
错误集合:
1.文件放置后,打开链接 404
填写一下伪静态 Rewrite 规则,网站-设置-伪静态
location / {if (-f $request_filename/index.html){rewrite (.*) $1/index.html break;}if (-f $request_filename/index.php){rewrite (.*) $1/index.php;}if (!-f $request_filename){rewrite (.*) /index.php;}try_files $uri $uri/ /api.php;}location /admin {try_files $uri /admin/index.php?$args;}顺利出现安装页面
2.安装完毕,提示错误:
Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/tu.baimu.org/app/lib/integrity-check.php on line 167PHP 版本为 7.2,更改为 7.1,原因是 php7.2 更改了一些配置,
参考链接:参考
因为种种复杂的原因(精力有限,效果不佳。。。),我已关闭了自建的图床,转而使用阿里云的 OSS 技术来存储图片,前几天转移博客的时候,全站打包,才 50M 的样子。
关于 OSS,可以看这篇: