安装宝塔 Linux 面板(bt.cn)

添加站点,用于安装 Flarum

安装 Composer

安装 Flarum

然后访问刚新建的站点,发现已经能访问 Flarum 了,只不过有几个问题:

问题1:The PHP extension 'fileinfo' is required.

解决方法:访问宝塔 Linux 面板,在 PHP 设置中安装 fileinfo 扩展,结果如下图:

问题2:The /www/wwwroot/testweb/assets directory is not writable.

Please chmod this directory and its contents to 0775.

解决方法:

问题3:The /www/wwwroot/testweb/storage directory is not writable.

Please chmod this directory and its contents to 0775.

解决方法:

解决问题后,访问到正常安装页面,填写数据库等相关信息即可安装。

 

提示:根据官方文档想要访问正常,必需 URL Rewriting。

URL Rewriting

Apache

Flarum includes a .htaccess file – make sure it’s been uploaded correctly. If you’re using shared hosting, confirm with your hosting provider that mod_rewrite is enabled. You may need to add the following to your Apache configuration:

Nginx

Add the following lines to your server’s configuration block:

Lighttpd

Add the following lines to your server’s configuration block:

参考文档

https://www.bt.cn/bbs/thread-1186-1-1.html

https://flarum.org/docs/installation/


很高兴认识你。