LAMP

Posted juvenile

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LAMP相关的知识,希望对你有一定的参考价值。

  a:apache  

  m:mariadb,mysql

  p:php,perl,python

[[email protected] conf]#yum -y install mysql pgp-mysql mariadb-server php

[[email protected] conf]#rpm -qi mariadb-server

[[email protected] conf]# systemctl start mariadb.service
[[email protected] 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                                 :::*                 
[[email protected] conf]# rpm -ql php

[[email protected] conf]#systemctl restart httpd.service

[[email protected] 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的主要内容,如果未能解决你的问题,请参考以下文章

源码编译构建LAMP

PHP 简介

redat利用yum快速搭建LAMP环境

centos7.4编译安装lamp

在 Ubuntu Server 16.04 LTS 上安装 LAMP

Linux精华篇—CentOS 7.4下源码编译构建LAMP架构