首先要保持文件夹为空,否则报错:

Creating a "flarum/flarum" project at "./"

                                                            
  [InvalidArgumentException]                                 
  Project directory "/www/wwwroot/webwww/." is not empty.

php版本要大于7.3,否则报错:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - flarum/core[v1.3.0, ..., v1.3.1] require php >=7.3 -> your php version (7.2.33) does not satisfy that requirement.
    - Root composer.json requires flarum/core ^1.3 -> satisfiable by flarum/core[v1.3.0, v1.3.1].

找到php禁用函数,删除掉putenv()pcntl_signal()proc_open()

PHP Warning:  putenv() has been disabled for security reasons in phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 93
Warning: putenv() has been disabled for security reasons in phar:///usr/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 93
PHP Warning:  putenv() has been disabled for security reasons in phar:///usr/bin/composer/bin/composer on line 59
Warning: putenv() has been disabled for security reasons in phar:///usr/bin/composer/bin/composer on line 59
..........
..........                                                                                 
  [Symfony\Component\Process\Exception\RuntimeException]                                   
  The Process class relies on proc_open, which is not available on your PHP installation.  

安装php扩展fileinfo

扩展为fileinfoopcacheexifmailparse,其中exifmailparse可以根据需求安装

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - flarum/core[v1.3.0, ..., v1.3.1] require intervention/image 2.5.* || ^2.6.1 -> satisfiable by intervention/image[2.5.0, ..., 2.7.2].
    - intervention/image[2.5.0, ..., 2.7.2] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires flarum/core ^1.3 -> satisfiable by flarum/core[v1.3.0, v1.3.1].

To enable extensions, verify that they are enabled in your .ini files:
    - /www/server/php/80/etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

安装

目录所有者www权限755
数据库utf8mb4_unicode_ci
安装:

root@debian:/www/wwwroot/webwww# composer create-project flarum/flarum .

伪静态文件在根目录下,引入即可。
中文语言包
其他宝塔面板安装步骤设置

邮件

试过mail、mailgun测试邮件都可以收到,但是收不到注册激活邮件。
只能SMTP了,目前使用飞书的域名邮箱,开启SMTP,设置完成后一切正常。未认证用户每天450封上限。

Last modification:June 19, 2022
如果觉得我的文章对你有用,请随意赞赏