windows server上配置 apache + php + MySQL + wordpress
2016-02-01 04:05
816 查看
花了几天的时间来创建我的私人博客。
新的博客:Scarb’s Blog
使用学生价租了阿里云的服务器,使用了windows server 2012 R2(R2 版本才有开始菜单),在上面搭建了wordpress博客,并且配置wpcmd管理我的博客。
接下来我将记录一下建立博客的过程,当时录了视频,现在用视频里面的截图配合讲解。有些地方已经遗忘了………………
配置Apache24
配置php
配置MySQL
配置Wordpress
在bin下进入命令行,输入
即可安装Apache2.4
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030025.png)
用记事本打开conf/httpd.conf
如下修改,将index.php作为默认的DirectoryIndex
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030824.png)
然后可以使用Apache目录下的ApacheMonitor来控制Apache
此时访问服务器的地址可以看到It works的页面
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030126.png)
这里安装到了C:/php5 目录下,使用php5.5
之后需要打开Apache目录下的conf/httpd.comf 在最后加上一些代码
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030108.png)
注意这里的文件路径要与实际的文件路径相同
接下来要测试php是否已经配置正确
在apache目录的htdocs文件夹下创建一个txt
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030151.png)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030200.png)
然后改名成test.php
用浏览器访问这个test.php
如果显示php的信息页面,说明php已经完成了配置
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030353.png)
一直next,除了图片上是需要修改的
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030515.png)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030621.png)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030645.png)
安装文件执行完成后,在bin目录打开命令行
输入
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030734.png)
输入
可以显示现有的数据库
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030755.png)
然后创建一个数据库以供wordpress使用
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030857.png)
这里用的是4.4版本
打开wp-config-sample.php,填入数据库信息
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030923.png)
然后重命名为wp-config
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031007.png)
将Wordpress目录中的文件复制到htdocs文件夹中(或者修改Apache的默认启动文件夹)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031029.png)
之后修改php目录下的php.ini-production
如下
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031131.png)
重启Aoache。
访问服务器地址,即可进行wordpress的安装
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031200.png)
安装很快完成
至此,Wordpress安装成功!
新的博客:Scarb’s Blog
使用学生价租了阿里云的服务器,使用了windows server 2012 R2(R2 版本才有开始菜单),在上面搭建了wordpress博客,并且配置wpcmd管理我的博客。
接下来我将记录一下建立博客的过程,当时录了视频,现在用视频里面的截图配合讲解。有些地方已经遗忘了………………
配置Apache24
配置php
配置MySQL
配置Wordpress
配置Apache2.4
首先下载apache2.4,是一个压缩包,我解压到C盘目录下。在bin下进入命令行,输入
httpd -k install
即可安装Apache2.4
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030025.png)
用记事本打开conf/httpd.conf
如下修改,将index.php作为默认的DirectoryIndex
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030824.png)
然后可以使用Apache目录下的ApacheMonitor来控制Apache
此时访问服务器的地址可以看到It works的页面
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030126.png)
配置php
下载php并且安装这里安装到了C:/php5 目录下,使用php5.5
之后需要打开Apache目录下的conf/httpd.comf 在最后加上一些代码
PHPIniDir "C:/php5" LoadModule php5_module "C:/php5/php5apache2_4.dll" AddType Application/x-httpd-php .php
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030108.png)
注意这里的文件路径要与实际的文件路径相同
接下来要测试php是否已经配置正确
在apache目录的htdocs文件夹下创建一个txt
<?php phpinfo(); ?>
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030151.png)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030200.png)
然后改名成test.php
用浏览器访问这个test.php
如果显示php的信息页面,说明php已经完成了配置
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030353.png)
配置MySQL
下载MySQL的安装文件并且安装,这里用的是5.5版本一直next,除了图片上是需要修改的
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030515.png)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030621.png)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030645.png)
安装文件执行完成后,在bin目录打开命令行
输入
mysql -u root -p
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030734.png)
输入
show databases;
可以显示现有的数据库
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030755.png)
然后创建一个数据库以供wordpress使用
create database wordpress_db
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030857.png)
配置Wordpress
下载并且解压Wordpress,这里用的是4.4版本
打开wp-config-sample.php,填入数据库信息
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_030923.png)
然后重命名为wp-config
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031007.png)
将Wordpress目录中的文件复制到htdocs文件夹中(或者修改Apache的默认启动文件夹)
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031029.png)
之后修改php目录下的php.ini-production
如下
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031131.png)
重启Aoache。
访问服务器地址,即可进行wordpress的安装
![](http://114.215.140.250/wp-content/uploads/2016/02/2016-02-01_031200.png)
安装很快完成
至此,Wordpress安装成功!
相关文章推荐
- ubuntu14.04:php7+apache2+mysql
- CentOS7—Apache—多个虚拟站点—semodule
- 保证Linux Apache Web服务器安全的10个建议
- 隐藏apache和php的版本信息配置方法
- 隐藏apache和php的版本信息配置方法
- apache 有哪些 开源
- php5.2.17+apache2.2.22安装
- Python+Apache+CGI完全配置 推荐
- 使用Apache Jmeter进行并发压力测试
- apache的相关设置-默认虚拟主机配置文件
- apache三种MPM介绍
- apache的相关设置-给目录或者文件设置用户验证
- Apache Flink初接触
- sybase+php+apache环境搭建
- 编译apache时提示出现缺失apr和apr-util包
- apache动态添加模块
- apache动态编译与静态编译
- Mac OS X 配置Apache
- 使用Apache commons-configuration读取配置文件
- php5.5+apache2.4