宝塔搭建chevereto收费版图床

    选择打赏方式

温馨提示:
本文最后更新于2021年12月04日,已超过835天没有更新,若内容或图片失效,请留言反馈。

  网站图片存放一直是个问题,又不想本地存储图片,第三方图床又不值得信任,于是想自己搭建个图床用来存放网站图片,我服务器硬盘存储100G,带宽只有1M,带宽有些拖了,不过也无所谓了。于是我在网上搜了下图床程序,最后选择了Chevereto,Chevereto有着很棒的设计和体验,有兴趣的可以去体验下。

官网:https://chevereto.com/

演示:https://demo.chevereto.com/ 

  它有免费版和付费版两个版本,免费版是开源的Chevereto-Free官方Github仓库,可下载项目,免费版的对于个人使用足够了;如果想要更好的体验可以使用付费版的,区别在于收费版多了硬盘扩展,支持外部存储,社交分享功能和技术支持等。网上有所谓的破解版的,个人不推荐使用。

  我使用的是付费版的价格30$,现在应该便宜了(血亏),此前有博主买的多域名版才15美到,而我买的单域名就30美刀了,说是因为要出V4了,改了定价策略,且每年黑色星期五都会有促销,去年促销完就涨价。

安装过程中不是很顺利出现各种问题,找了好多教程,也请教了 松鼠大大,好在最后都顺利解决,下面记录下自己的安装过程。

宝塔安装环境

  • Nginx-1.18
  • PHP7.4(需要7.3 推荐7.4)
  • MySQL 5.6

PHP扩展

  • curl
  • fileinfo
  • opcache
  • imagemagick
  • exif
  • hash
  • imagick
  • gd
  • json
  • mbstring
  • pdo
  • pdo-mysql
  • session
  • xml
  • zip

php扩展很重要,最开始我是在本地使用php study搭建的就没问题,服务器搭建时安装完成后 前台打开报错,后来发现是php扩展未安装,因为PHPstudy默认启用了那些扩展,而宝塔是需要自己安装(加粗的扩展是必装的)。

安装

1.登录下载

购买chevereto收费版后登录-控制台,下载安装文件。

有2中安装方式:1.下载installer.php安装程序,上传网站根目录在线安装,2.直接下载chevereto安装包,可以选择版本,上传安装。

我这里所演示的是installer.php在线安装。

2.新建网站上传程序,设置伪静态

新建网站,设置伪静态,上传installer.php安装文件(注意安装环境要求)

Nginx:

# Chevereto Nginx rewrite rules
# Make sure to place these inside your server{} block

# Disable access to .ht* files
location ~ /\.ht {
	deny all;
}

# Disable access to sensitive files in app path
location ~ /(app|content|lib|importer)/.*\.(po|php|lock|sql|txt)$ {
   deny all;
}

# Disable log on not found images + image replacement
location ~* (jpe?g|png|gif|webp) {
	log_not_found off;
	error_page 404 /content/images/system/default/404.gif;
}

# Enable CORS header (needed for CDN)
location ~* \.(ttf|ttc|otf|eot|woff|woff2|css|js)$ {
	add_header Access-Control-Allow-Origin "*";
}

# Force serve upload path as static content (match your upload folder if needed)
location /images {}

# Route dynamic request to index.php
location / {
	try_files $uri $uri/ /index.php$is_args$query_string;
}

Apache:

# Apache and Chevereto

Apache should work instantly as the whole configuration is on `.htaccess` files. The folder `chevereto` contains one of
these files (note: dot files may be hidden in your filesystem).

# Troubleshooting

These are the most common issues with Apache:

## 404 /install

Apache virtual host configuration requires that you allow `.htaccess` rules at the virtual host path. Search for 
"AllowOverride .htacess".

## RewriteBase

In some servers the configuration requires a RewriteBase. Check the file at chevereto/.htaccess where you will find 
instructions about this workaround.

然后网址访问installer.php文件,提示填写chevereto付费版密钥,按照引导填写安装信息后,即可在线进行安装了。

chevereto在线安装

当出现以下页面,表示安装成功了:

3.安装完成

以上就完成了,就可以正常访问了,然后打开仪表盘:dashboard/settings/languages 进行语言设置,默认语言是英文,需设置成中文即可:

到这一步就大功告成了,具体配置可按照个人需求进行设置。

 

如果安装过程有任何问题可参考:贡献 | 松鼠の文档 (doge.uk)

版权声明:若无特殊注明,本文为《寒星皓月》原创,转载请保留文章出处。
本文链接:https://www.wanghanyue.com/post-60.html
作品采用:知识共享署名 4.0 (CC BY-NC-SA 4.0) 国际许可协议 进行许可。
正文到此结束

相关推荐

发表吐槽

你肿么看?

你还可以输入 250 / 250 个字

呵呵 哈哈 羡慕 惊恐 超赞 嗯哼 滑稽 不高兴 大哭 疑问 你懂得 打脸 黑线 委屈 小乖 酷 笑眼 汗 what 鄙视 喷 阴险 怒 吃瓜

评论信息框
可使用QQ号实时获取昵称+头像

私密评论

吃奶的力气提交吐槽中...


既然没有吐槽,那就赶紧抢沙发吧!