php7 集成环境,YUM安装PHP7的开发环境

第一步:安装remi源

yum install epel-release -y

或rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

或yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

第二步:配置php7.2仓库

yum -y install yum-utils

yum-config-manager –enable remi-php72 #yum -y install yum-utils

第三步:安装PHP

yum install php 因为上一步remi配置,所以这里会指向php72

第四步:安装扩展组件

yum install php php72-php-opcache php72-php-ldap php72-php-odbc php72-php-pear php72-php-xml php72-php-xmlrpc php72-php-soap curl curl-devel php72-php-mbstring php72-php-mysqlnd php72-php-fpm php72-php-gd php72-php-xdebug php72-php-pecl-mysql php72-php-pecl-memcached php72-php-pecl-memcache php72-php-pecl-redis

第五步:安装php-fpm

yum install php72-php-fpm

systemctl restart php72-php-fpm #启动php-fpm服务

netstat -tunlp|grep 9000 #查看9000端口是否正常启动了

php的配置文件及组件的安装位置

/etc/opt/remi/php72

/etc/opt/remi/php72/php-fpm.d/*.conf

—————————

安装xdebug

搜索相应库:yum search php|grep xdebug

yum install php72-php-pecl-xdebug

CentOS 7 provides PHP version 5.4 in its official repository

Command to install the EPEL repository configuration package:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Command to install the Remi repository configuration package:

yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Command to install the yum-utils package (for the yum-config-manager command):

yum install yum-utils

You want a single version which means replacing base packages from the distribution

Packages have the same name than the base repository, ie php-*

Some common dependencies are available in remi-safe repository, which is enabled by default

PHP version 7.2 packages are available for CentOS 7 in remi-php72 repository

Command to enable the repository:

yum-config-manager --enable remi-php72

If the priorities plugin is enabled, ensure remi-php72 have higher priority (a lower value) than base and updates

Command to upgrade (the repository only provides PHP):

yum update

Command to install additional packages:

yum install php-xxx

Command to install testing packages:

yum --enablerepo=remi-php72-test install php-xxx

Command to check the installed version and available extensions:

php --version

php --modules

CentOS 7 provides PHP version 5.4 in its official repository

Command to install the EPEL repository configuration package:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Command to install the Remi repository configuration package:

yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

Command to install the yum-utils package (for the yum-config-manager command):

yum install yum-utils

You want a single version which means replacing base packages from the distribution

Packages have the same name than the base repository, ie php-*

Some common dependencies are available in remi-safe repository, which is enabled by default

PHP version 7.2 packages are available for CentOS 7 in remi-php72 repository

Command to enable the repository:

yum-config-manager --enable remi-php72

If the priorities plugin is enabled, ensure remi-php72 have higher priority (a lower value) than base and updates

Command to upgrade (the repository only provides PHP):

yum update

Command to install additional packages:

yum install php-xxx

Command to install testing packages:

yum --enablerepo=remi-php72-test install php-xxx

Command to check the installed version and available extensions:

php --version

php --modules

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值