在RHEL9上搭建WordPress
文章目录
网站效果:
本人的博客网站:xiaoxinxin.serv00.net
访问会很慢,因为服务器在波兰
,要是挂上梯子会快很多
在Red Hat Enterprise Linux 9(RHEL 9)上搭建WordPress需要配置LAMP(Linux, Apache, MariaDB, PHP)环境并安装WordPress。以下是详细步骤:
一、系统更新
sudo dnf update -y
sudo reboot # 可选,建议重启以应用更新
二、安装Apache
-
安装Apache:
sudo dnf install httpd -y
-
启动并设置开机自启:
sudo systemctl enable --now httpd
-
验证Apache:
浏览器访问http://<服务器IP>
,应显示Apache默认页面。(访问不到就是防火墙和selinux的问题)setenforce 0 临时关闭selinux systemctl stop firewalld.service
三、安装MariaDB
-
安装MariaDB:
sudo dnf install mariadb-server -y
-
启动并设置开机自启:
sudo systemctl enable --now<