介绍
小编给大家分享一下CentOS7怎么使用yum安装PHP7.3,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获、下面让我们一起去了解一下吧!
CentOS 7百胜安装PHP7.3教程
1,首先安装EPEL源:
yum install epel-release
安装雷米源:
yum install http://rpms.remirepo.net/enterprise/remi -释放- 7. - rpm
2,安装百胜源管理工具:
yum install yum-utils
3,安装PHP7.3:
yum install -y php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-pecl-geoip php73-php-recode php73-php-snmp php73-php-soap php73-php-xmll
安装完成后最好重启一下计算机,不然有可能无法启动php
设置开机启动,运行服务:
systemctl enable php73-php-fpm systemctl start  php73-php-fpm
设置PHP
查找安装包:
(root@xxx 等等)#,rpm -qa |, grep & # 39; PHP # 39; php73 - PHP cli 7.3.6 el7.remi.x86_64——1. php73 php - mbstring 7.3.6 el7.remi.x86_64——1. php73 - php - pecl - 1.0.2 mcrypt - - 1. el7.remi.x86_64 php73 -运行- 2.0 - 1. - el7.remi.x86_64 php73 php - pdo 7.3.6 el7.remi.x86_64——1. php73 php - bcmath 7.3.6 el7.remi.x86_64——1. php73 - php - fpm - 7.3.6 el7.remi.x86_64——1. php73 php - mysqlnd 7.3.6 el7.remi.x86_64——1. php73 php - snmp 7.3.6 el7.remi.x86_64——1. php73 - php - gd - 7.3.6 el7.remi.x86_64——1. php73 - php - json - 7.3.6 el7.remi.x86_64——1. php73 - php - soap - 7.3.6 el7.remi.x86_64——1. php73 php -重新编码7.3.6 el7.remi.x86_64——1. php73 - php pecl -加密0.3.1 el7.remi.x86_64——5. php73 - php -通用- 7.3.6 el7.remi.x86_64——1. php73 php - opcache 7.3.6 el7.remi.x86_64——1. php73 - php - pecl - geoip - 1.1.1 - 6. - el7.remi.x86_64
找到:php73 - php - fpm - 7.3.6 el7.remi——1.。x86_64安装位置
(root@xxx 等等)#,rpm -ql php73 - php - fpm - 7.3.6 el7.remi.x86_64——1./etc/logrotate.d/php73-php-fpm/etc/opt/remi/php73/php-fpm.conf/etc/opt/remi/php73/php-fpm.d/etc/opt/remi/php73/php-fpm.d/www.conf/etc/opt/remi/php73/sysconfig/php-fpm/etc/systemd/system/php73-php-fpm.service.d/opt/雷米/php73/根/usr/sbin/php-fpm/opt/雷米/php73/根/usr/share/doc/php73-php-fpm-7.3.6/opt/雷米/php73/根/usr/share/doc/php73-php-fpm-7.3.6/php-fpm.conf.default/opt/雷米/php73/根/usr/share/doc/php73-php-fpm-7.3.6/www.conf.default/opt/雷米/php73/根/usr/share/fpm/opt/雷米/php73/根/usr/share/fpm/status.html/opt/雷米/php73/根/usr/share/许可证/php73-php-fpm-7.3.6/opt/雷米/php73/根/usr/share/许可证/php73-php-fpm-7.3.6/fpm_LICENSE/opt/雷米/php73/根/usr/share/人/man8/php-fpm.8.gz/usr/lib/systemd/system/php73-php-fpm.service/var/opt/remi/php73/lib/php/opcache/var/opt/remi/php73/lib/php/session/var/opt/remi/php73/lib/php/wsdlcache/var/opt/remi/php73/log/php-fpm/var/opt/remi/php73/run/php-fpm
查找php。ini位置:
(root@xxx 等等)#,find /etc/opt/雷米/php73 -name php . ini/etc/opt/雷米/php73/php . ini中
编辑/etc/opt/雷米/php73/php。ini替换换,cgi。fix_pathinfo=1为cgi。fix_pathinfo=0快捷命令:
sed 小姐;& # 39;s/; cgi.fix_pathinfo=1/cgi.fix_pathinfo=0 & # 39;,/etc/opt/雷米/php73/php。ini
重启php73-php-fpm
systemctl restart php73-php-fpm
更多操作:
systemctl restart php73-php-fpm #重启 systemctl start  php73-php-fpm #启动 systemctl stop  php73-php-fpm #关闭 systemctl status  php73-php-fpm #检查状态
查看PHP
验证一下是否安装成功:
root@mf88.biz-service: ~ #, php73 - v PHP 7.3.0-1 + (cli),(建立:Dec , 6, 2018, 20:24:55), (, NTS ) Copyright (c), 1997 - 2018,从而PHP 组 Zend Engine  v3.3.0-dev, Copyright (c), 1998 - 2018, Zend 技术 ,,,with Zend OPcache deb.sury.org v7.3.0-1 + ubuntu18.04.1 + + 1,, Copyright (c), 1999 - 2018年,by Zend 技术CentOS7怎么使用yum安装PHP7.3