一、安装并配置数据库

1.安装mariadb

#yum install -y mariadb-server mariadb

2.启动数据库并设置开机自启
#systemctl start mariadb &&systemctl enable mariadb

3.初始化数据库
#mysql_secure_installation

4.登录数据库并创建wordpres库

#mysql -u root -p
>create database wordpress;
>grant all privileges on wordpress.* to 'wordpress'@'localhost' identified by 'wordpress';
>grant all privileges on wordpress.* to 'wordpress'@'%' identified by 'wordpress';

二、安装Apache+php7

1.安装apache
#yum install -y httpd &&systemctl enable httpd &&systemctl start httpd
2.安装php
#yum install -y epel-release && rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
#yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 -y

3.配置apache

删除欢迎页
#rm -rf /etc/httpd/conf.d/welcome.conf

#vi /etc/httpd/conf/httpd.conf

  DirectoryIndex index.php index.html  #添加对PHP的支持

三、下载wordpress中文版

#cd /opt
#yum install -y wget
#wget https://cn.wordpress.org/wordpress-4.9.1-zh_CN.tar.gz

#tar -xzvf wordpress-4.9.1-zh_CN.tar.gz 
#cp -r wordpress/* /var/www/html/

四、重启服务apache#systemctl restart httpd

五、访问http://your_ip

如果报错,更改html属主,属组   (不改属组属主在后期升级或导致没有权限创建文件或写入)

chown apache. -R html/

附:更改对上传文件大小的限制:

#vi /etc/php.ini

  #找到下面3行,更改值

upload_max_filesize = 2M
post_max_size = 8M
max_execution_time = 30

六、解决安装WordPress主题及插件需要输入FTP问题(https://jingyan.baidu.com/article/4f34706efc1237e387b56da4.html)(没有验证过)

在wp-config.php文件中添加脚本方式

define("FS_METHOD","direct");

define("FS_CHMOD_DIR", 0777);

define("FS_CHMOD_FILE", 0777);

centos7.3安装wordpress的更多相关文章

  1. centos7之安装wordpress

    wordpress安装教程如下: mysql安装可以参考我的博客园Centos构建Java环境:https://www.cnblogs.com/youcong/p/9118753.html 1.安装a ...

  2. ubuntu16.04安装wordpress

    ubuntu16.04安装wordpress和centos7安装wordpress存在一定的差异. 当然共性大于差异. 共性是lamp环境. wordpress的必备环境. 先共性再差异. 一.搭建l ...

  3. centos7安装wordpress详细教程

    安装之前:建议安装各种软件 [root@localhost ~]# yum -y install wget zip unzip net-tools 一.安装apache 测试环境建议关闭防火墙和SEL ...

  4. Centos7下搭建LAMP环境,安装wordpress(不会生产博客,只是一名博客搬运工)(菜鸟)

    1.搭建MySQL数据库 安装MariaDB yum install mariadb-server -y 启动MySQL服务 emctl start mariadb #启动服务 emtcl enabl ...

  5. centos7编译安装lamp实现wordpress

    准备安装包,并解压 mariadb-10.3.13.tar.gz  ,php-7.3.2.tar.bz2  ,httpd-2.4.38.tar.bz2  php-7.3.2 ,  phpMyAdmin ...

  6. Docker中安装WordPress

    前言 虚拟化技术风靡一时,还不层在生产环境中实践.只能是闭门造车,自己玩一玩了,接触了一下docker最简单的命令,这才自己搭建一个wordpress玩一玩. 安装wordpress之前先把本机的do ...

  7. 2021最新WordPress安装教程(三):安装WordPress详细步骤

    前面已经通过< 2021最新WordPress安装教程(一):Centos7安装Apache>和< 2021最新WordPress安装教程(二):配置PHP和MySQL>两篇文 ...

  8. 在centos7上安装Jenkins

    在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...

  9. CentOS7 Jenkins安装

    CentOS7 Jenkins安装 CentOS7 Jenkins安装 Download 从Jenkins下载apache-tomcat-8.0.18.tar.gz Install 安装 上传RPM文 ...

随机推荐

  1. shell截取小数点前后的子串

  2. python常用函数 M

    max(iterable) 求最大值,可以传入key. 例子: min(iterable) 求最小值,支持传入key. 例子: match(regular expression, string) 字符 ...

  3. C++使用函数strcpy出现bug: 错误 C4996 'strcpy': This function or variable

    C++中使用函数strcpy时出现问题: 解决方案: 在文件开头添加语句: #pragma warning(disable:4996) done! 剑指offer: 第一题:赋值运算符函数 #incl ...

  4. wxpython 文本框TextCtrl

    path_text = wx.TextCtrl(frame, pos=(5, 5), size=(350, 24))最常用的两个函数:path = path_text.GetValue() conte ...

  5. python运行windows终端程序

    其实是用python控制windows里的shell 1.windows有PowerShell,可以通过搜索打开,运行python不需要打开shell 2.用python里的subprocess函数, ...

  6. The main Method

    The main Method You can call static methods without having any objects. For example, you never const ...

  7. C#基础提升系列——C#委托

    C# 委托 委托是类型安全的类,它定义了返回类型和参数的类型,委托类可以包含一个或多个方法的引用.可以使用lambda表达式实现参数是委托类型的方法. 委托 当需要把一个方法作为参数传递给另一个方法时 ...

  8. 支付宝证书签名 PHP SDK

    PHP 接入支付宝证书方式签名以及验签 支付宝在 2019.10.25 日左右更新了新的 PHP SDK (v4.1.0). 之前的 PHP SDK(v3.4.2) 仅支持公钥方式加签.这次更新之后 ...

  9. mui is not defined

    vue项目中引用mui.js,我是在main.js中这样引入的,    结果报错  查找资料,最后在mui.js的最后添加了这样一句  这是因为mui并不能像jquery那样作为全局对象存在,加上wi ...

  10. C++ 常用数学运算(加减乘除)代码实现 Utils.h, Utils.cpp(有疑问欢迎留言)

    Utils.h #pragma once class Utils { public: static double* array_diff(double*A,double B[],int n); sta ...