峯言凬语 O ever youthful O ever weeping~
本无意与众不同,怎奈何口味太重。
文章分类
常用标签
友情链接
您正在查看: TSI 分类下的文章
May 13, 2020

barbedwire.jpg
Flarum 论坛安装

  1. 安装宝塔面板。
    Centos:
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

Ubuntu/Deepin:

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

Debian:

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

Fedora:

wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
  1. 登录面板,安装LNMP,PHP版本要求 7.2 以上。
  2. 进入宝塔面板–软件商店–已安装,点击 PHP7.2 设置,选择 安装扩展,安装 fileinfo(opcache、exif 非必选)。在禁用函数中,删除 putenv,pcntl_signal,proc_open。
  3. 新建 Flarum 站点(此处为nonnix.cn),数据库使用 utf8mb4 编码,配置 SSL 证书,关闭防跨站攻击(open_basedir),或者使用命令:

    chattr -i .user.ini

  4. SSH 登录服务器。

    cd /www/wwwroot/nonnix.cn

删除Flarum Site目录下的所有文件,然后执行安装命令:

composer create-project flarum/flarum . --stability=beta

注:若网速过慢,可以更换国内的composer源,比如换成阿里云:

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
  1. 安装完毕之后进入宝塔面板-网站-设置-网站目录调整为public,配置伪静态:

    include /www/wwwroot/www.xnlt.cn/.nginx.conf;

  2. 网站目录权限设置为775,应用到全部子目录,assets和storage设置成777。
  3. 打开域名,进行网站设置。

Flarum 插件安装

cd /www/wwwroot/nonnix.cn
  1. 中文包:

    composer require littlegolden/flarum-lang-simplified-chinese
    composer require csineneo/lang-traditional-chinese

  2. 管理用户:

    composer require veroz1/users-list

  3. 日文包:
    Installation / Update
composer require littlegolden/flarum-lang-japanese

Remove

composer remove littlegolden/flarum-lang-japanese

Clear Cache

php flarum cache:clear
  1. Bazaar 插件市场:

    composer require extiverse/bazaar

  2. 邀请码机制:

    composer require reflar/doorman

  3. 版主或管理员变更帖子作者:

    composer require clarkwinkelmann/flarum-ext-author-change

  4. Google Piwik 统计:

    composer require flagrow/flarum-ext-analytics

  5. 嵌入 Bilibili AcFun 视频:

    composer require lcinhk/flarum-ext-acgembed

  6. 文件上传器:

    composer require fof/upload

升级

composer require fof/upload

php flarum migrate

php flarum cache:clear

设置
允许所有常规文件类型,包括视频、音乐、压缩文件和图像

(video\/(3gpp|mp4|mpeg|quicktime|webm))|(audio\/(aiff|midi|mpeg|mp4))|(image\/(gif|jpeg|png))|(application\/(x-(7z|rar|zip)-compressed|zip|arj|x-(bzip2|gzip|lha|stuffit|tar)|pdf))

允许上传所有图片文件的通配符

^image\/.*

MIME 类型表

https://docs.qq.com/doc/DV0VKQnhPVVlyUEtU

常用插件:
"datitisev/flarum-ext-dashboard": "^0.1.0@beta",仪表盘,插件归类到概况下
"flagrow/ads": "^0.2.0@beta",官方广告插件
"flagrow/bazaar": "^0.3.9",应用商店
"flagrow/sitemap": "^0.2.0",#sitemap地图
"flagrow/terms": "^0.3.1",网站使用协议
"flagrow/upload": "^0.7.1",上传文件
"flarum/approval": "^0.1.0",
"flarum/auth-facebook": "^0.1.0",
"flarum/auth-github": "^0.1.0",
"flarum/auth-twitter": "^0.1.0",
"flarum/bbcode": "^0.1.0",
"flarum/core": "^0.1.0",
"flarum/emoji": "^0.1.0",
"flarum/flags": "^0.1.0",
"flarum/lang-english": "^0.1.0",
"flarum/likes": "^0.1.0",
"flarum/lock": "^0.1.0",
"flarum/markdown": "^0.1.0",官方MarkDown
"flarum/mentions": "^0.1.0",
"flarum/pusher": "^0.1.0",
"flarum/statistics": "^0.1.0",
"flarum/sticky": "^0.1.0",
"flarum/subscriptions": "^0.1.0",
"flarum/suspend": "^0.1.0",
"flarum/tags": "^0.1.0",
"fof/links": "^0.1.1",导航栏链接
"fof/pages": "^0.2.2",生成静态页
"jjandxa/flarum-ext-chinese-search": "^0.0.8",中文搜索(需要先安装xunsearch)
"jordanjay29/flarum-ext-summaries": "^0.3.1"首页显示帖子的摘要,只在PC端显示.
"michaelbelgium/flarum-discussion-views": "^0.1.0@beta",显示话题讨论的进度等等,仅在Pc端显示
"reflar/uncache": "^0.1.0@beta",自动清除cache
"s9e/flarum-ext-autoimage": "^1.1",上传的图片文件链接显示成图片
"wiwatsrt/flarum-ext-best-answer": "^0.2.1"最佳回复

喵喵.jpg
安装growpart
CentOS:

yum install -y epel-release
yum install -y cloud-utils

Ubuntu:

sudo apt-get install cloud-initramfs-growroot

扩容硬盘

growpart /dev/sda 2

重启

reboot

调整文件系统

resize2fs /dev/sda2 (ext4 文件系统,比如AWS)
xfs_growfs /dev/sda2 (xfs 文件系统,比如azure)

查看结果

df -TH
February 14, 2020
  1. 打开 Windows Setting --> System --> Display,设置调整缩放与布局,根据自己的显示屏幕一般在125% - 150%。
  2. 点击 Advanced scaling setting 进行缩放设置。

display.png

December 17, 2019

Terminal运行:

sudo -s
cd /sbin
mv mount_ntfs mount_ntfs_orig

新建编辑挂载脚本:

vim mount_ntfs

输入如下内容:

#!/bin/sh
/sbin/mount_ntfs_orig -o rw,nobrowse "$@"

修改挂载文件权限:

chmod a+x mount_ntfs
exit

重启Mac OS,完成。

显示磁盘在finder:

sudo ln -s /Volumes/test ~/Desktop/diskname

注意:
电脑重启后磁盘在finder和桌面上会不显示,因为Elements分区是挂/Volumes下的,需要把这个目录在桌面做一个快捷方式。

11.gif

September 29, 2019

bg.jpg
In the beginning was the Word,and the Word was with God,and the Word was God.
太初有道,道与神同在,道就是神。 (约翰福音 第一章 第一节)

We've already started scheduling our next team meeting to kick off the coming cycle. keep up to date for development diary and the performance is still something to improve.
Thanks for everyone!