博客
关于我
CentOS7 运维 - 搭建WordPress论坛 | 超详细 | MySQL安装使用
阅读量:528 次
发布时间:2019-03-07

本文共 1248 字,大约阅读时间需要 4 分钟。

CentOS7 运维 - 搭建WordPress论坛

更新时间:2021年1月31日
使用版本:5.6
官方下载地址

准备环境

  • 服务器操作系统:CentOS7
  • 部署服务器:Apache HTTP
  • 数据库:MySQL
  • 框架:WordPress

一、安装Apache HTTP

sudo yum install httpd

安装完毕后,启动服务

systemctl start httpd.service	#启动服务systemctl status httpd.service	#查看服务状态

关闭防火墙,使用其他设备测试

systemctl stop firewalld.service

二、安装MySQL

在线下载MySQL的安装包

wget https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

开始安装MySQL

rpm -ivh mysql57-community-release-el7-8.noarch.rpm

安装MySQL服务

过程可能会非常漫长,所以这里推荐使用

cd /etc/yum.repos.d/yum -y install mysql-server

启动MySQL

systemctl start mysqld

修改MySQL密码

查看临时密码

grep 'temporary password' /var/log/mysqld.log

使用临时密码登录MySQL

mysql -u root -p

修改MySQL密码

ALTER USER 'root'@'localhost' IDENTIFIED BY '密码';

在MySQL中新建数据库

创建一个叫wordpress的数据库

create database wordpress;

三、安装PHP

yum -y install epel-releaserpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmyum install php70wyum install php70w-fpm php70w-mysql php70w-xml php70w-mbstring php70w-openssl php70w-gd# 安装php70的扩展[必须要]

四、安装WordPress

如果下载速度过慢可尝试下载

##此处为官方源wget https://cn.wordpress.org/latest-zh_CN.tar.gz

使用 tar 解压文件

tar  -zxvf latest-zh_CN.tar.gz

将文件复制到 /var/www/html 下

cp -rf wordpress/* /var/www/html/

在此填入数据库名、数据库用户名以及密码后点击提交
填写站点信息
安装完成
登录你的站点
如有疑问或哪个步骤出现问题,请在下方留言

转载地址:http://xwunz.baihongyu.com/

你可能感兴趣的文章
MySQL不同字符集及排序规则详解:业务场景下的最佳选
查看>>
Mysql不同官方版本对比
查看>>
MySQL与Informix数据库中的同义表创建:深入解析与比较
查看>>
mysql与mem_细说 MySQL 之 MEM_ROOT
查看>>
MySQL与Oracle的数据迁移注意事项,另附转换工具链接
查看>>
mysql丢失更新问题
查看>>
MySQL两千万数据优化&迁移
查看>>
MySql中 delimiter 详解
查看>>
MYSQL中 find_in_set() 函数用法详解
查看>>
MySQL中auto_increment有什么作用?(IT枫斗者)
查看>>
MySQL中B+Tree索引原理
查看>>
mysql中cast() 和convert()的用法讲解
查看>>
mysql中datetime与timestamp类型有什么区别
查看>>
MySQL中DQL语言的执行顺序
查看>>
mysql中floor函数的作用是什么?
查看>>
MySQL中group by 与 order by 一起使用排序问题
查看>>
mysql中having的用法
查看>>
MySQL中interactive_timeout和wait_timeout的区别
查看>>
mysql中int、bigint、smallint 和 tinyint的区别、char和varchar的区别详细介绍
查看>>
mysql中json_extract的使用方法
查看>>