debian下apache2、php5安装配置

1、sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql-server php5-mysql phpmyadmin

可根据需要删减

 

2、配置apache2.conf

 

在最后面加入下面几行:

添加文件类型支持

AddType application/x-httpd-php .php .htm .html

 

3、/etc/init.d/apache2 restart重启

 

4、测试

echo "hello"

?>

 

 

 

windows下的配置是:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

PHPIniDir "D:/Program Files/PHP/"

LoadModule php5_module "D:/Program Files/PHP/php5apache2_2.dll"

#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

 

AddType application/x-httpd-php .php

你可能感兴趣的:(server)