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 #查看已安装的模块
评论列表
匿名
stromectol 15 mg <a href="https://buystmpi.com/">purchase stromectol sale</a> order deltasone 5mg online
2023-03-18 17:29:08
匿名
fildena brand <a href="https://proponline.sbs/">propecia 5mg sale</a> buy finasteride online
2023-03-17 11:26:59
匿名
order isotretinoin sale <a href="https://buyacaneonline.top/">isotretinoin online buy</a> ampicillin 250mg us
2023-03-16 16:48:22
匿名
prednisone 40mg without prescription <a href="https://isotretin.store/">oral accutane 20mg</a> order amoxicillin 500mg pills
2023-03-15 10:50:07
匿名
clomiphene order online <a href="https://clophenonline.store/">order clomiphene for sale</a> order generic prednisolone 40mg
2023-03-14 19:49:30