标签:运行 ddb png upload service community 环境 studio 12c
Apache 2.4.25 win64 | MySQL Server 5.7.17 win64 | PHP 7.0 x64 Thread Safe
httpd是Apache HTTP Server(阿帕奇网站服务器)的英文简称。
The Apache HTTP Server ("httpd") was launched in 1995 and it has been the most popular web server on the Internet since April 1996. It has celebrated its 20th birthday as a project in February 2015.
From: http://httpd.apache.org/
The Apache HTTP Server Project本身并未提供软件的二进制发行版,而只提供了源代码。独立的提交者们可能提供了二进制程序包以提供便利,但这些程序包并不是发布的可交付使用的产品。
如果你自己不能编译the Apache HTTP Server,你可以通过互联网,从众多可用的二进制分发(网站)获取二进制程序包。Apache Lounge 为其一。
The Apache HTTP Server Project itself does not provide binary releases of software, only source code. Individual committers may provide binary packages as a convenience, but it is not a release deliverable.
If you cannot compile the Apache HTTP Server yourself, you can obtain a binary package from numerous binary distributions available on the Internet.
From: http://httpd.apache.org/docs/current/platform/windows.html#down
Apache 2.4 VC14 Windows Binaries and Modules利用VC14构建,需要安装Microsoft Visual C++ 2015 Redistributable Update 3(vc_redist_x64/86.exe)。
Windows? Visual Studio C++ 2015 亦称 VC14。
Apache 2.4 VC14 Windows Binaries不能在Windows XP和Windows 2003上运行,可以在运行在7 SP1, Vista SP2, 8 / 8.1, 10, Server 2008 SP2 / R2 SP1, Server 2012 / R2, Server 2016上。
Build with the latest Windows? Visual Studio C++ 2015 aka VC14.
The binaries below do not run on XP and 2003. Runs on: 7 SP1, Vista SP2, 8 / 8.1, 10, Server 2008 SP2 / R2 SP1, Server 2012 / R2, Server 2016.
Be sure that you have installed the latest C++ Redistributable Visual Studio 2015 : vc_redist_x64/86.exe.
From: https://www.apachelounge.com/download/
MySQL Installer 为所需的MySQL软件提供了一种简便的基于向导的安装体验。
MySQL产品见下。
MySQL Installer provides an easy to use, wizard-based installation experience for all your MySQL software needs. Included in the product are the latest versions of:
MySQL Server
MySQL Connectors
MySQL Workbench and sample models
Sample Databases
MySQL for Excel
MySQL Notifier
MySQL for Visual Studio
Documentation
From: https://dev.mysql.com/downloads/installer/
mysql-installer-web-community是MySQL在线安装工具,mysql-installer-community是离线安装工具。
Choosing the right file:
If you have an online connection while running the MySQL Installer, choose the mysql-installer-web-community file.
If you do NOT have an online connection while running the MySQL Installer, choose the mysql-installer-community file.
From: https://dev.mysql.com/downloads/installer/
虽然MySQL Installer是32位的,但可以安装32位和64位的MySQL文件。
Note: MySQL Installer is 32 bit, but will install both 32 bit and 64 bit binaries.
From: https://dev.mysql.com/downloads/installer/
非线程安全版本适用于IIS,线程安全版本适用于Apache。推荐使用由Apache Lounge提供的Apache构建,apache.org提供的由于VC版本过于老旧而不推荐使用。
IIS
If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.
Apache
Please use the Apache builds provided by Apache Lounge. They provide VC9, VC11 and VC14 builds of Apache for x86 and x64. We use their binaries to build the Apache SAPIs.
If you are using PHP as module with Apache builds from apache.org (not recommended) you need to use the older VC6 versions of PHP compiled with the legacy Visual Studio 6 compiler. Do NOT use VC9+ versions of PHP with the apache.org binaries.
With Apache you have to use the Thread Safe (TS) versions of PHP.
From: http://windows.php.net/download/
用于 Windows 的 PHP 5 的 x64构建是实验性的,并且不提供64位的整合或大文件支持。
PHP 7 提供全整的64位支持。PHP 7 的 x64构建原始的64位整合,LFS(逻辑文件结构/系统),64位的内存限制及更多。
x86_64 Builds
The x64 builds of PHP 5 for Windows are experimental, and do not provide 64-bit integer or large file support.
PHP 7 provides full 64-bit support. The x64 builds of PHP 7 support native 64-bit integers, LFS, 64-bit memory_limit and much more.
From: http://windows.php.net/download/
所需文件总结:
Apache与PHP解压即可,MySQL为图形界面安装。且Apahce与PHP路径有要求。方便起见,建议将三者(即下文的文件夹A、文件夹P和文件夹M)置于同一路径,如下。
称文件夹Apache24为文件夹A,此文件夹可改名,建议不含中文及空格。
控制面板
-所有控制面板项
-管理工具
-服务
,启动MySQL57
c:/Apache24
,替换为C:/AMP_DE/Apache24
。共有6处,分别位于第37、245、246、362、375、378行,其中375为注释,不需替换。其他5处,如行前有#
,应去掉。LoadModule php7_module C:/AMP_DE/php7.0.14/php7apache2_4.dll
PHPIniDir C:/AMP_DE/php7.0.14
php7apacheXXXXX.dll
文件。Alt
并双击,打开文件属性C:\AMP_DE\php7.0.14
和文件名php7apache2_4.dll
,连接成为C:\AMP_DE\php7.0.14\php7apache2_4.dll
,并把/
换为/
,最后得到LoadModule php7_module C:/AMP_DE/php7.0.14/php7apache2_4.dll
。php.ini
的路径。ServerAdmin admin@example.com
改为自己的邮箱地址。#ServerName www.example.com:80
改为ServerName localhost:80
(本地服务器)。DirectoryIndex index.html
改为DirectoryIndex index.php index.htm index.html
。AddType application/x-httpd-php .php .html
C:\AMP_DE\Apache24\bin
httpd.exe -k install -n “localhost”
,安装名为localhost
的Apache服务Errors reported here must be corrected before the service can be started.
该行表示,如果有错误,会在该行下方显示,没有显示则成功安装。httpd.exe -k start -n "localhost"
,启动成功无输出。httpd.exe -k stop -n "localhost"
httpd.exe -k uninstall -n "localhost"
C:\AMP_DE\Apache24\bin
中的ApacheMonitor.exe
来启动/停止Apache
服务。http://localhost
并回车,显示It works!
,表明Apache配置成功。
C:\AMP_DE\php7.0.14
,将php.ini-production
复制一份,并重命名为php.ini
。php.ini
; extension_dir = "ext"
去掉分号;extension=php_gd2.dll
去掉分号;extension=php_mbstring.dll
去掉分 号;extension=php_mysqli.dll
去掉分号;extension=php_pdo_mysql.dll
去掉分号控制面板
-所有控制面板项
-系统
-高级系统设置
-高级
-环境变量
-系统变量
-Path
-编辑
新建
-C:\AMP_DE\php7.0.14
新建
-C:\AMP_DE\php7.0.14\ext
确定
C:\AMP_DE\Apache24\htdocs
)phpinfo.php
文件,文本编辑器打开,输入<?php
phpinfo();
?>
http://localhost/phpinfo.php
MySQL 5.7 Command Line Client
,输入ROOT密码CREATE DATABASE testDB;
USE testDB;
CREATE TABLE test_table (
test_info varchar(30),
test_time datetime
);
C:\AMP_DE\Apache24\htdocs
)testDB.php
文件,文本编辑器打开,输入
<?php
$connection = mysqli_connect(‘localhost‘,‘root‘,‘password‘,‘testDB‘)
or die(‘Error connecting to MySQL server.‘);
$query = "INSERT INTO test_table (".
"test_info,test_time)".
"VALUES (".
"‘It works!‘,NOW())";
$result = mysqli_query($connection,$query)
or die(‘Error querying database.‘);
mysqli_close($connection);
?>
其中的password
改为自己的ROOT账户密码,保存并退出http://localhost/testDB.php
并回车SELECT * FROM test_table;
并回车It works!
及当前时间,表明MySQL与Apache、PHP的连接成功,如下。
Win10 64位 Apache 2.4+MySQL 5.7+PHP 7环境搭建
标签:运行 ddb png upload service community 环境 studio 12c
原文地址:http://www.cnblogs.com/houruikk/p/7638198.html