在centOS中搭建LAMP环境(转)

上一篇 / 下一篇  2016-05-19 14:34:18 / 个人分类:Linux

  1. Centos系统下Lamp环境的快速搭建(超详细)
  2. yum安装过程,大概1-2分钟

    Centos系统下Lamp环境的快速搭建(超详细)
    Centos系统下Lamp环境的快速搭建(超详细)
  3. 启动apache服务并查看时候启动成功

    命令如下:(切记用root用户启动服务)

               启动:/etc/rc.d/init.d/httpd start

               检测启动结果:ps aux | grep httpd

    Centos系统下Lamp环境的快速搭建(超详细)
  4. 查看服务器的ip并进入网站根目录新建一个phpinfo.php的程序,用于查看php相关配置信息。

         

    Centos系统下Lamp环境的快速搭建(超详细)
    Centos系统下Lamp环境的快速搭建(超详细)
    Centos系统下Lamp环境的快速搭建(超详细)
  5. 如果上述进展顺利,那我们接下来进行mysql数据库的配置

    命令如下:

                 启动:  /etc/rc.d/init.d/mysqld start

                 检查启动结果:  netstat -tulnp | grep :3306

                  修改root密码: mysqladmin -u root password ‘你想设置的密码’

    Centos系统下Lamp环境的快速搭建(超详细)
  6. 进入mysql数据库,创建demo库和用于测试的person表,并插入测试数据

    Centos系统下Lamp环境的快速搭建(超详细)
    Centos系统下Lamp环境的快速搭建(超详细)
    Centos系统下Lamp环境的快速搭建(超详细)
  7. 最后编写php连接mysql的测试代码,检测mysql是否能正常配合php工作

    Centos系统下Lamp环境的快速搭建(超详细)
    Centos系统下Lamp环境的快速搭建(超详细)


TAG:

 

评分:0

我来说两句

日历

« 2024-05-25  
   1234
567891011
12131415161718
19202122232425
262728293031 

我的存档

数据统计

  • 访问量: 6143
  • 日志数: 8
  • 建立时间: 2016-05-11
  • 更新时间: 2016-05-19

RSS订阅

Open Toolbar