centos7下安装php

释放双眼,带上耳机,听听看~!

1.安装php

#yum install -y php-common php-devel php php-mysql php-cli  php-mbstring  php-pdo  php-gd php-ldap php-odbc  php-dba  php-bcmath  php-xml php-xmlrpc php-pear php-soap php-tidy php-mhash php-fpm php-pecl-memcache

2.安装apache

#yum -y install httpd httpd-devel

3.测试Apache与PHP交互

#vim /var/www/html/index.php
<?php
echo “hello wprld”;
phpinfo();
?>

4.重启apache服务

#ystemctl restart httpd

5.打开网页(本机地址为192.168.1.2)

links 192.168.1.2
centos7下安装php

显示上面网页则表明php安装成功
配置结束

【转自慕课】https://www.imooc.com

PHP

php扩展模块安装

2022-3-3 1:19:34

PHP

LNMP之PHP安装操作步骤

2022-3-3 1:21:23

搜索