转 yum 常用命令
|-转 yum安装php7.3,安装zip扩展
yum search php74|grep zip ,这个命令很重要,可以查看系统有的php74版本的安装包
1.安装php:
安装 EPEL 源
yum install epel-release
安装 REMI 源
http://rpms.remirepo.net/enterprise/remi-release-7...
安装 Yum 源管理工具
yum install yum-utils
安装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 start php73-php-fpm
systemctl enable php73-php-fpm
设置 PHP
查找安装包:
rpm -qa | grep 'php'
编辑/etc/opt/remi/php73/php.ini替换换 ;cgi.fix_pathinfo=1 为 cgi.fix_pathinfo=0 快捷命令:
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/opt/remi/php73/php.ini
查看下版本
更多操作:
systemctl restart php73-php-fpm #重启
systemctl start php73-php-fpm #启动
systemctl stop php73-php-fpm #关闭
systemctl status php73-php-fpm #检查状态
查找zip扩展包
yum search php73|grep zip
安装zip扩展包
yum -y install php73-php-pecl-zip.x86_64 ...