爱创新网络
我们一直在努力

试玩Flarum极精简论坛及搭建过程

今天突然闯入社长の论坛,发现论坛改版。页面和速度都非常棒,挺感兴趣的,查了是Flarum极精简论坛。

从官方介绍的介绍可以得知,程序非常小,而且加载很快。

然后就把手里的小鸡搞了一只,尝试着也搭建个玩玩。

小鸡配置如下

1核512M内存 15Gssd硬盘 15M  系统deban10  面板安装宝塔7.2.0

安装

宝塔面板安装

Centos安装命令:

  1. yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

Ubuntu安装命令:

  1. wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh

Debian安装命令:

  1. wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

Fedora安装命令:

  1. wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh

根据你的系统,自己选择对应的命令。

环境配置:PHP 5.6+MySQL 5.6+Nginx

接下来再找到左侧软件管理-PHP管理-设置-安装Fileinfo扩展。

#如果Fileinfo拓展安装失败,就是内存太小,我们可以添加swap,不适用于ovz
1、脚本添加,脚本地址:https://www.321002.com/610.html 
2、面板添加,找到左侧软件管理-系统工具-安装Linux工具箱,然后进入工具箱添加。

2、安装Composer

 执行在线安装脚本
curl -sS https://getcomposer.org/installer | php    
  移动到path目录      
mv composer.phar /usr/local/bin/composer
  查看系统版本
composer -v

3、安装程序
我们先点击左侧网站,添加域名,并设置好Mysql数据库用户名和密码信息。

然后从宝塔文件夹管理器访问根目录,删掉所有文件,再使用命令:

小提示:如果执行安装命令没有权限,可以手动给域名根目录一个775权限

#进入网站根目录,将路径修改成自己的再运行
cd /www/wwwroot/321002.com(321002.com修改成你自己域名)
composer create-project flarumchina/flarumchina . --stability=beta
#授权
chown -R www:www ./
chmod -R 775 assets storage

4、添加伪静态(Nginx)
点击站点设置-伪静态设置,添加以下代码:

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

location /api {
    try_files $uri $uri/ /api.php?$query_string;
}

location /admin {
    try_files $uri $uri/ /admin.php?$query_string;
}

location /flarum {
    deny all;
    return 404;
}

location ~ .php$ {
    fastcgi_split_path_info ^(.+.php)(/.+)$;
    fastcgi_pass unix:/tmp/php-cgi.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
}

这时候打开站点就可以开始安装了。

其它操作

#底部加统计
vendor/flarum/core/views/app.blade.php
#去掉网络字体
vendor/flarum/core/src/Http/WebApp/WebAppView.php

相关资料

1、markdown支持:http://discuss.flarum.org.cn/d/221
2、中文语言包:http://flarum.org/docs/languages/
3、中文github及程序下载:https://github.com/justjavac/Flarum
4、中文语言包下载:https://github.com/Flarum-Chinese/flarum-ext-simplified-chinese/releases
5、SMTP相关:https://github.com/flarum/core/issues/258
6、论坛类程序推荐:https://www.v2ex.com/t/268523
7、中文优化版:http://discuss.flarum.org.cn/d/402
8、插件整理:http://discuss.flarum.org.cn/d/306
赞(2)
未经允许可以转载:爱创新网络 » 试玩Flarum极精简论坛及搭建过程

用技术驱动人生,让生活更便捷

登录

找回密码

注册