cmd 安装php,命令行cmd安装apache+php+mysql

有时候,我们在安装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"

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

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     卸载

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值