winbug 配置服务器 安装Nginx, PHP, MySQL,相关安装请参考baidu 安装Composer # php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" # php composer-setup.php All settings correct for using Composer Downloading... Composer (version 1.6.5) successfully installed to: /root/composer.phar Use it: php composer.phar 移动 composer.phar,这样 composer 就可以进行全局调用: # mv composer.phar /usr/local/bin/composer 更新 composer: # composer selfupdate 安装Flarum 在/var/www/html/目录中创建bbs目录 # mkdir bbs chmod 755 -R bbs 进入bbs目录开始安装 composer create-project flarum/flarum . --stability=beta 安装后去Nginx的目录下修改自己的网站配置 删除 /etc/nginx/site/sites-available/default文件 创建一个新的site文件 /etc/nginx/sites-available/site 输入以下代码 server { listen 80; server_name bbs.php8.win; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 443; ssl on; ssl_certificate /etc/nginx/SSL/bbs.php8.win_chain.crt; ssl_certificate_key /etc/nginx/SSL/bbs.php8.win_key.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE; ssl_prefer_server_ciphers on; root /var/www/html/bbs/public; index index.php index.html index.htm; server_name bbs.php8.win; access_log /var/logs/default.access.log; error_log /var/logs/default.error.log; include /var/www/html/bbs/.nginx.conf; location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_split_path_info ^(.+.php)(/.+)$; # With php-fpm (or other unix sockets): fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # With php-cgi (or other tcp sockets): # fastcgi_pass 127.0.0.1:9000; } } 输入地址进行安装,安装页面会提示你当前没有符合装的条件, 补充完毕即可,之后会提示输入数据库网站名等必要条件,自己输入即可 删除插件 composer remove jsthon/flarum-ext-simplified-chinese 清空缓存 php flarum cache:clear.