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 #查看已安装的模块
评论列表
匿名
tretinoin cream usa <a href="https://buytretinoinp.com/">order tretinoin gel generic</a> order avanafil 200mg without prescription
2023-02-04 23:26:05
匿名
fildena medication <a href="https://ebudesonide.com/">rhinocort price</a> purchase rhinocort
2023-02-03 06:27:34
匿名
brand prednisone 20mg <a href="https://gamebendazole.com/">buy mebendazole 100mg without prescription</a> purchase vermox
2023-02-02 23:19:51
匿名
lasix for sale online <a href="https://edoxycyclinep.com/">doxycycline 200mg sale</a> buy generic plaquenil 200mg
2023-02-01 19:00:35
匿名
real money slots <a href="https://gamodafinil.com/">order provigil 100mg generic</a> provigil 100mg usa
2023-02-01 08:25:59