在32位机上,可以使用xampp,只需要解压缩即可以使用,非常方便,下载地址及使用帮助参见官方网站:
http://www.apachefriends.org/en/xampp-linux.html
可是目前xampp不支持64位机,当然如果你是amd64 或者 ia64 Debian系统,可以在64位的机器上安装支持32的包:
sudo apt-get install ia32-libs
就可以在64位机上使用32位的xampp了,可是64位的ubuntu安装这个支持32位的包,是不成功的,会报如下的错误:
The following packages have unmet dependencies:
ia32-libs: Depends: lib32gcc1 but it is not installable
Depends: libc6-i386 (>= 2.3.6-2) but it is not going to be installed
Depends: lib32z1 but it is not installable
Depends: lib32stdc++6 but it is not installable
Depends: lib32asound2 but it is not installable
Depends: lib32bz2-1.0 but it is not going to be installed
Depends: lib32ncurses5 but it is not installable
Depends: lib32v4l-0 but it is not installable
E: Broken packages
不过ubuntu可以有其它的选择,就是通过tasksel进行安装,安装步骤:
1、先安装tasksel:
sudo apt-get install tasksel
2、安装AMP:
sudo tasksel install lamp-server
3、卸载,需要删除以下的包:
apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql 4、apache的配置写到:/etc/apache2/httpd.conf 文件中,不过此时默认安装是不支持rewrite的,要启用rewrite,需要执行:
sudo a2enmod rewrite
详细参见:https://help.ubuntu.com/community/ApacheMySQLPHP
本文出自:冯立彬的博客