ubuntu10.10 搭建LAMP

本文详细介绍如何在Linux环境下安装配置LAMP(Linux, Apache, MySQL, PHP)环境。具体步骤包括安装MySQL数据库服务器、Apache Web服务器及PHP解析器,并通过创建测试文件验证安装成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值