第一篇博客

以前一直想搞个博客玩玩,记录生活,做一些备份。但是当时比较担心php,mysql环境,数据导入导出,是否本地运行等问题,所以直到第一次白嫖的阿里云服务器到期前都没有实际操作过。现在第二次白嫖,不能像以前傻傻的放几个静态网页了,可以尝试php,nodejs,以及一些有意思的项目。

本来博客系统打算放在阿里云的服务器上,但是出现了安装MySQL时系统资源占用过大,不断重启,服务器无法访问,无法SSH连接的问题,重新开机及无法解决问题;重置系统后通过docker安装后也是同样的问题,搜索无果后放弃了。面板是1panel,可能是MySQL启动时目录权限不够,反正我也不懂,换别的路。

网上搜索不需要数据库的静态博客网站框架后,经过对比,选择了hexo。因为hexo可以将博客挂载在GitHub的个人公开仓库里,对于不想没钱买服务器的人来说很好;仅需编写md文档,然后通过 hexo g生成静态网页,hexo d部署在github仓库里;简洁,支持插件等。

参考地址

B站视频教程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//下载hexo
npm install hexo-cli -g

//初始化
hexo init

//安装
hexo install

//新建文章
hexo new 文章标题

//generate 生成;deploy 部署
hexo g
hexo d

贴一下日志,以后看能不能搞懂。

系统信息
发行版本 ubuntu
内核版本 5.15.0-107-generic
系统类型 x86_64

第一次的部分日志:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[2K1Panel-mysql-4jWy  | 2024-10-31 02:24:04+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.3-1.el9 started.
[2K1Panel-mysql-4jWy | 2024-10-31 02:24:06+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
[2K1Panel-mysql-4jWy | 2024-10-31 02:24:06+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.3-1.el9 started.
[2K1Panel-mysql-4jWy | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:07.030860Z 0 [System] [MY-015015] [Server] MySQL Server - start.
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:07.556896Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.3) starting as process 1
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:07.627775Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:09.894140Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:10.578972Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:10.605714Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:10.814376Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:10.814492Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:10.832104Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:10.953313Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
[2K1Panel-mysql-4jWy | 2024-10-30T18:24:10.957465Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.3' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
[2K1Panel-mysql-4jWy | 2024-10-30T18:27:13.917377Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.4.3).
[2K1Panel-mysql-4jWy | 2024-10-30T18:27:18.373304Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.3) MySQL Community Server - GPL.
[2K1Panel-mysql-4jWy | 2024-10-30T18:27:18.373363Z 0 [System] [MY-015016] [Server] MySQL Server - end.

第二次的日志:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2024-11-08 19:34:29+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.1.0-1.el9 started.
2024-11-08 19:34:31+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-11-08 19:34:31+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.1.0-1.el9 started.
2024-11-08 19:34:32+00:00 [Note] [Entrypoint]: Initializing database files
2024-11-08T19:34:32.037383Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-11-08T19:34:32.039710Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 9.1.0) initializing of server in progress as process 80
2024-11-08T19:34:32.080653Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-11-08T19:34:33.089848Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-11-08T20:06:54.661982Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2024-11-08T20:06:57.768239Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
2024-11-08 20:06:57+00:00 [Note] [Entrypoint]: Database files initialized
2024-11-08 20:06:57+00:00 [Note] [Entrypoint]: Starting temporary server
2024-11-08T20:06:58.008726Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-11-08T20:06:58.582217Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.1.0) starting as process 119
2024-11-08T20:13:01.091925Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-11-08T20:15:41.698243Z 0 [ERROR] [MY-011065] [Server] Unable to determine if daemon is running: Inappropriate ioctl for device (rc=0).
2024-11-08T20:15:41.698292Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
2024-11-08 20:15:45+00:00 [ERROR] [Entrypoint]: Unable to start server.