基于华为云部署博客系统wordpress
程序员文章站
2022-06-04 10:06:14
...
基于华为云部署博客系统wordpress
一.LOGO
二.基础环境
#基础环境[云服务器已完成]
[aaa@qq.com ~]# sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
[aaa@qq.com ~]# setenforce 0
[aaa@qq.com ~]# systemctl stop firewalld.service
[aaa@qq.com ~]# systemctl disable firewalld.service
三.安装LAMP
#安装LAMP
[aaa@qq.com ~]# yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd
[aaa@qq.com ~]# systemctl start httpd mariadb
[aaa@qq.com ~]# systemctl enable httpd mariadb
四.安装wordpress
1.Apache配置虚拟主机
[aaa@qq.com ~]# vim /etc/httpd/conf.d/wordpress.conf
<VirtualHost *:83> #云服务器需要添加83端口
ServerName 124.70.158.229
DocumentRoot /var/www/wordpress
</VirtualHost>
[aaa@qq.com ~]# vim /etc/httpd/conf/httpd.conf #添加 Listen 83
[aaa@qq.com ~]# systemctl restart httpd
2.导入wordpress网站源码
#rz上传源码包到服务器
[aaa@qq.com ~]# mkdir -p /var/www/wordpress #创建网站主目录
[aaa@qq.com ~]# unzip wordpress-4.9.4-zh_CN.zip #解压缩源码包
[aaa@qq.com ~]# cp -rf wordpress/* /var/wwww/wordpress/ #拷贝源码到主目录
[aaa@qq.com ~]#chown -R apache.apache /var/www/wordpress
3.准备数据库
[aaa@qq.com ~]# mysql
MariaDB [(none)]> create database wordpress ; #创建数据库再敲一遍,可以检查是否创建成功