Flarum 论坛安装
- 安装宝塔面板。
Centos:
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Ubuntu/Deepin:
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
Fedora:
wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
- 登录面板,安装LNMP,PHP版本要求 7.2 以上。
- 进入宝塔面板–软件商店–已安装,点击 PHP7.2 设置,选择 安装扩展,安装 fileinfo(opcache、exif 非必选)。在禁用函数中,删除 putenv,pcntl_signal,proc_open。
- 新建 Flarum 站点(此处为nonnix.cn),数据库使用 utf8mb4 编码,配置 SSL 证书,关闭防跨站攻击(open_basedir),或者使用命令:
chattr -i .user.ini
- SSH 登录服务器。
cd /www/wwwroot/nonnix.cn
删除Flarum Site目录下的所有文件,然后执行安装命令:
composer create-project flarum/flarum . --stability=beta
注:若网速过慢,可以更换国内的composer源,比如换成阿里云:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
- 安装完毕之后进入宝塔面板-网站-设置-网站目录调整为public,配置伪静态:
include /www/wwwroot/www.xnlt.cn/.nginx.conf;
- 网站目录权限设置为775,应用到全部子目录,assets和storage设置成777。
- 打开域名,进行网站设置。
Flarum 插件安装
cd /www/wwwroot/nonnix.cn
- 中文包:
composer require littlegolden/flarum-lang-simplified-chinese
composer require csineneo/lang-traditional-chinese - 管理用户:
composer require veroz1/users-list
- 日文包:
Installation / Update
composer require littlegolden/flarum-lang-japanese
Remove
composer remove littlegolden/flarum-lang-japanese
Clear Cache
php flarum cache:clear
- Bazaar 插件市场:
composer require extiverse/bazaar
- 邀请码机制:
composer require reflar/doorman
- 版主或管理员变更帖子作者:
composer require clarkwinkelmann/flarum-ext-author-change
- Google Piwik 统计:
composer require flagrow/flarum-ext-analytics
- 嵌入 Bilibili AcFun 视频:
composer require lcinhk/flarum-ext-acgembed
- 文件上传器:
composer require fof/upload
升级
composer require fof/upload
php flarum migrate
php flarum cache:clear
设置
允许所有常规文件类型,包括视频、音乐、压缩文件和图像
(video\/(3gpp|mp4|mpeg|quicktime|webm))|(audio\/(aiff|midi|mpeg|mp4))|(image\/(gif|jpeg|png))|(application\/(x-(7z|rar|zip)-compressed|zip|arj|x-(bzip2|gzip|lha|stuffit|tar)|pdf))
允许上传所有图片文件的通配符
^image\/.*
MIME 类型表
https://docs.qq.com/doc/DV0VKQnhPVVlyUEtU
常用插件:
"datitisev/flarum-ext-dashboard": "^0.1.0@beta",仪表盘,插件归类到概况下
"flagrow/ads": "^0.2.0@beta",官方广告插件
"flagrow/bazaar": "^0.3.9",应用商店
"flagrow/sitemap": "^0.2.0",#sitemap地图
"flagrow/terms": "^0.3.1",网站使用协议
"flagrow/upload": "^0.7.1",上传文件
"flarum/approval": "^0.1.0",
"flarum/auth-facebook": "^0.1.0",
"flarum/auth-github": "^0.1.0",
"flarum/auth-twitter": "^0.1.0",
"flarum/bbcode": "^0.1.0",
"flarum/core": "^0.1.0",
"flarum/emoji": "^0.1.0",
"flarum/flags": "^0.1.0",
"flarum/lang-english": "^0.1.0",
"flarum/likes": "^0.1.0",
"flarum/lock": "^0.1.0",
"flarum/markdown": "^0.1.0",官方MarkDown
"flarum/mentions": "^0.1.0",
"flarum/pusher": "^0.1.0",
"flarum/statistics": "^0.1.0",
"flarum/sticky": "^0.1.0",
"flarum/subscriptions": "^0.1.0",
"flarum/suspend": "^0.1.0",
"flarum/tags": "^0.1.0",
"fof/links": "^0.1.1",导航栏链接
"fof/pages": "^0.2.2",生成静态页
"jjandxa/flarum-ext-chinese-search": "^0.0.8",中文搜索(需要先安装xunsearch)
"jordanjay29/flarum-ext-summaries": "^0.3.1"首页显示帖子的摘要,只在PC端显示.
"michaelbelgium/flarum-discussion-views": "^0.1.0@beta",显示话题讨论的进度等等,仅在Pc端显示
"reflar/uncache": "^0.1.0@beta",自动清除cache
"s9e/flarum-ext-autoimage": "^1.1",上传的图片文件链接显示成图片
"wiwatsrt/flarum-ext-best-answer": "^0.2.1"最佳回复