Win2008 R2 IIS7.5+PHP5(FastCGI)+MySQL5环境搭建教程_MySQL
准备篇
一、环境说明:
操作系统:Windows Server 2008 R2
PHP版本:php 5.4.4
MySQL版本:MySQL5.5.25
二、相关软件下载:
1、PHP下载地址:
http://windows.php.net/downloads/releases/php-5.4.4-nts-Win32-VC9-x86.zip
2、MySQL下载地址:
http://gd.tuwien.ac.at/db/mysql/Downloads/MySQLInstaller/mysql-installer-5.5.25.0.msi
3、PHP加速软件ZendGuard下载地址:
http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-Windows.zip
4、Microsoft .NET Framework 4(独立安装程序)下载地址:
http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe
5、Microsoft Visual C++ 2010 可再发行组件包 (x64)下载地址:
http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe
6、Microsoft Visual C++ 2008 Redistributable Package (x86)下载地址:
http://download.microsoft.com/download/7/5/0/7502f4e9-1f90-4895-9259-1bde67b8b9a1/vcredist_x86.exe
安装篇
一、安装IIS7.5
开始-管理工具-服务器管理器
选择“角色”点右边的添加角色
下一步
选择“Web服务器(IIS)”,下一步
下一步
确保“CGI”被选中,其他的角色服务可根据自己的需要勾选
这里全部勾选
下一步
安装
正在安装
关闭,在浏览器里面打开http://localhost/
出现下面的界面
IIS7.5安装完成
二、安装Microsoft Visual C++ 2010 可再发行组件包 (x64)
双击打开vcredist_x64.exe
选中“我已阅读并接受许可条款”,点安装
正在安装
完成
三、安装Microsoft .NET Framework 4(独立安装程序)
双击dotNetFx40_Full_x86_x64.exe
选中“我已阅读并接受许可条款”,点安装
正在安装
点完成,安装完毕。
四、安装MySQL
双击打开mysql-installer-5.5.25.0
选择第一项Install MySQL Products(安装MySQL)
选中“I accept the license terms”(我接受许可条款),点Next
选中“Skip the check for update (not recommended)”(跳过检查更新),点Next
选中“Custom”(自定义安装),Installation Path(安装路径):D:/Program Files/MySQL
Next
确保“MySQL Server5.5.25”被选中,点Next(其他的组件可以选择安装)
这里全部选中,安装所有组件
Execute (执行)
选中“我已阅读并接受许可条款”
点安装
完成
Next
Execute (执行)
Next
Next
Developer Machine(开发服务器)
Server Machine(普通服务器)
Dedicated Machine(专用服务器)
这里选择第二项: Server Machine(普通服务器)
点Next
勾选“Enable TCP/IP Networking”(开启TCP网络端口)
Port Number(端口):3306
勾选“Create Windows Service”(创建Windows系统服务)
Windows Server Name(Windows服务名):MySQL55
MySQL Root password:输入密码
Repeat Password:重复输入密码
设置好之后,点Next
Next
Next
点Finish(完成)
关闭此窗口
打开MySQL安装路径
D:/Program Files/MySQL/MySQL Server 5.5
复制my-huge.ini为my.ini
备份my-huge.ini为my-huge.ini_bak
开始-所有程序-MySQL-MySQL Server 5.5- Mysql Command Line Client
输入安装时候的MySQL root账号密码,回车
登录成功,MySQL安装完成。
五、安装Microsoft Visual C++ 2008 Redistributable Package (x86)
双击打开vcredist_x86.exe
下一步
勾选“我已阅读并接受许可条款”
点安装
完成
六、安装PHP
解压php-5.4.4-nts-Win32-VC9-x86.zip文件
重命名文件夹为php,把php文件夹拷贝到D盘根目录
解压ZendGuardLoader-php-5.3-Windows.zip
打开
D:/soft/ZendGuardLoader-php-5.3-Windows/ZendGuardLoader-php-5.3-Windows/php-5.3.x
把里面的ZendLoader.dll文件拷贝到D:/php/ext目录中
打开D:/php
复制php.ini-development为php.ini
用记事本打开php.ini
做如下修改:
extension_dir = "D:/php/ext" #设置php模块路径
date.timezone = PRC #设置时区为中国时区
register_globals = On #开启GET数据调用
short_open_tag = On #php支持短标签
cgi.force_redirect = 0 #开启以CGI方式运行php
fastcgi.impersonate = 1;
cgi.rfc2616_headers = 1
以下php扩展模块,根据需要选择开启,取消前面的分号为开始相应扩展模块
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_sockets.dll
extension=php_xmlrpc.dll
extension=php_pdo_mysql.dll
在最后一行添加以下代码
[ZendGuardLoader]
zend_loader.enable=1
zend_loader.disable_licensing=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
zend_extension="D:/php/ext/ZendLoader.dll"
最后,保存退出
七、配置IIS支持PHP
开始-管理工具- Internet 信息服务(IIS)管理器
双击左边“起始页”下面的计算机名称
找到中间的IIS部分,打开“处理程序映射”
点右边的“添加模块映射”
请求路径:*.php
模块:FastCgiModule
可执行文件(可选):D:/php/php-cgi.exe
名称:FastCGI
最后,确定
点“是”
双击左边“起始页”下面的计算机名称
找到中间的IIS部分,打开“FastCGI设置”
右键选中:D:/php/php-cgi.exe然后选择编辑
监视对文件所做的更改:D:/php/php.ini
环境变量,点旁边的安装
点“添加”

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values and pointers to data rows, and is suitable for non-primary key column queries.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.
