设为首页 收藏本站
查看: 868|回复: 0

Windows下LAMP环境搭建 .

[复制链接]

尚未签到

发表于 2015-11-15 13:38:37 | 显示全部楼层 |阅读模式
  
  ++++++++++++++++++++++++++++++++++++++++++++++
Windows下LAMP环境搭建
++++++++++++++++++++++++++++++++++++++++++++++
操作系统    : [windows xp professional sp3]
服务器     : [apache-2.2.8]
PHP      : [php-5.2.17]
数据库     : [mysql-5.1.49]
数据库管理工具 : [phpmyadmin-3.3]
++++++++++++++++++++++++++++++++++++++++++++++
准备安装软件(download)
1> [apache_2.2.8-win32-x86-openssl-0.9.8g]
      
http://archive.apache.org/dist/httpd/binaries/win32/apache_2.2.8-win32-x86-openssl-0.9.8g.msi
2> [php-5.2.17-Win32-VC6-x86]
      
http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip
3> [mysql-5.1.49]
      
http://www.mysql.com/downloads/mirror.php?id=398365(需注册)
4> [phpMyAdmin-3.3.9-all-languages]
      
http://sourceforge.net/projects/phpmyadmin/files%2FphpMyAdmin%2F3.3.9%2FphpMyAdmin-3.3.9-all-languages.zip/download#!md5!3d5ec3d2023946bbca9c4dd182722c8b
++++++++++++++++++++++++++++++++++++++++++++++
开始安装(安装前建立目录[D:/lamp])
D:/lamp
--apache2.2
--php
--mysql
--sites
----------------------------------------------------------------------------
1>  【apache】
----------------------------------------------------------------------------
1.1> Welcome to the Installation Wizard for Apache HTTP Server 2.2.8
   #单击[Next>]
1.2> License Agreement
   #选择(I accept the terms in the license agreement)->单击[Next>]
1.3> Read This First
   #单击[Next>]
1.4> Server Information
   Network Domain(e.g.somenet.com): [helloworld.com]
   Server Name(e.g.www.somenet.com): [www.helloworld.com]
   Administrator's Email Address(
e.g.webmaster@somenet.com): [helloworld@helloworld.com]
   #选择(for All Users, on Port 80, as a Service  -- Recommended.), 单击[Next>]
1.5> Setup Type
   #选择(Custom), 单击[Next>]
1.5> Custom Setup
   单击[Change...],
  1.5.1>  Change Current Destination Folder
    Folder name: [D:/lamp/apache2.2/], 单击[OK],
   #单击[Next>]
1.6> Ready to Install the Program
   #单击[Install]
1.7> Installaction Wizard Completed
   #单击[Finish]  
----------------------------------------------------------------------------   
2> 【php】
2.1> 将php-5.2.17-Win32-VC6-x86.zip解压到[D:/lamp/php]
----------------------------------------------------------------------------
3> 【mysql】
3.1> Welcome o the Setup Wizard for MySQL Server 5.1
   #单击[Next>]
3.2> Setup Type
   #选择Custom, 单击[Next>]
3.3> Custom Setup
  3.3.1> 单击[Change...],
  3.3.2>  Change Current Destination Folder
    Folder name: [D:/lamp/mysql/]
    单击[OK]
   #单击[Next>]
3.4> Ready to Install the Program
   #单击[Install]
3.5> A MySQL Enterprise subscription is the most...
      #单击[Next>]
3.6> The MySQL Enterprise Monitor Service
   #单击[Next>]
3.7> Wizard Completed
   #勾选[Configure the MySQL Server now]
   #单击[Finish]
3.8> Welcome to the MySQL Service Instance Configuration Wizard 1.0.17.0
   #单击[Next>]
