php 在centos7 apache中的安装配置

来源:互联网 发布:给淘宝买家的祝福语 编辑:程序博客网 时间:2024/05/03 20:35

1.yum 安装 apache 

  yum install http

   systemctl start httpd.service

   yum install mysql-community-server

    yum update

    yum install php

    systemctl list-unit-files

   yum install php-mysql


修改配置

   83  vi /etc/httpd/conf/httpd.conf 


accphe配置,添加AddType application/x-httpd-php .php

DirectoryIndex index.html index.php



然后重启 一下apache 

   systemctl restart httpd.service


http://ip/index.php

index.php 内容

<?php

phpinfo();

?>




0 0