CentOS7 yum安装php7.3 7.4
CentOS7默认的yum源中php是5.4版本的,很多程序要求php7.2+了。因为太懒,所以用yum的方式安装。
安装EPEL和 remi 仓库
yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安装完后会发现多了几个仓库文件
ls /etc/yum.repos.d/
多了好几个remi-php54.repo、remi-php70.repo到remi-php74.repo的文件,就是说你可以用指定仓库的方式安装各种php版本,够骚吧。
php73安装
这种方法是可以解决apache解析不了php的问题的。他会自动写到apache的配置目录去,/etc/httpd/conf.modules.d/15-php.conf、/etc/httpd/conf.d/php.conf这俩文件有奇效。
搞起搞起,之前有的话先卸载掉 yum remove php*
使用指定的 remi-php73仓库安装 yum –enablerepo=remi-php73 install php
安装模块:模块名就不要带这php73了,因为已经指定了仓库。
yum --enablerepo=remi-php73 install php-xml php-zip php-mysql php-mod php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt
这里写了几个常用的,其他模块自己加,当然想装7.4或者其他版本,更换 –enablerepo=remi-php74 这个参数就好了。
如果网站用apache,要开启https的话,装一下ssl模块。yum install mod_ssl
php -v #查看PHP版本
php -m #查看已安装的模块
评论列表
匿名
buy generic cyclobenzaprine - <a href="https://rpropranolol.com/">buy inderal 10mg generic</a> order inderal online
2022-06-25 09:44:01
匿名
accutane ca - <a href="https://risotretinoin.com/">isotretinoin online order</a> buy tetracycline 500mg sale
2022-06-23 15:45:10
匿名
purchase provigil online - <a href="https://rbudesonide.com/">budesonide price</a> budesonide pills
2022-06-22 00:20:28
匿名
viagra order - <a href="https://rtadalafil.store/">order cialis 5mg online cheap</a> buy cialis 5mg sale
2022-06-20 13:01:23
匿名
order cenforce 100mg pills - <a href="https://xrosuvastatin.com/">buy rosuvastatin 10mg for sale</a> motilium sale
2022-06-19 03:11:07