资源放送
↓ 扫一扫 ↓
领取CENTOS 7 YUM安装PHP7.4教程
录屏资料
1.安装remi扩展源
yum install epel-release
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
2.安装YUM管理工具
yum install yum-utils
3. 查看PHP(可忽略此步骤)
yum search php73
yum search php74
yum list | grep php80
4.安装PHP
yum install php74-php-gd php74-php-pdo php74-php-mbstring php74-php-cli php74-php-fpm php74-php-mysqlnd
#yum install php74-php-cli php74-php-common php74-php-devel php74-php-embedded php74-php-fpm php74-php-gd php74-php-mbstring php74-php-mysqlnd php74-php-pdo php74-php-opcache php74-php-xml php74-php-soap
#yum -y install −−enablerepo=remi-php80 php80 php80-php php80-php-xml php80-php-xmlrpc php80-php-pecl-mcrypt php80-php-fpm php80-php-pecl-apcu php80-php-mbstring php80-php-gd php80-php-json php80-php-pecl-json-post php80-php-pdo php80-php-mysqlnd php80-php-pecl-mysql php80-php-opcache php80-php-pear php80-php-soap php80-php-intl php80-php-pear
5.确认安装结果
yum list installed | grep php
6.建立软连接
通过remi安装的php的指令是php74,这里建立一下软链接:
ln -s /opt/remi/php74/root/usr/bin/php /usr/local/bin/php
7.查看php版本
php -v
8.启动FPM
service php74-php-fpm start
systemctl start php74-php-fpm
9.设置开机启动
systemctl enable php74-php-fpm
推荐阅读
>>>新手必备-Linux入门之云计算是什么
>>>红帽认证入门-Linux系统介绍及企业版本选型
>>>新手必备-Linux系统安装配置+Xshell远程连接
>>>Linux常用命令行合集之绝对路径和相对路径
>>>软连接与硬连接