Skip to content

Commit

Permalink
Update articles
Browse files Browse the repository at this point in the history
  • Loading branch information
mobeicanyue committed May 29, 2024
1 parent b020a85 commit 876f724
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 13 deletions.
2 changes: 1 addition & 1 deletion source/_posts/1panel-installation-and-usage-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Fail2Ban 是一个入侵检测系统框架,它可以监控服务器的日志

![备份](https://pic1.zhimg.com/80/v2-534e0133ab62317a74b9a6b862c8c5b8_1440w.webp)

在新服务器上安装 `1Panel`,然后在 `应用商店` 中安装 Umami 和 MySQL,来到 `已安装` -> 点击应用的 `导入备份`,上传备份文件 点击恢复,即可迁移应用。
在新服务器上安装 `1Panel`,然后在 `应用商店` 中安装 Umami 和 MySQL,来到 `已安装` -> 点击应用的 `导入备份`,上传备份文件 查询修改数据库中的数据查询修改数据库中的数据点击恢复,即可迁移应用。

![导入备份](https://pic4.zhimg.com/80/v2-9a307618af09578ae21ac843c852070b_1440w.webp)

Expand Down
16 changes: 12 additions & 4 deletions source/_posts/Fluid-theme-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,29 @@ abbrlink: 5eba38dc
date: 2023-12-27 02:09:48
---

[官方文档](https://hexo.fluid-dev.com/docs/start)其实挺详细的了。
记录一下我自己的操作。
[官方文档](https://hexo.fluid-dev.com/docs/start)其实挺详细的了。本文记录一下自己的操作。

## 1. 安装主题
进入博客目录执行命令:

### 1.1 安装方式一:从 NPM 安装

在博客目录执行命令:
```bash
npm install --save hexo-theme-fluid
```
然后在博客目录下创建 _config.fluid.yml,将官方仓库的主题配置 [_config.yml](https://github.com/fluid-dev/hexo-theme-fluid/blob/master/_config.yml) 内容复制过去。
然后在博客根目录下创建 _config.fluid.yml,将官方仓库的主题配置 [_config.yml](https://github.com/fluid-dev/hexo-theme-fluid/blob/master/_config.yml) 内容复制过去。

现在目录下有这三个 yml 文件:
![yml-files](https://pic2.zhimg.com/80/v2-052fdc56939475513bf83af1bd6b1bb5_1440w.webp)

可删除 `_config.landscape.yml` , 它是 hexo 默认的主题文件。

### 1.2 安装方式二:解压 GitHub 源码包

下载 [主题最新 release 版本](https://github.com/fluid-dev/hexo-theme-fluid/releases) 解压到 themes 目录,并将解压出的文件夹重命名为 fluid。注意,这种方式安装的主题自带配置文件 `_config.yml`,位于主题根目录,不需要手动创建。

这种方式适用于想灵活修改主题的用户,因为 Fluid 更新较慢,如果你有一些自定义需求,可以直接修改源码。

## 2. 修改 hexo 配置

修改 Hexo 博客目录中的 `_config.yml`,将 `theme` 属性改为 `fluid`, `language` 属性改为 `zh-CN`
Expand Down
12 changes: 7 additions & 5 deletions source/_posts/Umami-installation-and-usage-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,25 @@ yarn start

{% fold info @docker-compose 安装 %}
下载官方的 docker-compose.yml 文件:
https://github.com/umami-software/umami/blob/master/docker-compose.yml
```bash
wget https://raw.githubusercontent.com/umami-software/umami/master/docker-compose.yml
```

配置里默认是 Postgresql 数据库,如果你想使用 MySQL 数据库,可以修改 `docker-compose.yml` 文件,将 `DATABASE_URL``postgres` 替换为 `mysql`,并修改 `DATABASE_URL` 为 MySQL 对应的链接。
`docker-compose.yml` 的默认数据库是 Postgresql 数据库,如果你想使用 MySQL 数据库,可以修改 `docker-compose.yml`,将 `DATABASE_URL``postgres` 替换为 `mysql`,并修改 `DATABASE_URL` 为 MySQL 对应的链接。

然后运行
修改完配置参数后运行
```bash
docker-compose up -d
```
{% endfold %}

默认情况下,应用程序将在 http://localhost:3000 上启动。你可能需要代理 Web 服务器的请求,或更改端口来直接为应用程序提供服务
默认情况下,应用程序将在 http://localhost:3000 上启动。建议使用反向代理避免直接暴露端口


## 3. 修改 Umami 密码
Umami 启动后,默认用户名为 `admin`,默认密码为 `umami`

第一件事是修改密码,选择 `Setting` -> `Profile`,然后设置你的新密码。
我们先修改密码,选择 `Setting` -> `Profile`,然后设置你的新密码。
![修改密码](https://pic4.zhimg.com/80/v2-8e5d01834b102bd9acedb220fe8cc29f_1440w.webp)

点击右上角的地球图标,修改语言为 `中文`
Expand Down
48 changes: 45 additions & 3 deletions source/_posts/Using-mariadb-on-ArchLinux.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ sudo lsattr -d /var/lib/mysql

## 1. 安装 MariaDB

输入以下命令来安装 `MariaDB`
```bash
sudo pacman -S mariadb
```
Expand Down Expand Up @@ -213,7 +214,48 @@ Thanks for using MariaDB!
## 5. 使用 MariaDB
### 5.1 登录 MariaDB
## 5.1 常用命令
启动 MariaDB 服务并设置服务开机自启:
```bash
sudo systemctl enable --now mariadb
```
查看 MariaDB 服务状态:
```bash
sudo systemctl status mariadb
```
更新 MariaDB:
```bash
sudo pacman -Syu mariadb
```
<br>
启动 MariaDB 服务:
```bash
sudo systemctl start mariadb
```
停止 MariaDB 服务:
```bash
sudo systemctl stop mariadb
```
重启 MariaDB 服务:
```bash
sudo systemctl restart mariadb
```
<br>
开机启动 MariaDB 服务:
```bash
sudo systemctl enable mariadb
```
禁用 MariaDB 服务开机自启:
```bash
sudo systemctl disable mariadb
```
### 5.2 登录 MariaDB
```bash
sudo mariadb
```
Expand All @@ -225,7 +267,7 @@ sudo mariadb -u root -p
如果这里报错:`ERROR 1698 (28000): Access denied for user 'root'@'localhost'`,那么你需要使用 `sudo mariadb` 来登录,或者重新运行 `sudo mariadb-secure-installation` 来设置密码。
### 5.2 查看数据库
### 5.3 查看数据库
```sql
SHOW DATABASES;
```
Expand All @@ -244,7 +286,7 @@ MariaDB [(none)]> show databases;
4 rows in set (0.001 sec)
```
现在,你可以开始使用 `MariaDB` 了。
现在,你可以开始使用 `MariaDB` 了。`MariaDB` 默认只提供命令行工具,你也可以使用 `beekeeper-studio` 或者 `navicat` 等图形化工具来管理数据库,增删改查非常方便。
参考文章:
Expand Down

0 comments on commit 876f724

Please sign in to comment.