APACHE安装和防火墙放行

yum -y install httpd wget unzip systemctl start httpd systemctl enable httpd firewall-cmd —add-port=80/tcp —permanent firewall-cmd —reload image.png

安装PHP

yum -y install php-* —skip-broken php-mysqlnd cd /var/www/html

wget http://mirrors.eagleslab.com:8889/tz.php

systemctl restart httpd

image.png

安装mariadb

yum -y install mariadb mariadb-server systemctl start mariadb

systemctl enable mariadb

mysql_secure_installation

检测一下数据库是否连接正常
image.png

创建用于博客的数据库

mysql -uroot -p123456 -e “create database blog;show databases;”

下载博客源码进行安装(这一步需要去官网下载)

cd /var/www/html

wget http://mirrors.eagleslab.com:8889/typecho.zip

unzip typecho.zip

image.png

最后可以直接访问博客

image.png

这样接搭建好了一个博客。