博客
关于我
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/

你可能感兴趣的文章
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>
no such file or directory AndroidManifest.xml
查看>>
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
查看>>
NO.23 ZenTaoPHP目录结构
查看>>
no1
查看>>
NO32 网络层次及OSI7层模型--TCP三次握手四次断开--子网划分
查看>>
NOAA(美国海洋和大气管理局)气象数据获取与POI点数据获取
查看>>
NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
查看>>
node exporter完整版
查看>>
Node JS: < 一> 初识Node JS
查看>>
Node JS: < 二> Node JS例子解析
查看>>
Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime(72)
查看>>
Node 裁切图片的方法
查看>>
Node+Express连接mysql实现增删改查
查看>>
node, nvm, npm,pnpm,以前简单的前端环境为什么越来越复杂
查看>>