【本人亲测】Ubuntu快速搭建LAMP开发环境
Tofloor
poster avatar
curay
deepin
2011-08-03 06:12
Author
以下操作均由root用户输入

第一步 命令行输入 apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
第二步 改变www文件夹访问权限 chmod 777 /var/www
第三步 安装phpMyAdmin apt-get install phpmyadmin
第四步 将phpmyadmin与apache2建立连接  ln -s /usr/share/phpmyadmin /var/www
第五步 启用 mod_rewrite 模块  sudo a2enmod rewrite; sudo /etc/init.d/apache2 restart
第六步 设置Apache支持.htm .html .php  gedit /etc/apache2/apache2.conf 在打开的文件中加上 AddType application/x-httpd-php .php .htm .html 即可

注:
解决Firefox浏览器显示中文乱码等问题 测试时,如果出现了中文乱码,则是默认语言设置问题,解决方法如下:
打开apache配置文件: udo gedit /etc/apache2/apache2.conf,在最后面加上:AddDefaultCharset UTF-8,如果还是乱码的,再将UTF-8改用gb2312。
重启Apache:sudo /etc/init.d/apache2 restart  乱码没有了。
Reply Favorite View the author
All Replies
curay
deepin
2011-08-03 06:12
#1
以上仅为简要步骤,详细步骤请见:

http://farlee.info/archives/linux-ubunt ... ation.html
Reply View the author
duzaizhe
deepin
2011-08-03 16:44
#2
直接上XAMPP最快
Reply View the author
s.******fe@gmail.com
deepin
2011-08-04 02:23
#3
没必要。最快的方法如下:
  1. sudo apt-get install tasksel
  2. sudo tasksel
Copy the Code

选中“LAMP 服务器”,按空格选中,然后确认,就可以了。
Reply View the author