3.9> MySQL服务器实例配置[MySQL Server Instance Configuration]
   Detailed Configuration-详细配置
   Standard Configuration-标准配置
   #选择默认[Detailed Configuration]
   #单击[Next>]  
  3.9.1> 服务器类型[Please select a server type. This will influence memory, disk and CPU usage.]
    [Developer Machine]-开发服务器, 占用内存较少
    [Server Machine]-多个服务器共用, 占用内存中等
    [Dedicated MySQL Server Machine]-专用服务器, 占用内存较多
    #选择默认[Developer Machine]
    #单击[Next>]
  3.9.2>  数据库用途[Please select the database usage]
    [Multifunctional Database]-多功能数据库,优化InnoDB,MyISAM
    [Transactional Database Only]-事务数据库,优化InnoDB,MyISAM也可用
    [Non-Transactional database Only]-非事务性数据库,适用于简单的网络监控或记录的应用发有分析仅非事务的MyISAM引擎
    #选择默认[Multifunctional Database]
    #单击[Next>]   
  3.9.3>  InnoDB的数据文件的存放位置[Please select the driver for the InnoDB datafile, if you do not want to use the default settings]s
    #选择默认
    #单击[Next>]
  3.9.4>  设置并发连接到服务器的大致数量[Please set the approximate number of concurrent connections to the server]
    [Decision Support(DSS)/OLAP]-并发数20
    [Online Transaction Processing(OLTP)]-并发数500
    [Manual Setting]-并发数自定义
    #选择[Manual Setting], Concurrent connections[100]
    #单击[Next>]
  3.9.5>  [网络选项]Please set the networking options
    [Enable TCP/IP Networking]-启用TCP/IP网络
    [PortNumber:[3306]]-端口
    [Add firewall exception for this port]-添加到防火墙例外
    [Enable Strict Mode]-启用严格模式
    #选择默认[Next>]
  3.9.6>  [选择字符集]Please select the default character set.
    [Standard Character set]-默认Latine 适用于英文或其它西欧语言
    [Best Support For Multilingualism]-支持多种语言
    [Manual Selected Default Character Set/Collation]-自定义
    #选择[Best Support For Multilinguatilsm]
    #单击[Next>]
  3.9.7>  设置Windows选项[Please set the Windows options]
    [Install As Windows Service[安装为windows服务]
    [Launch the MySQL Server automatically[自启动]
    [Include Bin Directory in Windows PATH[加入环境变量]
    #选择默认
    #单击[Next>]
  3.9.8>  设置安全选项[Please set the security options]
    [Current root password]-旧密码,留空
    [New root password]-新密码,
    [Confirm]-确认新密码
    [Enable root access from remote machines]-启用root帐号远程访问
    [Create An Anonymous Account]-创建匿名帐号
    #输入密码和确认密码, 其它默认
    #单击[Next>]
  3.9.9> 准备执行[Ready to execute...]
    #单击[Execute]
  3.9.10> Processing configureation...
    #单击[Finish]
----------------------------------------------------------------------------   
4> 【phpMyAdmin】
4.1> 将phpMyAdmin-3.3.9-all-languages.zip解压到[D:/lamp/sites/phpmyadmin/]
----------------------------------------------------------------------------

  ++++++++++++++++++++++++++++++++++++++++++++++
【apache配置】
5.1> httpd.conf(D:/lamp/apache2.2/conf)
  5.1.1>  #功能: 加载php模块
    #说明: 搜索LoadModule, 在其后面添加
    LoadModule  php5_module "D:/lamp/php/php5apache2_2.dll"
  
  5.1.2> #功能: 设置工作目录
    #说明: 搜索DocumentRoot, 修改为
    DocumentRoot "D:/lamp/sites"
   
  5.1.3> #功能: 设置目录选项
    #说明: 搜索<Directory &quot;D:/lamp/apache2.2/htdocs&quot;>, 修改为
    <Directory &quot;D:/lamp/sites&quot;>

    5.1.4> #功能: 设置默认文档
    #说明: 搜索<Directory />, 添加
    DirectoryIndex index.php index.html

    5.1.5>  #功能: 增加php类型
         #说明: 在文件末尾加入
       AddType application/x-httpd-php .html .php

         #功能: php.ini所在目录
       #说明: 在文件末尾加入
       PHPIniDir &quot;D:/lamp/php&quot;
      
       功能: 不允许访问目录
    说明: 搜索Options Indexes FollowSymLinks项,并注释
       #Options Indexes FollowSymLinks

   5.2> 注意: 修改配置文件后, 重启apache才能生效
   5.3> 在D:/lamp/sites/建立文件
     #phpinfo.php
     输入内容:
     <?php
    phpinfo();
     ?>
     访问:http://localhost/phpinfo.php
      
【php配置】
6.1> php.ini
  6.1.1> D:/lamp/php/php.ini, 复制php.ini-recommended并重命名为php.ini
  6.1.2> #功能: 指定扩展库所在目录
    extension_dir = &quot;D:/lamp/php/ext/&quot;

      #功能: 开启扩展
    #说明: 根据需要开启相应扩展模块, 去掉前面的分号
    extension=php_gd2.dll
    extension=php_mbstring.dll
    extension=php_mcrypt.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll

        #功能: 设置时区
      #说明: PRC表示中国
      date.timezone = PRC
      
      #功能: 显示错误信息
      display_errors = On
6.2> 复制libmysql.dll, libmcrypt.dll(D:/lamp/php)到C:/WINDOWS/system32/
6.3> 重启apache,访问
http://localhost/phpinfo.php,查看相应扩展是否加载成功
&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-139527-1-1.html 上篇帖子: Centos上搭建LAMP环境 下篇帖子: centos6.5下搭建LAMP环境
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表