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 #查看已安装的模块
评论列表
匿名
nifedipine order online <a href="https://perinril.pro/">order perindopril 4mg generic</a> fexofenadine ca
2023-06-08 04:36:22
匿名
olumiant tablet <a href="https://gatortin.com/">lipitor 10mg brand</a> order atorvastatin 20mg
2023-06-06 22:15:39
匿名
cheap montelukast 10mg <a href="https://amantine.life/">amantadine 100 mg cheap</a> avlosulfon 100mg pill
2023-06-06 06:39:54
匿名
cheap albuterol 100 mcg <a href="https://pantople.life/">protonix online order</a> pyridium pills
2023-06-04 17:03:09
匿名
buy naproxen 250mg for sale <a href="https://buylansole.sbs/">order lansoprazole 15mg generic</a> prevacid ca
2023-06-03 07:53:05