惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
博客园_首页
WordPress大学
WordPress大学
博客园 - 聂微东
P
Privacy International News Feed
Forbes - Security
Forbes - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
月光博客
月光博客
NISL@THU
NISL@THU
美团技术团队
T
Tailwind CSS Blog
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
C
Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Hacker News
The Hacker News
B
Blog
P
Palo Alto Networks Blog
L
Lohrmann on Cybersecurity
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
S
Securelist
A
Arctic Wolf
MyScale Blog
MyScale Blog
H
Help Net Security
N
Netflix TechBlog - Medium
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Threatpost
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Latest
Security Latest
T
Tor Project blog
V
Vulnerabilities – Threatpost
V
V2EX
AI
AI
Hugging Face - Blog
Hugging Face - Blog
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
Simon Willison's Weblog
Simon Willison's Weblog
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Troy Hunt's Blog
Schneier on Security
Schneier on Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Heimdal Security Blog
Google Online Security Blog
Google Online Security Blog
Know Your Adversary
Know Your Adversary

林林杂语

高考之后(贰) - 林林杂语 「进行中」XDSec SSO开发小记 - 林林杂语 试驳友谊之传递链 - 林林杂语 小东西:用FreshRSS实现带AI摘要的订阅推送 - 林林杂语 五一假期:南京之行 - 林林杂语
再见面板:Debian构建WordPress - 林林杂语
林林 · 2026-04-30 · via 林林杂语

任务要求:使用Debian纯命令行构建自己的WordPress网站,并通过一些方法支持http://linlin.zzo访问。

Bash

linlinzzo@linlinzzo:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.4
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

安装所需要的应用

Bash

sudo apt install -y php-fpm # PHP
sudo apt install nginx

安装 nginx 的时候报错Not attempting to start NGINX, port 80 is already in use.,当我通过Linux 查看端口占用情况 | 菜鸟教程的方法去检查端口占用的时候发现lsof和netstat命令都不存在,用apt把lsof安装一下。发现是apache把80端口给占了。

Bash

linlinzzo@linlinzzo:~$ sudo lsof -i:80
COMMAND  PID     USER FD   TYPE DEVICE SIZE/OFF NODE NAME
apache2 9027     root 4u  IPv6  35905      0t0  TCP *:http (LISTEN)
apache2 9030 www-data 4u  IPv6  35905      0t0  TCP *:http (LISTEN)
apache2 9031 www-data 4u  IPv6  35905      0t0  TCP *:http (LISTEN)
apache2 9032 www-data 4u  IPv6  35905      0t0  TCP *:http (LISTEN)
apache2 9033 www-data 4u  IPv6  35905      0t0  TCP *:http (LISTEN)
apache2 9034 www-data 4u  IPv6  35905      0t0  TCP *:http (LISTEN)

把apache卸载之后就可以用systemctl启动nginx了。

正要打算从官网下载MySQL,结果发现wget没装,把wget装一下,然后安装MySQL。

SQL

CREATE USER '111'@'localhost' IDENTIFIED BY '111';
CREATE DATABASE lin;
GRANT ALL PRIVILEGES ON lin.* TO '111'@'localhost';

ip addr看虚拟环境的IP,通过设置hosts文件让linlin.zzo指向虚拟环境。因为Nginx的配置文件是照搬网上的,一开始看日志是root设置错了还没有设置好访问权限,改好后还是报错,发现是php-fpm的路径不对。用where命令找不到php-fpm。通过下面的方法找到.sock的地址。

Bash

linlinzzo@linlinzzo:/etc/nginx/conf.d$ sudo systemctl status php8.4-fpm
 php8.4-fpm.service - The PHP 8.4 FastCGI Process Manager
     Loaded: loaded (/usr/lib/systemd/system/php8.4-fpm.service; enabled; preset: enabled)
(...)
linlinzzo@linlinzzo:/etc/nginx/conf.d$ cat /usr/lib/systemd/system/php8.4-fpm.service
(...)
[Service]
Type=notify
ExecStart=/usr/sbin/php-fpm8.4 --nodaemonize --fpm-config /etc/php/8.4/fpm/php-fpm.conf
ExecStartPost=-/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/8.4/fpm/pool.d/www.conf 84
ExecStopPost=-/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/8.4/fpm/pool.d/www.conf 84
(...)

这下可以显示出页面了,提示说需要安装一个PHP拓展,那我们安装一下。

Bash

linlinzzo@linlinzzo:/etc/nginx/conf.d$ sudo apt install php-mysqli
Note, selecting 'php8.4-mysql' instead of 'php-mysqli'
...

安装好之后回到刚才的安装界面设置管理账户的用户名和密码,接下来通过WordPress自带的迁移功能进行迁移。

WordPress无论是自己上传插件文件还是从插件市场上安装都需要配置FTP信息,奇怪,为什么我在我服务器上不用这些信息。我不太想配置FTP,所以直接在Windows把压缩包传到Debian然后解压。

当我启用导入插件并将我这个博客的导出文件传进去时,发生了413 Request Entity Too Large。我在Nginx的配置文件中加了一行放宽一下限制:client_max_body_size 100M;

这样大致就OK了。

未完待续

用VirtualBox安装虚拟机之后,使用普通用户登录发现没有sudo权限,改成root身份,后面配置就不用敲sudo了。