mirror of https://github.com/jkjoy/sunpeiwen.git
20231006 update sforum
This commit is contained in:
parent
630dae25a1
commit
058450cc6c
|
@ -1,63 +0,0 @@
|
|||
---
|
||||
abbrlink: ''
|
||||
categories:
|
||||
- - hexo
|
||||
date: ''
|
||||
excerpt: '...'
|
||||
tags:
|
||||
- hexo
|
||||
title: Hexo使用指南
|
||||
updated: 2023-6-13T14:24:12.438+8:0
|
||||
---
|
||||
Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues).
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Create a new post
|
||||
|
||||
```bash
|
||||
$ hexo new "My New Post"
|
||||
```
|
||||
|
||||
More info: [Writing](https://hexo.io/docs/writing.html)
|
||||
|
||||
### Run server
|
||||
|
||||
```bash
|
||||
$ hexo server
|
||||
```
|
||||
|
||||
More info: [Server](https://hexo.io/docs/server.html)
|
||||
|
||||
### Generate static files
|
||||
|
||||
```bash
|
||||
$ hexo generate
|
||||
```
|
||||
|
||||
More info: [Generating](https://hexo.io/docs/generating.html)
|
||||
|
||||
### Deploy to remote sites
|
||||
|
||||
```bash
|
||||
$ hexo deploy
|
||||
```
|
||||
|
||||
```
|
||||
This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,,outline %}
|
||||
This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,outline %}
|
||||
{% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,green larger %}
|
||||
|
||||
{% label text color %}
|
||||
|
||||
```
|
||||
|
||||
demo
|
||||
|
||||
This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,,outline %}
|
||||
This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,outline %}
|
||||
{% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,green larger %}
|
||||
|
||||
{% label text color %} test {% label test color %}
|
||||
|
||||
More info: [Deployment](https://hexo.io/docs/one-command-deployment.html)
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
title: Mariadb创建数据库、用户及授权
|
||||
date: 2023-10-06 11:01:17
|
||||
tags: Mariadb
|
||||
categories: 分享
|
||||
abbrlink: dfdf0a76
|
||||
date: 2023-10-06 11:01:17
|
||||
cover:
|
||||
---
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
title: centos在yum时出现Determining fastest mirrors
|
||||
date: 2023-10-05 08:42:55
|
||||
tags: centos
|
||||
categories: 分享
|
||||
abbrlink: eb6a87ce
|
||||
date: 2023-10-05 08:42:55
|
||||
cover:
|
||||
---
|
||||
## 问题1
|
||||
|
|
|
@ -0,0 +1,148 @@
|
|||
---
|
||||
title: 测试xiuno2Sforum中遇到的各种问题
|
||||
tags: SForum
|
||||
categories: 分享
|
||||
abbrlink: 1adc954a
|
||||
date: 2023-10-06 11:55:41
|
||||
cover:
|
||||
---
|
||||
想把`xiuno`bbs数据转换成`SForum`,由于最新版本的`SForum`没有转换工具支持
|
||||
于是采用`Sforum` v2.2.2测试
|
||||
|
||||
# 测试环境
|
||||
|
||||
- Ubuntu 22.0.4
|
||||
- php8.0
|
||||
- mariadb10.6
|
||||
- composer
|
||||
- redis
|
||||
- nginx or apache
|
||||
|
||||
## 测试程序
|
||||
sforum v2.2.2
|
||||
|
||||
xiuno2sforum v2.2.2
|
||||
## PHP
|
||||
### 安装PPA 源
|
||||
需要使用 PPA 源安装:
|
||||
```
|
||||
sudo add-apt-repository ppa:shutter/ppa
|
||||
sudo apt-get update
|
||||
```
|
||||
#### 安装php8.0
|
||||
|
||||
```
|
||||
apt install php8.0
|
||||
```
|
||||
#### 安装拓展
|
||||
```
|
||||
apt install php8.0-curl php8.0-xml php8.0-gd php8.0-mbstring php8.0-redis php8.0-swoole php8.0-bcmath
|
||||
```
|
||||
|
||||
### 查看php版本
|
||||
```
|
||||
php -v
|
||||
```
|
||||
查看拓展
|
||||
```
|
||||
php -m
|
||||
```
|
||||
|
||||
### 切换PHP版本
|
||||
```
|
||||
update-alternatives --config php
|
||||
```
|
||||
切换到
|
||||
```
|
||||
update-alternatives --set php /usr/bin/php8.0
|
||||
```
|
||||
|
||||
|
||||
### PHP 扩展 ZipArchive
|
||||
上传压缩包提示500错误,打开日志发现是缺少组件
|
||||
|
||||
#### 服务器上存在多个php版本,手动指定php-config文件
|
||||
```
|
||||
./configure --with-php-config=/www/server/php/73/bin/php-config
|
||||
```
|
||||
#### 安装ZipArchive扩展
|
||||
```
|
||||
cd ~
|
||||
wget http://pecl.php.net/get/zip
|
||||
tar -zxvf zip
|
||||
```
|
||||
```
|
||||
cd zip-x.x.x
|
||||
```
|
||||
编译
|
||||
```
|
||||
phpize
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
```
|
||||
#### 成功安装zip之后会返回一个路径:
|
||||
```
|
||||
Installing shared extensions: /www/server/php/73/lib/php/extensions/no-debug-non-zts-20180731/
|
||||
```
|
||||
#### 加到php.ini中:
|
||||
```
|
||||
extension=/www/server/php/73/lib/php/extensions/no-debug-non-zts-20180731/zip.so
|
||||
```
|
||||
或
|
||||
在` php.ini `中添加
|
||||
```
|
||||
extension=zip.so
|
||||
```
|
||||
### 在使用插件转换数据中一直报错无法使用的class medoo
|
||||
所以使用cpmposer安装
|
||||
```
|
||||
composer require catfan/Medoo
|
||||
```
|
||||
## mariadb
|
||||
|
||||
### 创建数据库
|
||||
|
||||
[Mariadb创建数据库、用户及授权](https://www.jkjoy.cn/2023/dfdf0a76.html)
|
||||
### 数据导入
|
||||
导入sql备份文件
|
||||
|
||||
进入数据库
|
||||
```
|
||||
mysql -uroot -p
|
||||
```
|
||||
使用数据库bbs
|
||||
```
|
||||
use bbs
|
||||
```
|
||||
导入sql路径
|
||||
```
|
||||
source /root/bbs.sql;
|
||||
```
|
||||
## 安装 Redis
|
||||
```
|
||||
apt install redis-server
|
||||
```
|
||||
## 安装 Nginx
|
||||
```
|
||||
apt install nginx
|
||||
```
|
||||
## 安装composer
|
||||
```
|
||||
apt install git zip unzip
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
mv composer.phar /usr/local/bin/composer
|
||||
chmod +x /usr/local/bin/composer
|
||||
```
|
||||
## 安装SForum v2.2.2
|
||||
```
|
||||
composer create-project zhuchunshu/sforum=v2.2.2 sforum
|
||||
```
|
||||
进入安装目录,
|
||||
```
|
||||
cd sforum
|
||||
```
|
||||
按照提示,连续执行命令即可完成安装(启动服务也是此命令):
|
||||
```
|
||||
php CodeFec CodeFec
|
||||
```
|
Loading…
Reference in New Issue