1.install mysql
apt-get install mysql-server mysql-client
While installing, it will promot you to set the password of root user, for example nopasswd, then after it finished, use this instruction to test whether the mysql server is running
netstat -tap | grep mysql
if it display
tcp 0 0 localhost.localdomain:mysql *:* LISTEN -,
it means the mysql server is running, if not,execute
/etc/init.d/mysql restart
to start the mysql.Execute
mysql -u -root -p
it will let you input the password of root user, after input the root user, execute
grant all privileges on *.* to 'xiao'@'%' identified by 'xiaoxiao' with grant option;
to make the changes take effect instantlly,then execute
flush privileges;
to create a user xiao, then execute
create database androidDatabase
then
use androidDatabase
then
create table androidTable(xiao varchar(30), content varchar(30));
then insert into androidTable values("xiao","xiaoxiao");
2.install apache
apt-get install apache2
3.install php
apt-get install php5
3.touch a file named test.php in /tmp/www/ and input <?php echo phpinfo();?>, if it will shows the php version information.
4.touch a file named ConnectDatabase.php, it occurs an error that Call to undefined function mysql_connect(), execute
apt-get install php5-mysql
and
/etc/init.d/apache2 start.
The install is over.
ubuntu10.10 搭建LAMP
本文详细介绍如何在Linux环境下安装配置LAMP(Linux, Apache, MySQL, PHP)环境。具体步骤包括安装MySQL数据库服务器、Apache Web服务器及PHP解析器,并通过创建测试文件验证安装成功。

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



