1. 安装Apache 2
sudo apt-get install apache2
测试:
firefox 127.0.0.1

2. 安装PHP
sudo apt-get install php5 //安装PHP5
sudo /etc/init.d/apache2 restart//重启APACHE
测试:首先启用root(如果禁用的话)
sudo passwd root
then enter your password.
then enter your password.
然后切换到root
su root
最后在/var/www/里创建testphp.php
在浏览器中访问:127.0.0.1/testphp.php
3. 安装MySQL
sudo apt-get install mysql-server
安装完成按提示设置root密码
4、让apache、php支持 mysql
sudo apt-get install libapache2-mod-auth-mysql
sudo /etc/init.d/apache2 restart
本文详细介绍如何在Ubuntu系统上安装配置LAMP(Linux, Apache, MySQL, PHP)环境,包括安装Apache2 Web服务器、PHP解析器及MySQL数据库,并实现三者之间的相互支持。
1017

被折叠的 条评论
为什么被折叠?



