First, delete the old version of RPM-qa|grep php*or Yum list installed|grep phpyum Remove PHP*Second, install the new version1. Update the Yum installation package RPM-UVH https://mirror.webtatic.com/yum/el7/epel-release.rpmRPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm2. Install the PHP and other components yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 Php70w-mysql.x86_64 php70w-Pdo.x86_64yum Install php70w-fpmsed-i-r"/^max_execution_time/[email protected] (max_execution_time =) [0-9][email protected]\[email protected]"/etc/php.inised-i-r"/^memory_limit/[email protected] (Memory_limit =) [0-9]+ (M) @\1128\[email protected]"/etc/php.inised-i-r"/^post_max_size/[email protected] (post_max_size =) [0-9]+ (M) @\116\[email protected]"/etc/php.inised-i-r"/^upload_max_filesize/[email protected] (upload_max_filesize =) [0-9]+ (M) @\12\[email protected]"/etc/php.inised-i-r"/^max_input_time/[email protected] (max_input_time =) [0-9][email protected]\[email protected]"/etc/php.inised-i-r"/^always_populate_raw_post_data/d;/^;always_populate_raw_post_data/a\always_populate_raw_post_data = 1"/etc/php.inised-i-r"/^expose_php/[email protected] (expose_php =) [email protected]\[email protected]"/etc/Php.inivim/etc/Php.inidate.timezone= asia/shanghaisystemctl Enable PHP-fpmsystemctl start php-fpm
CentOS7 Quick Installation PHP7.0 Guide