#yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
#yum install yum-utils
【源命令】
#yum install -y $phpversion-php-fpm $phpversion-php-cli $phpversion-php-bcmath $phpversion-php-gd $phpversion-php-json $phpversion-php-mbstring $phpversion-php-mcrypt $phpversion-php-mysqlnd $phpversion-php-opcache $phpversion-php-pdo $phpversion-php-pecl-crypto $phpversion-php-pecl-mcrypt $phpversion-php-pecl-geoip $phpversion-php-recode $phpversion-php-snmp $phpversion-php-soap $phpversion-php-xmll
【替换$phpversion为php73】为
#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-xml
安装完成后,编辑 /etc/php/7.3/fpm/php.ini
替换换 ;cgi.fix_pathinfo=1
为 cgi.fix_pathinfo=0
【用VIM编辑或者用下面命令快速编辑】
#sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/opt/remi/php73/php.ini
#systemctl restart php73-php-fpm
#sudo ln -s /opt/remi/php73/root/usr/bin/php /usr/bin/php
#vim ~/.bashrc
【#增加一行环境变量
export PATH=/opt/remi/php73/root/usr/bin:$PATH
】
#source ~/.bashrc
#vim /etc/profile
【export PATH=/opt/remi/php73/root/usr/bin:$PATH】
#php -v
#php73 -v
#systemctl enable php73-php-fpm
systemctl restart php73-php-fpm #重启
systemctl start php73-php-fpm #启动
systemctl stop php73-php-fpm #关闭
systemctl status php73-php-fpm #检查状态
【系统就会更新所有可以更新的软件包括 PHP】
#yum update
#yum search php73
(批量)安装命令:
#yum install {c1} {c2} {C3}...
#yum install php73-php-cli php73-php-common php73-php-devel php73-php-embedded php73-php-fpm php73-php-gd php73-php-mbstring php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-xmll
#yum install nginx
查看配置
#cat /etc/nginx/nginx.conf
#yum install unzip
#curl -s http://getcomposer.org/installer | php
#mv composer.phar /usr/local/bin/composer
#composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/
#composer global require "fxp/composer-asset-plugin:~1.2.2"
【出错修复命令】composer global remove fxp/composer-asset-plugin --no-plugins
#cd /home/www/
#composer create-project --prefer-dist yiisoft/yii2-app-advanced advanced