• Apache+PHP+MySQL+phpMyAdmin+WordPress搭建


    一 .安装Apache

    下载地址:http://www.apachelounge.com/download/,选择Apache 2.4.25 Win64,解压缩,修改配置文件中如下地方:

    1.ServerRoot

    Can’t load module之类的就是没配置好ServerRoot.貌似不识别”..”的上一级表示,只能暂时用绝对路径了

    ServerRoot “D:Program FilesApache24”

    2.DocumentRoot

    DocumentRoot “H:wwwroot”,表示网站路径
    <Directory “H:wwwroot”>,配置网站目录的一些属性,上面<Directory />的表示全局配置.

    3.ServerName

    ServerName  www.example.com:80 serverName该为localhost:80,因为自己本地测试用.vps的暂时没考虑

    4.index.php

    <Directory />

    AllowOverride none

    Require all denied

    DirectoryIndex index.php default.php index.html

    </Directory>

    设置默认值主页,也就是127.0.0.1会跳到127.0.0.1/index.php

    二 安装PHP

    1.下载thread safe的版本

    三 安装MySQL

    0.mysqld -remove,mysqld -install

    1. 5.7版本没有data文件夹,运行

    mysqld –initialize-insecure –user=MySQL 生成data文件夹

    2.mysql –uroot -p 登陆,默认用户名root,密码空

    3.show databases;查询数据库,测试是否安装成功

    4.停止并禁用world wide web*名字的服务来停止iis服务,同时让apache和mysql服务自启

    5.添加密码.update mysql.user set authentication_string='10050244' where user='root' and Host = 'localhost';

    四 安装phpMyAdmin

    1.The mbstring extension is missing.

    改php.ini中的extension_dir = “D:Program Filesphp-5.6.30-Win32-VC11-x64ext”,暂时没找到相对路径的改法,

    2.默认phpmyadmin空密码登录是被禁止的,这一行为主要通过配置文件libraries/config.default.php中的两个全局变量控制,即
    $cfg[‘Servers’][$i][‘nopassword’] = false;

    $cfg[‘Servers’][$i][‘AllowNoPassword’] = false;

    设置为true可以使用空密码

    五 安装WordPress

    1.安装插件出现No working transports found,到;extension=php_openssl.dll,把前面 ; 去掉,重启

    2,最大上传xml为2m限制,更改php.ini

    post_max_size=8M     //上传文件大小上限
    upload_max_filesize=2M  //默认上传文件大小,这个就是2M的限制

    六 总结

    1.修改完php和apache的配置,要重启查看效果

    2.可以通过运行apache和php中的exe文件,根据控制台给出的信息找解决方案

    3.可以通过phpinfo中的信息来查看php加载以及各种情况

    4.通过事件查看器查看apache各种错误原因.

  • 相关阅读:
    java之collection总结
    JAVA集合详解(Collection和Map接口)
    Java集合框架(Collection Framework)学习之 Collection与Map概貌
    (二)用less+gulp+requireJs 搭建项目(gulp)
    (一)用less+gulp+requireJs 搭建项目(了解less)
    数组API汇总
    我的vim配置
    Educational Codeforces Round 47 D
    [AHOI2008]上学路线
    [SDOI2016]硬币游戏
  • 原文地址:https://www.cnblogs.com/ptqueen/p/6512671.html
Copyright © 2020-2023  润新知