
继上次在手机里安装了Debian后,安装Typecho博客系统
安装Nginx、PHP、MariaDB等
这些软件安装基本没什么需要注意的,网上很多LNPM环境搭建的教程,这里放一个阿里云帮助中心的教程:LNMP环境安装
注意:上面的教程里安装的是Mysql,可以选择安装MariaDB
安装php的mysqli拓展并启动
apt install php-mysqli 可以安装sqlite apt install php-sqlite3启动mysqli
nano /etc/php/7.4/fpm/php.ini extension=mysqli- 安装php的mbstring拓展并启动(同上)
创建Nginx配置文件
cp /etc/nginx/site-enable/default /etc/nginx/site-enable/myblog修改
监听端口和root目录为自己想设置的,手机中的80、443端口也被禁了并修改以下配置
#添加 if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; } #原来的 location ~ .*\\.php$ #修改为 location ~ .*\\.php(\\/.*)*$ { include fastcgi.conf; fastcgi_pass 127.0.0.1:9000; }下载并上传Typecho文件
{% btn 'https://typecho.org/download',我是下载链接,anzhiyufont anzhiyu-icon-circle-arrow-right %}
我这里用了Freewind主题
{% btn 'https://kevinlu98.cn/archives/27.html',Freewind作者博客地址,anzhiyufont anzhiyu-icon-circle-arrow-right %}
简单点好呀hhh
瞎折腾得点啥东西!