centos7离线安装PHP7( 二 )


文章插图
继续安装
make

centos7离线安装PHP7

文章插图
make install
centos7离线安装PHP7

文章插图
配置文件从安装包里把配置文件拷贝到安装目录并重命名,配置文件有两个:生产环境php.ini-production和开发环境php.ini-development
[root@xcc php-7.4.30]# cp php.ini-* /usr/local/php/etc/[root@xcc php-7.4.30]# cd /usr/local/php/etc/[root@xcc etc]# cp php.ini-development php.ini[root@xcc etc]# lsphp-fpm.conf.defaultphp-fpm.dphp.iniphp.ini-developmentphp.ini-production配置系统环境变量编辑文件vi /etc/profile在末尾添加
PATH=/usr/local/php/bin:$PATHexport PATH使其立即生效source /etc/profile
查看版本[root@xcc ~]# php -vPHP 7.4.30 (cli) (built: Nov2 2022 17:32:45) ( NTS )Copyright (c) The PHP GroupZend Engine v3.4.0, Copyright (c) Zend Technologies查看扩展【centos7离线安装PHP7】[root@xcc ~]# php -m[PHP Modules]bcmathbz2CorectypecurldatedomfiltergdgettexthashiconvjsonlibxmlmbstringmysqlimysqlndopensslpcntlpcrePDOpdo_mysqlpdo_sqlitePharposixreadlineReflectionsessionshmopSimpleXMLsoapsocketsSPLsqlite3standardsysvmsgsysvsemsysvshmtokenizerxmlxmlreaderxmlrpcxmlwriterzip[Zend Modules]end 。
  

推荐阅读