标签:状态 查看 计算 pac 通过 img copy 模块 .com
好久没搭环境了,这次还算顺利。
先来回顾一下网站运行的原理。
OK,进入正题,本次搭建环境wamp版本如下:
Apache24: httpd-2.4.26-x64-vc11
php:php-5.6.30-Win32-VC11-x64
mysql:mysql-installer-community-5.5.56
1.文件夹路径如下:
(因配置文件 httpd.conf中多处默认路径为Apache24,方便起见文件夹名不做改动)
2.Apache安装
3.PHP安装
<?php for($i=1;$i<=10;$i++){ echo "$i"; } ?>
则在cmd模式下会显示
12345678910
*php可独立运行。
4.配置httpd.conf,使Apache可处理php
httpd.exe -M
LoadModule php5_module D:/wamp/php/php5apache2_4.dll PHPIniDir "D:/wamp/php" AddType application/x-httpd-php .php .html .htm
5.配置php.ini,使其可加载其他模块
修改时区 date.timezone=PRC 修改加载模块的路径 extension_dir = "D:/wamp/php/ext" 选择要加载的模块并去掉分号 extension=php_mysql.dll extension=php_mysqli.dll等等
php.exe -M
6.配置虚拟主机
#Virtual hosts Include conf/extra/httpd-vhosts.conf
添加:
<VirtualHost *:80> DocumentRoot "G:/color" ServerName color.com ErrorLog "logs/color.log" CustomLog "logs/color.log" common </VirtualHost>
<Directory /> AllowOverride none # Require all denied </Directory> 缺少这一步,会显示 403 Forbidden
7.安装mysql
C:\>net stop mysql MySQL 服务正在停止. MySQL 服务已成功停止。 C:\>net start mysql MySQL 服务正在启动. MySQL 服务已经成功启动。
C:\>mysql.exe -hlocalhost -uroot -proot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.56 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql>
即表示成功。
至此,环境已经基本搭建完成。
标签:状态 查看 计算 pac 通过 img copy 模块 .com
原文地址:http://www.cnblogs.com/wawj6673579/p/7049774.html