码迷,mamicode.com
首页 > 数据库 > 详细

命令行cmd安装apache+php+mysql

时间:2015-04-23 17:57:51      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:文件夹   电脑   而且   

   有时候,我们在安装apache+php+mysql时,为了方便,就将已经在其他电脑上安装好环境后的对应文件夹(apache+php+mysql)拷贝到目标电脑上,这个时候一定要注意不仅要修改apache/conf/httpd.conf文件,而且要修改php/php.ini文件


   我以 D:/haofeng/Apache2.2,D:/haofeng/PHP5.2.11为例加以说明:

   1、httpd.conf文件修改:

ServerRoot "D:/haofeng/Apache2.2"

Listen 80

DocumentRoot "D:/haofeng/Apache2.2/www"
<Directory "D:/haofeng/Apache2.2/www">
</Directory>

ScriptAlias /cgi-bin/ "D:/haofeng/Apache2.2/cgi-bin/"
<Directory "D:/haofeng/Apache2.2/cgi-bin">
</Directory>

PHPIniDir "D:/haofeng/PHP5.2.11/"
LoadModule php5_module "D:/haofeng/PHP5.2.11/php5apache2_2.dll"



    2、php.ini文件修改

extension_dir ="D:/haofeng/PHP5.2.11/ext"


最后该配虚拟目录的配虚拟目录,该配置其他端口的配置其他端口;


再贴上cmd安装apache和mysql的命令

=====apache:
D:\haofeng\Apache2.2\bin  
httpd -k install     安装
httpd -k start       启动
httpd -k stop        停止
httpd -k uninstall   卸载

=====mysql:
D:\haofeng\MySQL-5.1.68\bin
mysqld -install    安装
net start mysql    启动
net stop mysql     停止
mysqld -remove     卸载


本文出自 “dongdongのhome” 博客,请务必保留此出处http://autophp.blog.51cto.com/8062337/1637604

命令行cmd安装apache+php+mysql

标签:文件夹   电脑   而且   

原文地址:http://autophp.blog.51cto.com/8062337/1637604

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!