Linux系统部署wordpress@林

部署wordpress

①.更新yum 源

 yum -y update

②.安装软件

 yum install httpd mysql-server php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc -y

③.查看php版本命令:如果低于5.6则卸载:

 php -v

//卸载php相关所有的版本

 rpm -qa | grep php | xargs rpm -e

④.再次查看是否完全删除

 php -v

查看版本信息已经没有提示

⑤.更新php的yum源:

rpm -Uvh  http://mirror.webtatic.com/yum/el6/latest.rpm

⑥. 安装新版php环境

 yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-odbc.x86_64 php56w-xml.x86_64 php56w-xmlrpc.x86_64 php56w-soap.x86_64

⑦.启动httpd服务:

service httpd start

⑧.启动Mysql服务

 service mysqld start

⑨.查看端口

 ss -tnl

安装完之后开启MySQL服务:
进入mysql
配置数据库数据


为WordPress在MySQL中创建一个DB及相关用户

#登录MYSQL
⑩进入mysql数据库
[root@bogon html]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution

Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

①①.查看所有数据库
mysql> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| test |
±-------------------+
3 rows in set (0.00 sec)

①②.创建一个名叫wordpress的数据库
mysql> create database wordpress;
Query OK, 1 row affected (0.00 sec)

①③.再次查看wordpress数据库是否创建成功
mysql> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| test |
| wordpress |
±-------------------+
4 rows in set (0.00 sec)

①④.创建用户
mysql> create user wpuser@localhost;
Query OK, 0 rows affected (0.00 sec)

①⑤.使用mysql数据库
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
①⑥.查看user表中User属性
mysql> select User from user;
±-------+
| User |
±-------+
| root |
| |
| root |
| |
| root |
| wpuser |
±-------+
6 rows in set (0.00 sec)

①⑦.更新user表中存储的用户名和密码
mysql> update user set password = password("wppassword") where User = 'wpuser';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

①⑧.授权wpuser用户拥有wordpress. TO的所有权限。*
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost IDENTIFIED BY 'wppassword';
Query OK, 0 rows affected (0.00 sec)

①⑨.刷新mysql的系统权限相关表
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

②〇.退出mysql
mysql> exit;
Bye



**②①.**导入wordpress文件(推荐使用方法二,全程代码逼格够高
先把wordpress压缩包拉到 /home/自己名称/下载 里面
在这里插入图片描述
方法一:
进入虚拟机打开终端,进入超级管理模式
①# su
②以root权限打开窗口管理文件#sudo nautilus
③将下载中wordoress文件复制到home/var/www/html
④右键解压
方法二:
①先进入/home/自己名称/下载 目录下

 cd /home/TXL/下载

②直接将 /home/自己名称/下载 目录下的wordpress压缩包解压到 /var/www/html 目录下

  tar zxvf wordpress-4.5.3-zh_CN.tar.gz -C /var/www/html

②②.配置WordPress
…进入html文件夹**

[root@bogon html]# cd /var/www/html

…进入wordpress文件

[root@bogon html]# cd wordpress/

…创建wp-config-sample.php wp-config.php

[root@bogon wordpress]# cp wp-config-sample.php wp-config.php

…编辑wp-config.php

[root@bogon wordpress]# vim wp-config.php 

[root@bogon wordpress]#

②⑤修改wordpress数据库名称、用户名、密码
/
WordPress数据库的名称 /*

define(‘DB_NAME’,‘wordpress’);

/** MySQL数据库用户名 */

define(‘DB_USER’,‘wpuser’);

/** MySQL数据库密码 */

define(‘DB_PASSWORD’,‘wppassword’);

②⑥进入虚拟机打开CenOs6.5里面的firfox浏览器在网址栏输入localhost/wordpress后打开
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hippoDocker

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值