Loading

Flarum 搭建

安装

php-common php-cli php-mysql php-curl php-gd php-json php-mbstring php-mysql php-tokenizer php-zip mariadb-server php-fpm
docker run -d --restart unless-stopped --name 起一个容器名 -p 127.0.0.1:3306:3306 -v 本地目录:/var/lib/mysql  -e MYSQL_ROOT_PASSWORD=数据库密码 mysql

CREATE DATABASE 数据库名 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

中文检索插件【可选】

【推荐】Flarum 中文搜索功能支持(不完美)


使用腾讯云 COS 存储文件和图片(任意支持AWS S3的COS)【可选】

先安装插件

composer require fof/upload
composer require league/flysystem-aws-s3-v3:"*"

## 以后更新使用
composer require fof/upload league/flysystem-aws-s3-v3:"*"
php flarum migrate
php flarum cache:clear

配置 FoF Upload

在 Flarum 后台,进入 FoF Upload 配置页。

文件链接前缀

找到“存储设置 - 文件链接前缀 / 对象存储 CDN 或访问域名(含 http/https)”,在里面填入你的腾讯云域名前缀。

格式为 https://<存储桶名-APPID>.cos.<Region>.myqcloud.com

例如 https://sasdgg-1234567890.cos.ap-beijing.myqcloud.com

AWS S3 存储设置

找到“AWS S3 存储设置”,依次填入。(这里建议创建一个子账号专门用来管理该存储桶,使用子账号的API密钥)

  • Key:即腾讯云的 SecretId
  • Secret:即腾讯云的 SecretKey
  • 存储空间(Bucket):即腾讯云的存储桶名称 存储桶名-APPID
  • 地域(Region):即腾讯云的地域 Region,例如 ap-beijing

高级 S3 存储设置

找到“AWS S3 存储设置”,依次填入。

  • 访问域名(Endpoint):https://cos.<地域>.myqcloud.com (<地域>替换为你的,如ap-beijing
  • 使用 path-style 访问域名:关闭
  • 访问控制列表(ACL):public-read (即共有读私有写,你的腾讯云存储桶依旧保持私有读写即可)

Flarum 使用腾讯云COS对象存储

Flarum FOF upload 使用腾讯云COS存储教程 - Tempest

AWS S3 · FriendsOfFlarum/upload Wiki

https://github.com/FriendsOfFlarum/upload


自用插件一键安装【可选】

composer require fof/profile-image-crop:"*" flarumite/simple-discussion-views:"*" migratetoflarum/fake-data:"*" clarkwinkelmann/flarum-ext-emojionearea clarkwinkelmann/flarum-ext-bookmarks noriods/auto-more askvortsov/flarum-auto-moderator flarum-lang/chinese-simplified malago/flarum-achievements askvortsov/flarum-categories askvortsov/flarum-auto-moderator noriods/auto-more clarkwinkelmann/flarum-ext-bookmarks clarkwinkelmann/flarum-ext-emojionearea migratetoflarum/fake-data flarumite/simple-discussion-views fof/ban-ips fof/byobu fof/custom-footer fof/default-group fof/disposable-emails fof/filter fof/follow-tags fof/forum-statistics-widget fof/frontpage fof/gamification fof/ignore-users fof/links fof/masquerade fof/moderator-notes fof/nightmode fof/polls fof/reactions fof/share-social fof/stopforumspam fof/user-bio ianm/follow-users afrux/forum-widgets-core therealsujitk/flarum-ext-gifs lawaxi/harmony pipecraft/flarum-ext-id-slug ianm/level-ranks clarkwinkelmann/flarum-ext-likes-received nomiscz/flarum-ext-auth-wechat afrux/online-users-widget swaggymacro/only-starter askvortsov/flarum-rich-text ianm/synopsis nearata/flarum-ext-tags-color-generator v17development/flarum-user-badges afrux/asirem askvortsov/flarum-categories clarkwinkelmann/flarum-ext-circle-groups ecnu-im/sticky-sidenav yannisme/cntheme flarum-lang/chinese-simplified fof/linguist
php flarum cache:clear

自用插件【可选】

FoF Formatting by Friends of Flarum

Installation

composer require fof/formatting:"*"

Updating

composer update fof/formatting

Fancybox by darkle

说明

Fancybox is a touch-enabled and responsive tool for displaying images in a 'lightbox' that floats overtop of the web page.

Installation

composer require darkle/fancybox

Updating

composer update darkle/fancybox
php flarum cache:clear

GitHub - FriendsOfFlarum/upload: The file upload extension with insane intelligence for your Flarum forum.

Installation

composer require fof/upload

Updating

composer require fof/upload
php flarum migrate
php flarum cache:clear

FoF Ban IPs by Friends of Flarum

Installation

composer require fof/ban-ips:"*"

Updating

composer update fof/ban-ips:"*"

Flarumite Simple Discussion Views by Flarumite

Installation

composer require flarumite/simple-discussion-views:"*"

Updating

composer update flarumite/simple-discussion-views:"*"

Fake Data by migratetoflarum

Installation

composer require migratetoflarum/fake-data:"*"

Updating

composer update migratetoflarum/fake-data:*

Emoji Picker by clarkwinkelmann

Installation

composer require clarkwinkelmann/flarum-ext-emojionearea

Updating

composer update clarkwinkelmann/flarum-ext-emojionearea

Discussion Bookmarks by clarkwinkelmann

Installation

composer require clarkwinkelmann/flarum-ext-bookmarks

Updating

composer update clarkwinkelmann/flarum-ext-bookmarks

Auto More by noriods

Installation

composer require noriods/auto-more

Updating

composer update noriods/auto-more
php flarum cache:clear

Auto Moderator by askvortsov

Installation

composer require askvortsov/flarum-auto-moderator:"*"

Updating

composer update askvortsov/flarum-auto-moderator

简体中文 by Flarum Languages

Installation

composer require flarum-lang/chinese-simplified
php flarum cache:clear

Updating

composer update flarum-lang/chinese-simplified
php flarum cache:clear

Flarum Categories

Installation

composer require askvortsov/flarum-categories

Updating

posted @ 2024-03-21 16:48  Rubrum  阅读(201)  评论(0编辑  收藏  举报