【运维知识进阶篇】用LNPM架构部署WordPress博客

简介: 【运维知识进阶篇】用LNPM架构部署WordPress博客

哈喽大家好,我是koten,本篇文章详细给大家介绍如果用LNPM架构部署WordPress,话不多说,我们直接开始。

第一步:配置Nginx虚拟主机站点,域名为blog.koten.com

1. [root@Web01 /]# vim /etc/nginx/conf.d/wordpress.conf
2. server {
3.         listen 80;
4.         server_name blog.koten.com;
5.         root /code/wordpress;
6. index index.php index.html index.htm;
7. 
8. location ~\.php$ {
9.                 root /code/wordpress;
10.                 fastcgi_pass 127.0.0.1:9000;
11.                 fastcgi_index index.php;
12.                 fastcgi_param SCRIPT_FILENAME $document_root$fast
13. cgi_script_name;
14.                 include fastcgi_params;
15.         }
16. <ginx/conf.d/wordpress.conf" 14L, 314C written 
17. [root@Web01 /]# nginx -t
18. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
19. nginx: configuration file /etc/nginx/nginx.conf test is successful

第二步:重启nginx服务

[root@Web01 /]# systemctl restart nginx

第三步:获取wordpress产品,解压并部署wordpress

1. [root@Web01 /]# mkdir code
2. [root@Web01 /]# cd code/
3. [root@Web01 code]# wget https://cn.wordpress.org/latest-zh_CN.tar.gz
4. --2023-04-04 15:59:27--  https://cn.wordpress.org/latest-zh_CN.tar.gz
5. Resolving cn.wordpress.org (cn.wordpress.org)... 198.143.164.252
6. Connecting to cn.wordpress.org (cn.wordpress.org)|198.143.164.252|:443... connected.
7. HTTP request sent, awaiting response... 200 OK
8. Length: 23763585 (23M) [application/octet-stream]
9. Saving to: ‘latest-zh_CN.tar.gz’
10. 
11. 100%[=======================>] 23,763,585   373KB/s   in 59s    
12. 
13. 2023-04-04 16:00:32 (392 KB/s) - ‘latest-zh_CN.tar.gz’ saved [23763585/23763585]
14. 
15. [root@Web01 code]# tar xf latest-zh_CN.tar.gz 
16. [root@Web01 code]# chown -R www.www /code/wordpress/

第四步:Windows本地hosts解析,浏览器访问blog.koten.com,发现需要依赖数据库,所以我们手动建立数据库

1. [root@Web01 code]# mysql -uroot -pkoten.vip -e "create database wordpress"
2. [root@Web01 code]# mysql -uroot -pkoten.vip -e "show databases"
3. +--------------------+
4. | Database           |
5. +--------------------+
6. | information_schema |
7. | mysql              |
8. | performance_schema |
9. | test               |
10. | wordpress          |
11. +--------------------+

第五步:操作wordpress界面,配置信息

大功告成,可以通过blog.koten.com/wp-admin访问后台

blog.koten.com可以访问博客主页


我是koten,10年运维经验,持续分享运维干货,感谢大家的阅读和关注!

 

目录
相关文章
|
6月前
|
机器学习/深度学习 人工智能 运维
云架构不是养祖宗,智能运维教你省心又省钱
云架构不是养祖宗,智能运维教你省心又省钱
173 2
|
6月前
|
数据采集 运维 数据可视化
AR 运维系统与 MES、EMA、IoT 系统的融合架构与实践
AR运维系统融合IoT、EMA、MES数据,构建“感知-分析-决策-执行”闭环。通过AR终端实现设备数据可视化,实时呈现温度、工单等信息,提升运维效率与生产可靠性。(238字)
|
5月前
|
运维 Prometheus 监控
别再“亡羊补牢”了!——聊聊如何优化企业的IT运维监控架构
别再“亡羊补牢”了!——聊聊如何优化企业的IT运维监控架构
236 8
|
9月前
|
存储 运维 安全
Docker化运维:容器部署的实践指南
Docker化运维:容器部署的实践指南
|
5月前
|
存储 监控 安全
132_API部署:FastAPI与现代安全架构深度解析与LLM服务化最佳实践
在大语言模型(LLM)部署的最后一公里,API接口的设计与安全性直接决定了模型服务的可用性、稳定性与用户信任度。随着2025年LLM应用的爆炸式增长,如何构建高性能、高安全性的REST API成为开发者面临的核心挑战。FastAPI作为Python生态中最受青睐的Web框架之一,凭借其卓越的性能、强大的类型安全支持和完善的文档生成能力,已成为LLM服务化部署的首选方案。
|
7月前
|
运维 Dubbo Cloud Native
Dubbo 云原生重构出击:更快部署、更强控制台、更智能运维
Apache Dubbo 最新升级支持云原生,提供一键部署微服务集群与全新可视化控制台,提升全生命周期管理体验,助力企业高效构建云原生应用。
788 25
|
8月前
|
运维 监控 Cloud Native
从“守机器”到“写策略”——云原生架构把运维逼成了架构师
从“守机器”到“写策略”——云原生架构把运维逼成了架构师
204 1