你好,游客 登录 注册 搜索
背景:
阅读新闻

LAMP实现Wordpress 安装

[日期:2014-09-04] 来源:Linux社区  作者:程超 [字体:大 中 小]

(三):安装php模块

安装php,让php基于模块来运行。

配置apache,/etc/http2.4/httpd.conf  让Apache可以识别php

1、添加如下二行 
AddType application/x-httpd-php .php 
AddType application/x-httpd-php-source .phps 

LAMP实现Wordpress 安装

2、定位至DirectoryIndex index.html 
修改为: 
DirectoryIndex index.php index.html 
LAMP实现Wordpress 安装
而后重新启动httpd,或让其重新载入配置文件即可测试php是否已经可以正常使用。 

(四):安装数据库:

在CentOS7上我们选择yum包安装。

提供配置文件:
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld   
chkconfig --list mysqld
cp support-files/my-large.cnf /etc/my.cnf

# vim /etc/my.cnf    添加下边参数指定数据目录
datadir=/mydata/data


进入mysql,创建用户给予所有权限,对所有库有所有权限。

GRANT ALL ON *.* 'wp3'@'172.16.%.%' IDENTIFIED BY 'wp3'

关闭防火墙:systemctl stop firewalld
[root@localhost mysql]# mysql   
Welcome to the MariaDB monitor.  Commands end with ; or \g.   
Your MariaDB connection id is 2   
Server version: 5.5.39-MariaDB MariaDB Serve
Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

LAMP实现Wordpress 安装
[root@localhost ~]# mysql 
MariaDB [mysql]> grant all on *.* to  ‘wp3’@'172.16.%.%' identified by 'wp3';

二:安装WordPress

复制wordpress程序包到/web/nfs/{wp1,wp2}

解压.复制wp-config-sample.php为wp-config.php

vim wp-config.php

LAMP实现Wordpress 安装

wp1与wp2配置都一样。

访问OK!

LAMP实现Wordpress 安装

本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-09/106175.htm

linux
相关资讯       Wordpress安装 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款