码迷,mamicode.com
首页 > 其他好文 > 详细

LAMP

时间:2017-12-26 11:57:28      阅读:109      评论:0      收藏:0      [点我收藏+]

标签:perl   state   system   fail   add   send   str   bsp   gpo   

  a:apache  

  m:mariadb,mysql,

  p:php,perl,python

[root@localhost conf]#yum -y install mysql pgp-mysql mariadb-server php

[root@localhost conf]#rpm -qi mariadb-server

[root@localhost conf]# systemctl start mariadb.service
[root@localhost conf]# ss -tnl
State       Recv-Q Send-Q      Local Address:Port                     Peer Address:Port             
LISTEN      0      50                      *:3306                                *:*                 
LISTEN      0      128                     *:111                                 *:*                 
LISTEN      0      5           192.168.122.1:53                                  *:*                 
LISTEN      0      128                     *:22                                  *:*                 
LISTEN      0      128             127.0.0.1:631                                 *:*                 
LISTEN      0      100             127.0.0.1:25                                  *:*                 
LISTEN      0      128                    :::111                                :::*                 
LISTEN      0      128                    :::8080                               :::*                 
LISTEN      0      128                    :::80                                 :::*                 
LISTEN      0      128                    :::22                                 :::*                 
LISTEN      0      128                   ::1:631                                :::*                 
LISTEN      0      100                   ::1:25                                 :::*                 
[root@localhost conf]# rpm -ql php

[root@localhost conf]#systemctl restart httpd.service

[root@localhost conf]#/vhosts/web1/thdocs/index.php  如果是这样的路径则需要修改配置文件;

  <?php
        phpinfo();
  ?>

----

测试php和mysql通信

<?php
        $link=mysql_connect(‘127.0.0.1‘,‘mysql‘,‘‘);
        if ($link)
                echo "Success";
        else
                echo "Failure";
        mysql_close();
?>      

---------------------------------------------------------------------

搭建wordpress

LAMP

标签:perl   state   system   fail   add   send   str   bsp   gpo   

原文地址:https://www.cnblogs.com/Juvenile/p/8116742.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!