收藏 分销(赏)

WAMP 动态网站搭建.pdf

上传人:曲**** 文档编号:254730 上传时间:2023-05-19 格式:PDF 页数:24 大小:1.76MB
下载 相关 举报
WAMP 动态网站搭建.pdf_第1页
第1页 / 共24页
WAMP 动态网站搭建.pdf_第2页
第2页 / 共24页
点击查看更多>>
资源描述
WAMP动态网站搭建 用户上网原理用户在浏览器输入网址,发送到DNS服务器解析并返回ip地址O 0国科学技术大学 二 _二_今 G O www.ustdECTIRO www.ustc.edu.crQ www.ustc-Google 搜索 www.wrighteagle.org-Multi-Agent Systems Lab.USTCO Web服务器是一种处理客户端发来的请求并返回内容的软件 Apache IIS NginxMicrosoftApache66666666600000000000000000000000 IIIITTIZTZZZZZCINZ(J(XJZ(XJZ(XJZZ(MZCJ7Z(JZ OCOCOCOCOCOCOCQCOCOCOCOCOCOCC COC DZilJ3LDLDiDDD3iDZiLiZLZ5iLiDiDDiD3LiDDa.Da.D O-Q-Q-Q-Q-Q-Q-Q-O-O-O-O-Q-QQ(图2)1995年12月-2012年3月全球web服务器市场份额2012年2月、2012年3月全球主流Web务器份颔开发者2012年2月百分比2012年3月百分比变化Apache397.867,08964 92%420.337.13965 24%0.32Microsoft88.210.99514.39%88.971.97313.81%-0 5SNginx60.627.2009 89%65,369.14910 15%0 25Google19 394.1963 16%21.150.9383 28%0.12来源:Netcraft 数据整理:IDC 评述砥()什么是网络数据库按照数据结构存储网站数据的系统关系型数据库:Mysql SqlServer Oracle,DB2非关系型数据库(nosql,key-value)HBase() Cassandra() Redis() Google File System什么是Web开发语言 PHP是一种HTML内嵌式的语言,脚本语言 其他开发语言 Perl,Python ASP JSP其它架构 Windows Server+IIS+SqIServer+ASP/ASP.NET Hibernate+Struts+JSP安装配置AMP安装Apache,Mysql,PHP配置 Apache酉己置Mysql酉己置PHP安装AMP PHP版本:php-5.3.5-Win32-VC6-x86 o vc6是为apache相关软件编译的,vc9版本是为iis编译的卜载地址Mysql版本:mysql-essential-5.5.15-win32,即 MySQL Community Server 5.1.45,卜载施址Apache版本:httpd-2.2.4-win32-x86-openssl-0.9.8m-r2,openssl表示带 看openssl模块,利用openssl可给Apache配置SSL安全链接。卜载疝址安装Apache安装Mysql,PHP Mysql安装比较简单,下载后根据提示一路安装。安装php只要把下载的代码包解压,并放在相关目录。:ent Places includesPEAR ries php_redis-213-53-vc6-ts-4cuments 画 go-pear.batPHP环境配置打开php.ini修改配置L下图表示指定PHP扩展包的具体目录,以便调用相应的DLL文件。;On windows:;extension dir=ext;On windows:extension_dir=F:Program FilesPHPext2.由于默认PHP并不支持自动连接Mysql,需开启相应的扩展库功能,比如php_mysql.dll等,将extension之前的分号去掉ex tension=ph p_c url.dl1ex tension=ph p_gd2.dl 1ex tensi on=ph p_mbstri ng.dl1ex tensi on=ph p_mysql.dl1ex tensi on=ph p_pdo_mysql.dl1 ex tension=ph p_pdo_odbc.dl 1ex tension=ph p_x ml rpc.dl 1PHP环境配置3.酉己置php session在使用session功能之前,必须现在win7系统里建立一个可读可写的目 录文件,此目录最好独立于web目录session.save_path D:/phpsessiontmp,|4.配置php文件的上传功能;http:/ upload_tmp_dir-D:phpfileupload*5.修改 date,timezone;xiuup:/pup.ne c/uaut;.cxhlczcjiic date.timezone=Asia/ShanghaiApache环境配置 在apache安装 目 录下打开confhttpd.conf1.在#LoadModule vhost_alias_module modules/mod_vhost_aas.so下添力口#LoadModul e vh ost_a1ias_modul e modul es/mod_vh ost_al ias.so LoadModul e ph p5_modul e nF:/Program Fil es/PHP/ph p5apac h e2_2.dl l PHPIniDir F:/Program Fil es/PHPnAddType appl ic ation/x-h ttpd-ph p.ph p.h tml.h tm2.默认Apache服务器执行WEB主程序的目录为Apache2.2/htdocs,所以当 你的WEB主程序目录变更时,我们需要修改相应的Apache配置#DocximentRoot:The directory out of which you will serve your#documents.By default,all requests are taken from this directory,but#symbolic links and aliases may be used to point to other locations.DocumentRoot D:/PHPWebDirectory nD:/PHPWeb#Possible values for the Op1#or any combination of:#Indexes Includes Follows:Apache环境配置3最后修改具体的index文件先后顺序,由于配置了PHP功能,当然需要 index.php优先执行4Direc toryIndex index.ph p index.h tml#4、重启Apache服务器至此,在Apache服务器上PHP环境配置工作就完成了,你只需要在 D:/PHPWeb目录下新建一个PHP文件,写入。ph pi nfo();?然后在游览器中输入http:localhost,就可以看到PHP的具体配置页面了,代表在Window 7上PHP环境配置工作就算完成了。Mysql酉己点击开始菜单下Mysql Server5.l菜单中的Mysql Server Instance Config Wizard,完成Mysql的配置向导。MySQL Server Instance Configuration WizardWelcome to the MySQL Server InstanceConfiguration Wizard 1.0.17.0The Configuration Wizard will allow you to configure the MySQL Server 5.5 server instance.To Continue,click Next.Next CancelMysql酉己置Mysql酉己置MySQL Server Instance Configuration WizardMySQL Server Instance ConfigurationConfigure the MySQL Server 5.5 server instance.Please select the database usage.(NultJufictional DatabaseGeneral purpose databases.This will optimize the server for the use of the fast transactional InnoDB storage engine and the high speed MylSAM storage engine.Transactional Database Only Optimized for application servers and transactional web applications.This will make InnoDB the main storage engine.Note that the MylSAM engine can still be used.C Non-Transactknal Database OnlySuited for simple web applications,monitoring or logging applications as well as analysis programs.Only the non-transactional MylSAM storage engine will be activated.|CancelMysql酉己置MySQL Server Instance Configuration WizardMySQL Server Instance ConfigurationConfigure the MySQL Server 5.5 server instance.Please set the approximate number of concurrent connections to the server.0 Decision Support(DSS)/OLAPSelect this option for database applications that will not require a high number of concurrent connections.A number of 20 connections will be assumed.C Online Transaction Processing(OLTP)Choose this option for highly concurrent applications that may have at any one time up to 500 active connections such as heavily loaded web servers.Manual Setting;Please enter the approximate number of concurrentConcurrent connections:3CancelMysql酉己置MySQL Server Instance Configuration Wizard SSb._MySQL Server Instance ConfigurationConfigure the MySQL Server 5.5 server instance.Please set the networking options.q Enable TCP/IP NetworkingEnable this to allow TCP/IP connections.When disabled,only local connections through named pipes are allowed.Port Number:卜制团 厂 Add firewall exception for this portPlease set the server SQL mode.Enable Strict ModeThis option forces the server to behave more like a traditional database server.It is recommended to enable this option.CancelMysql酉己置Mysql酉己置MySQL Server Instance Configuration WizardMySQL Server Instance ConfigurationConfigure the MySQL Server 5.5 server instance.Please set the Windows options.匠 Install As Windows ServiceThis is the recommended way to run the MySQL server on Windows.Service Name:p Launch the MySQL Setver automatically一Include Bin Directory in Windows PATHMySgCheck this option to include the dirertory containing the server/client executables in the Windows PATH variable so they can be called from the command line.CancelMysql酉己置Mysql酉己置Mysql酉己置至此Mysql数据库的配置就算完成了,为了验证PHP是否能连接Mysql,你可以在index,php中创建如下代码 谢谢!
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 学术论文 > 社科论文

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服