`
sillycat
  • 浏览: 2489908 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Flarum BBS System(1)Installation and Introduction

 
阅读更多
Flarum BBS System(1)Installation and Introduction

Try an open source BBS website. Flarum
First try the steps on my local MAC
> php -version
PHP 7.2.11 (cli) (built: Oct 23 2018 08:40:58) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

And I have a MySQL Database on my Local as well.

> composer --version
Composer version 1.6.5 2018-05-04 11:44:59

In the document in detail, it says, it can not work with 7.2, only up to 7.1. Let’s try first.
Command runs to create flarum
In the working directory
> mkdir flarum
> cd flarum/
> composer create-project flarum/flarum . --stability=beta

It seems we need execute the command to install the dependency
> composer install

Exception Happened Here
- flarum/core v0.1.0-beta.6 requires intervention/image ^2.3.0 -> satisfiable by intervention/image[2.3.0, 2.3.1, 2.3.10, 2.3.11, 2.3.12, 2.3.13, 2.3.14, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.4.0, 2.4.1, 2.4.2].
- intervention/image 2.3.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.

Solution:
https://stackoverflow.com/questions/23771117/requires-ext-fileinfo-how-do-i-add-that-into-my-composer-json-file
http://image.intervention.io/getting_started/installation

Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

Solution:
> brew install autoconf

Once we have autoconf, we will go on install Fileinfo-1.0.4
> wget http://pecl.php.net/get/Fileinfo-1.0.4.tgz
> tar -zxf Fileinfo-1.0.4.tgz
> cd Fileinfo-1.0.4
> phpize
> ./configure

Exception in this step
checking for magic files in default path... not found
configure: error: Please reinstall the libmagic distribution

Solution:
https://gist.github.com/eparreno/1845561
> brew install libmagic

Once we have lib magic, go on with configure and installation.
> ./configure
> make

During make, it seems version conflict error happen. Reinstall PHP with that enable --enable-fileinfo

> ./configure --prefix=/Users/hluo/tool/php-7.2.12 --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-maintainer-zts --enable-fileinfo

Change Makefile
EXTRA_LIBS = -lz -lresolv -liconv -liconv -lintl -lpng -lz -ljpeg -lz -lm -lpthread -lxml2 -lz -licucore -lm -lcurl -lxml2 -lz -licucore -lm -lfreetype -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm /usr/local/Cellar/libiconv/1.15/lib/libiconv.dylib -lssl -lcrypto

Yeah, compose install success after that.
> cd /Users/hluo/tool/flarum
> composer install

Set Up Nginx Configuration
user  hluo staff;
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
root   /opt/flarum;
        index index.php index.html index.htm;
        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;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            fastcgi_split_path_info ^(.+.php)(/.+)$;
            fastcgi_pass   127.0.0.1:9000;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param HTTP_PROXY "";
            fastcgi_index index.php;
        }
       
        location ~* \.html$ { expires -1; }
       
        location ~* \.(css|js|gif|jpe?g|png)$ {
          expires 1M;
          add_header Pragma public;
          add_header Cache-Control "public, must-revalidate, proxy-revalidat";      
}
        gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types application/atom+xml
application/javascript
application/json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
#text/html -- text/html is gzipped by default by nginx
text/plain
text/xml;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";  
    }
}


Visit the Page
http://localhost/

Create MySQL Database First
> create database flarum;
> use mysql;
> grant all privileges on flarum.* to flarum@"%" identified by 'flarum';
> flush privileges;

Visit the page and set up the database.

Set Up on CentOS
Similar steps with MAC, some differences are as follow:
> ./configure --prefix=/home/carl/tool/php-7.2.12 --enable-fpm --with-fpm-user=carl --with-fpm-group=staff --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-maintainer-zts --enable-fileinfo


Install Nginx On CentOS
> ./configure --prefix=/home/carl/tool/nginx-1.14.0
> make
> make install
Put in the Working directory

Set Composer and Flarum
> sudo curl -sS https://getcomposer.org/installer | php
> sudo mv composer.phar /usr/local/bin/composer
> sudo chmod a+x /usr/local/bin/composer
> composer --version
Composer version 1.7.3 2018-11-01 10:05:06

Set Up Flarum
> mkdir flarum
> cd flarum/
> composer create-project flarum/flarum . --stability=beta

Start PHP-FPM, start Nginx, We can visit http://localhost
Set Up MySQL on RaspberryPi
> sudo apt-get install mysql-server
> sudo vi /etc/mysql/my.cnf
Change bind-address to 0.0.0.0

Restart MySQL
> sudo service mysql restart

After Post One Discussion, Here is the Issues on Page
Warning: count(): Parameter must be an array or an object that implements Countable in /home/carl/tool/flarum/vendor/flarum/core/src/Core/Post/RegisteredTypesScope.php on line 52
Fatal error: Uncaught RuntimeException: Unable to emit response; headers already sent in /home/carl/tool/flarum/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php:37 Stack trace: #0 /home/carl/tool/flarum/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php(30): Zend\Diactoros\Response\SapiEmitter->assertNoPreviousOutput() #1 /home/carl/tool/flarum/vendor/zendframework/zend-diactoros/src/Server.php(167): Zend\Diactoros\Response\SapiEmitter->emit(Object(Zend\Diactoros\Response)) #2 /home/carl/tool/flarum/vendor/flarum/core/src/Http/AbstractServer.php(36): Zend\Diactoros\Server->listen(Object(Zend\Stratigility\NoopFinalHandler)) #3 /home/carl/tool/flarum/index.php(16): Flarum\Http\AbstractServer->listen() #4 {main} thrown in /home/carl/tool/flarum/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php on line 37

Maybe because of the PHP Version, Let’s try in Docker Installation

References:
https://github.com/flarum/flarum
https://flarum.org/docs/installation/
https://www.lijiaocn.com/%E6%96%B9%E6%B3%95/2017/11/21/flarum-usage.html
https://github.com/flarum/flarum
https://hk.saowen.com/a/1be15c911e8571cc31eae0a27be8ee1b2a654a653b10f8f36b901e915974e31c


分享到:
评论

相关推荐

    二级理论题(选择83+判断96).xlsx

    二级理论题(选择83+判断96).xlsx

    2024年中国超声非侵入式腐蚀检测传感器行业研究报告.docx

    2024年中国超声非侵入式腐蚀检测传感器行业研究报告

    设备OEE实践与教学知识

    设备自动化综合利用率实践,详细描述了OEE各方面的参数与应用,让设备自动化工厂利用此工具可以快速提高生产

    tensorflow-gpu-2.2.3-cp37-cp37m-win-amd64.whl

    python

    server-jre-8u411-windows-x64.tar.gz

    server-jre-8u411-windows-x64.tar.gz

    node-v7.8.0-sunos-x64.tar.xz

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    基于51单片机秒表的程序设计.RAR

    单片机学习代码资料

    升压斩波电路Multisim源文件-输入电压DC15V,输出电压调节范围:+18V~+30V,电流:500mA~100mA范围

    输入电压DC15V,输出电压调节范围:+18V~+30V,电流:500mA~100mA范围,纹波1%

    nacos-server-2.3.2

    nacos-server-2.3.2

    聚类微博数据可视化分析系统 技术框架python + django + mysql + nlp + 聚类 +pycharm

    聚类微博数据可视化分析系统 技术框架 python + django + mysql + nlp + 聚类 +pycharm 角色介绍 普通用户 qqq 123456 模块分析 登录注册 数据获取 数据处理 数据挖掘 NLP情感分析 K-means聚类分析 敏感词预警 (支持邮箱发送模式) 不同聚类 (三个不同的聚类计算结果对比,选择最优的聚类来显示) 数据可视化模块 大事件数据可视化 热点数据排行 热门主题词云 评论数据可视化 时间顺序可视化 退出模块 数据库weibo_nlp_system 分析原理 我的最爱是动漫,你喜欢什么呢? 我 的 最爱 是 动漫 你 喜欢 什么 呢

    选择判断题库.doc

    选择判断题库.doc

    青藏高原城市化和生态环境迫切化大屏数据可视化系统

    【作品名称】:青藏高原城市化和生态环境迫切化大屏数据可视化系统 【适用人群】:适用于希望学习不同技术领域的小白或进阶学习者。可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。

    TCABEE 008-2020 轨道交通车站高效空调系统技术标准.pdf

    TCABEE 008-2020 轨道交通车站高效空调系统技术标准.pdf

    MySQL笔记思维导图

    MySQL笔记思维导图

    Windows 10 Docker 安装教程

    附件是Windows 10 Docker 安装教程, 文件绿色安全,请大家放心下载,仅供交流学习使用,无任何商业目的!

    node-v4.4.1-x86.msi

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    东北大学信息学院控制与科学博士课程《matlab语言与应用》薛定宇课程作业 chapter1-chapter14 自己做的

    东北大学信息学院控制与科学博士课程《matlab语言与应用》薛定宇课程作业 chapter1-chapter14 自己做的

    azure-ai-services-speech-service(微软语音服务文档)

    azure-ai-services-speech-service(微软语音服务文档)

    数据库课程设计涵盖了从需求分析、概念设计、逻辑设计到物理设计的整个数据库设计流程 为了帮助学生更好地理解和掌握这些内容,课程设计

    数据库课程设计涵盖了从需求分析、概念设计、逻辑设计到物理设计的整个数据库设计流程。为了帮助学生更好地理解和掌握这些内容,课程设计提供了丰富的学习资源。 首先,课程提供了详细的教学课件和PPT,这些资源系统地介绍了数据库设计的基本概念和步骤,帮助学生建立起对数据库设计的整体认识。 其次,课程设计还提供了大量的实践案例和练习题。学生可以通过分析实际案例,了解数据库设计在实际应用中的具体实现方法。同时,练习题可以帮助学生巩固所学知识,提高实际操作能力。 此外,课程设计还鼓励学生利用网络资源进行学习。学生可以通过在线教程、视频系列以及经典的数据库设计书籍等拓展学习视野,深入了解数据库设计的最新技术和方法。 最后,课程设计还强调团队协作和沟通能力的培养。学生需要分组完成设计任务,通过团队合作解决问题,提高协作和沟通能力。 总之,数据库课程设计提供了丰富的学习资源和实践机会,帮助学生全面掌握数据库设计的基本知识和技能。通过这门课程的学习,学生将能够为后续的数据库应用开发和数据管理工作打下坚实的基础。

    17.rar

    17.rar

Global site tag (gtag.js) - Google Analytics