centos7之安装wordpress
wordpress安装教程如下:
mysql安装可以参考我的博客园Centos构建Java环境:https://www.cnblogs.com/youcong/p/9118753.html
1.安装apache
yum install httpd
systemctl start httpd
2.安装php
yum install -y php php-mysql
systemctl restart httpd
vim /var/www/html/info.php
<?php phpinfo(); ?>
3.安装phpmyadmin(补充说明:安装mysql教程不论是centos还是ubuntu,可以参考我的博客文章)
yum install -y epel-release
yum install -y phpmyadmin
vim /etc/httpd/conf.d/phpMyAdmin.conf
配置文件内容如下:
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8 <IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory> <Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
</Directory>
重启httpd服务器
systemctl restart httpd
安装完phpmyadmin一定要输入对应的地址进入phpMyAdmin管理平台
进入该平台进行用户添加和数据添加
也可以通过命令行的形式:
例如:
# 登录数据库
mysql -u root -p
# 创建数据库
CREATE DATABASE wordpress;
# 创建数据库用户和密码
CREATE USER wordpressuser@localhost IDENTIFIED BY '123456';
# 设置wordpressuser访问wordpress数据库权限
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY '123456';
# 刷新数据库设置
FLUSH PRIVILEGES;
# 退出数据库
exit
4.安装wordpress
http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
解压后并在当前目录下执行:sudo rsync -avP ~/wordpress/ /var/www/html/wordpress/
# 切换到wordpress目录
cd /var/www/html/wordpress
# 复制wp-config.php文件
cp wp-config-sample.php wp-config.php
# 编辑wp-config.php文件
sudo vim wp-config.php
默认内容如下:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');
/** MySQL database username */
define('DB_USER', 'username_here');
/** MySQL database password */
define('DB_PASSWORD', 'password_here');
/** MySQL hostname */
define('DB_HOST', 'localhost'); 将其修改为: // ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'wordpress');
/** MySQL database password */
define('DB_PASSWORD', '123456');
/** MySQL hostname */
define('DB_HOST', 'localhost');
完成后在浏览器输入地址:www.example.com/wordpress/wp-admin/install.php
按照步骤来,一步一步安装。
centos7之安装wordpress的更多相关文章
- centos7.3安装wordpress
一.安装并配置数据库 1.安装mariadb #yum install -y mariadb-server mariadb 2.启动数据库并设置开机自启#systemctl start mariadb ...
- ubuntu16.04安装wordpress
ubuntu16.04安装wordpress和centos7安装wordpress存在一定的差异. 当然共性大于差异. 共性是lamp环境. wordpress的必备环境. 先共性再差异. 一.搭建l ...
- centos7安装wordpress详细教程
安装之前:建议安装各种软件 [root@localhost ~]# yum -y install wget zip unzip net-tools 一.安装apache 测试环境建议关闭防火墙和SEL ...
- Centos7下搭建LAMP环境,安装wordpress(不会生产博客,只是一名博客搬运工)(菜鸟)
1.搭建MySQL数据库 安装MariaDB yum install mariadb-server -y 启动MySQL服务 emctl start mariadb #启动服务 emtcl enabl ...
- 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 ...
- Docker中安装WordPress
前言 虚拟化技术风靡一时,还不层在生产环境中实践.只能是闭门造车,自己玩一玩了,接触了一下docker最简单的命令,这才自己搭建一个wordpress玩一玩. 安装wordpress之前先把本机的do ...
- 2021最新WordPress安装教程(三):安装WordPress详细步骤
前面已经通过< 2021最新WordPress安装教程(一):Centos7安装Apache>和< 2021最新WordPress安装教程(二):配置PHP和MySQL>两篇文 ...
- 在centos7上安装Jenkins
在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...
- CentOS7 Jenkins安装
CentOS7 Jenkins安装 CentOS7 Jenkins安装 Download 从Jenkins下载apache-tomcat-8.0.18.tar.gz Install 安装 上传RPM文 ...
随机推荐
- FCN的理解
FCN特点 1.卷积化 即是将普通的分类网络丢弃全连接层,换上对应的卷积层即可 2.上采样 方法是双线性上采样差 此处的上采样即是反卷积3.因为如果将全卷积之后的结果直接上采样得到的结果是很粗糙的,所 ...
- javaweb之验证码验证技术
今天学习了一个验证码校验技术,所以就写下了一些笔记,方便日后查看.首先创建web工程 1.然后在src目录下创建一个Servlet类,此类用来显示登录页面和错误信息提示 package com.LHB ...
- not value specified for parameter问题解决方案
前段时间遇到这个问题找了半天没有找到,今天又调试了突然发现出现这个问题的根本原因是sql语句中的参数没有赋值或者参数类型与数据库字段类型不匹配所导致的. 例如: String sql = " ...
- [转]js刷新父窗体
浮层内嵌iframe及frame集合窗口,刷新父页面的多种方法 <script language=JavaScript> parent.location.reload(); ...
- Widget Factory (高斯消元解线性方程组)
The widget factory produces several different kinds of widgets. Each widget is carefully built by a ...
- codeforces 979A Pizza, Pizza, Pizza!!!
题意: 对一个圆形的pizza,只能用直线来切它,求把它切为n+1份的形状和size都相同的最下次数. 思路: 形状和size都相同,那么只能是扇形,分奇偶讨论. n为0还得特判,切0刀,因为这个还被 ...
- AttributeError: module 'DBBase' has no attribute 'DBBase'
AttributeError: module 'DBBase' has no attribute 'DBBase' pycharm不会将当前文件目录自动加入自己的sourse_path.右键make_ ...
- FileInputstream,FileOutputstream 和 byteArrayInputStream,byteArrayOutputStream
你知道FileInputstream和FileOutputstream吗?FileInputstream,FileOutputstream分别是由抽象类Inputstream和Outputstream ...
- 利用可排序Key-Value DB构建时间序列数据库(简论)
为了防止无良网站的爬虫抓取文章,特此标识,转载请注明文章出处.LaplaceDemon/ShiJiaqi. http://www.cnblogs.com/shijiaqi1066/p/5855064. ...
- rabbitmq的相关知识
1. 如何确保消息正确地发送至RabbitMQ? RabbitMQ使用发送方确认模式,确保消息正确地发送到RabbitMQ. 发送方确认模式:将信道设置成confirm模式(发送方确认模式),则所有在 ...