如题所述
ããå ä¹åéè¿ç½æç centos éåï¼å°é¿éäºç centos å级å°ææ°çäºï¼ä¹èªå·±ç项ç®å°æªå¼å§æ£å¼å¼åï¼éå°ææçç¸åºç¯å¢é½å级å°æé«ã
ããæ¥ç centos çæ¬ï¼
ãã[root@iZ23d ~]# cat /etc/centos-release
ããCentOS Linux release 7.2.1511 (Core)
ãã1ãå é¤ä¹åç php çæ¬ï¼
ãã[root@iZ23d ~]# yum remove php* php-common
ããLoaded plugins: langpacks
ããRepository base is listed more than once in the configuration
ããRepository updates is listed more than once in the configuration
ããRepository extras is listed more than once in the configuration
ããRepository centosplus is listed more than once in the configuration
ããNo Match for argument: php-5.4.16
ããNo Match for argument: php-5.4.16.tar.gz
ããNo Match for argument: php-7.0.1RC1
ããNo Match for argument: php-7.0.1RC1.tar.gz
ããNo Match for argument: phpMyAdmin-4.4.0.tar.gz
ããNo Match for argument: php-common
ããNo Packages marked for removal
ãã2ãrpm å®è£ Php7 ç¸åºç yumæºï¼
ãã[root@iZ23d ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
ããRetrieving https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
ããwarning: /var/tmp/rpm-tmp.LhJKKR: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
ããPreparing... ################################# [100%]
ããpackage webtatic-release-7-3.noarch is already installed
ãã3ã ç´æ¥yumå®è£ php7ï¼
ãã[root@iZ23d ~]# yum install php70w
ããLoaded plugins: langpacks
ããRepository base is listed more than once in the configuration
ããRepository updates is listed more than once in the configuration
ããRepository extras is listed more than once in the configuration
ããRepository centosplus is listed more than once in the configuration
ããResolving Dependencies
ãã--> Running transaction check
ããããã ãçç¥ã
ããWarning: RPMDB altered outside of yum.
ããInstalling : php70w-common-7.0.0-1.w7.x86_64 1/3
ããInstalling : php70w-cli-7.0.0-1.w7.x86_64 2/3
ããInstalling : php70w-7.0.0-1.w7.x86_64 3/3
ããVerifying : php70w-7.0.0-1.w7.x86_64 1/3
ããVerifying : php70w-common-7.0.0-1.w7.x86_64 2/3
ããVerifying : php70w-cli-7.0.0-1.w7.x86_64 3/3
ããInstalled:
ããphp70w.x86_64 0:7.0.0-1.w7
ããDependency Installed:
ããphp70w-cli.x86_64 0:7.0.0-1.w7 php70w-common.x86_64 0:7.0.0-1.w7
ããComplete!
ãã4ãæ£æ¥ php çæ¬ï¼
ãã[root@iZ23d ~]# php -v
ããPHP 7.0.0 (cli) (built: Dec 2 2015 20:42:32) ( NTS )
ããCopyright (c) 1997-2015 The PHP Group
ããZend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
ãã[root@iZ23d2e6hoqZ ~]#
ãã以ä¸æ¾ç¤ºå®è£ æåï¼
ãã5ãéå¯ Apacheï¼æ¥ç phpinfo :
ãã[root@iZ23d ~]# systemctl restart httpd.service
ããæ£æ¥phpinfo:
ããPHP Version 7.0.0
ããSystemLinux iZ23d 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64
ããBuild DateDec 2 2015 20:43:38
ããServer APIApache 2.0 Handler
ããVirtual Directory Supportdisabled
ããConfiguration File (php.ini) Path/etc
ããLoaded Configuration File/etc/php.ini
ããScan this dir for additional .ini files/etc/php.d
ããAdditional .ini files parsed/etc/php.d/bz2.ini, /etc/php.d/calendar.ini, /etc/php.d/ctype.ini, /etc/php.d/curl.ini, /etc/php.d/exif.ini, /etc/php.d/fileinfo.ini, /etc/php.d/ftp.ini, /etc/php.d/gettext.ini, /etc/php.d/gmp.ini, /etc/php.d/iconv.ini, /etc/php.d/json.ini, /etc/php.d/phar.ini, /etc/php.d/shmop.ini, /etc/php.d/simplexml.ini, /etc/php.d/sockets.ini, /etc/php.d/tokenizer.ini, /etc/php.d/xml.ini, /etc/php.d/zip.ini
ããPHP API20151012
ããPHP Extension20151012
ããZend Extension320151012
ããZend Extension BuildAPI320151012,NTS
ããPHP Extension BuildAPI20151012,NTS
ããDebug Buildno
ããThread Safetydisabled
ããZend Signal Handlingdisabled
ããZend Memory Managerenabled
ããZend Multibyte Supportdisabled
ããIPv6 Supportenabled
ããDTrace Supportenabled
ããRegistered PHP Streamshttps, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
ããRegistered Stream Socket Transportstcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
ããRegistered Stream Filterszlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*
ããThis program makes use of the Zend Scripting Language Engine:
ããZend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
ããConfiguration
ããapache2handler
ããApache VersionApache/2.4.6 (CentOS)
ããApache API Version20120211
ããServer Administratorxxxxxx@xxxxxx.com
ããHostname:Portxxxx.xxxxx.xxx:0
ããUser/Groupapache(48)/48
ããMax RequestsPer Child: 0 - Keep Alive: on - Max Per Connection: 100
ããTimeoutsConnection: 60 - Keep-Alive: 15
ããVirtual ServerYes
ããServer Root/etc/httpd
ããLoaded Modulescore mod_so http_core mod_access_compat mod_actions mod_alias mod_allowmethods mod_auth_basic mod_auth_digest mod_authn_anon mod_authn_core mod_authn_dbd mod_authn_dbm mod_authn_file mod_authn_socache mod_authz_core mod_authz_dbd mod_authz_dbm mod_authz_groupfile mod_authz_host mod_authz_owner mod_authz_user mod_autoindex mod_cache mod_cache_disk mod_data mod_dbd mod_deflate mod_dir mod_dumpio mod_echo mod_env mod_expires mod_ext_filter mod_filter mod_headers mod_include mod_info mod_log_config mod_logio mod_mime_magic mod_mime mod_negotiation mod_remoteip mod_reqtimeout mod_rewrite mod_setenvif mod_slotmem_plain mod_slotmem_shm mod_socache_dbm mod_socache_memcache mod_socache_shmcb mod_status mod_substitute mod_suexec mod_unique_id mod_unixd mod_userdir mod_version mod_vhost_alias mod_dav mod_dav_fs mod_dav_lock mod_lua prefork mod_proxy mod_lbmethod_bybusyness mod_lbmethod_byrequests mod_lbmethod_bytraffic mod_lbmethod_heartbeat mod_proxy_ajp mod_proxy_balancer mod_proxy_connect mod_proxy_express mod_proxy_fcgi mod_proxy_fdpass mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_wstunnel mod_ssl mod_systemd mod_cgi mod_perl mod_php7
ãã以ä¸æ¾ç¤º php7 å®è£ æåï¼
ããæ¥ç centos çæ¬ï¼
ãã[root@iZ23d ~]# cat /etc/centos-release
ããCentOS Linux release 7.2.1511 (Core)
ãã1ãå é¤ä¹åç php çæ¬ï¼
ãã[root@iZ23d ~]# yum remove php* php-common
ããLoaded plugins: langpacks
ããRepository base is listed more than once in the configuration
ããRepository updates is listed more than once in the configuration
ããRepository extras is listed more than once in the configuration
ããRepository centosplus is listed more than once in the configuration
ããNo Match for argument: php-5.4.16
ããNo Match for argument: php-5.4.16.tar.gz
ããNo Match for argument: php-7.0.1RC1
ããNo Match for argument: php-7.0.1RC1.tar.gz
ããNo Match for argument: phpMyAdmin-4.4.0.tar.gz
ããNo Match for argument: php-common
ããNo Packages marked for removal
ãã2ãrpm å®è£ Php7 ç¸åºç yumæºï¼
ãã[root@iZ23d ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
ããRetrieving https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
ããwarning: /var/tmp/rpm-tmp.LhJKKR: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
ããPreparing... ################################# [100%]
ããpackage webtatic-release-7-3.noarch is already installed
ãã3ã ç´æ¥yumå®è£ php7ï¼
ãã[root@iZ23d ~]# yum install php70w
ããLoaded plugins: langpacks
ããRepository base is listed more than once in the configuration
ããRepository updates is listed more than once in the configuration
ããRepository extras is listed more than once in the configuration
ããRepository centosplus is listed more than once in the configuration
ããResolving Dependencies
ãã--> Running transaction check
ããããã ãçç¥ã
ããWarning: RPMDB altered outside of yum.
ããInstalling : php70w-common-7.0.0-1.w7.x86_64 1/3
ããInstalling : php70w-cli-7.0.0-1.w7.x86_64 2/3
ããInstalling : php70w-7.0.0-1.w7.x86_64 3/3
ããVerifying : php70w-7.0.0-1.w7.x86_64 1/3
ããVerifying : php70w-common-7.0.0-1.w7.x86_64 2/3
ããVerifying : php70w-cli-7.0.0-1.w7.x86_64 3/3
ããInstalled:
ããphp70w.x86_64 0:7.0.0-1.w7
ããDependency Installed:
ããphp70w-cli.x86_64 0:7.0.0-1.w7 php70w-common.x86_64 0:7.0.0-1.w7
ããComplete!
ãã4ãæ£æ¥ php çæ¬ï¼
ãã[root@iZ23d ~]# php -v
ããPHP 7.0.0 (cli) (built: Dec 2 2015 20:42:32) ( NTS )
ããCopyright (c) 1997-2015 The PHP Group
ããZend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
ãã[root@iZ23d2e6hoqZ ~]#
ãã以ä¸æ¾ç¤ºå®è£ æåï¼
ãã5ãéå¯ Apacheï¼æ¥ç phpinfo :
ãã[root@iZ23d ~]# systemctl restart httpd.service
ããæ£æ¥phpinfo:
ããPHP Version 7.0.0
ããSystemLinux iZ23d 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64
ããBuild DateDec 2 2015 20:43:38
ããServer APIApache 2.0 Handler
ããVirtual Directory Supportdisabled
ããConfiguration File (php.ini) Path/etc
ããLoaded Configuration File/etc/php.ini
ããScan this dir for additional .ini files/etc/php.d
ããAdditional .ini files parsed/etc/php.d/bz2.ini, /etc/php.d/calendar.ini, /etc/php.d/ctype.ini, /etc/php.d/curl.ini, /etc/php.d/exif.ini, /etc/php.d/fileinfo.ini, /etc/php.d/ftp.ini, /etc/php.d/gettext.ini, /etc/php.d/gmp.ini, /etc/php.d/iconv.ini, /etc/php.d/json.ini, /etc/php.d/phar.ini, /etc/php.d/shmop.ini, /etc/php.d/simplexml.ini, /etc/php.d/sockets.ini, /etc/php.d/tokenizer.ini, /etc/php.d/xml.ini, /etc/php.d/zip.ini
ããPHP API20151012
ããPHP Extension20151012
ããZend Extension320151012
ããZend Extension BuildAPI320151012,NTS
ããPHP Extension BuildAPI20151012,NTS
ããDebug Buildno
ããThread Safetydisabled
ããZend Signal Handlingdisabled
ããZend Memory Managerenabled
ããZend Multibyte Supportdisabled
ããIPv6 Supportenabled
ããDTrace Supportenabled
ããRegistered PHP Streamshttps, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
ããRegistered Stream Socket Transportstcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
ããRegistered Stream Filterszlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*
ããThis program makes use of the Zend Scripting Language Engine:
ããZend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
ããConfiguration
ããapache2handler
ããApache VersionApache/2.4.6 (CentOS)
ããApache API Version20120211
ããServer Administratorxxxxxx@xxxxxx.com
ããHostname:Portxxxx.xxxxx.xxx:0
ããUser/Groupapache(48)/48
ããMax RequestsPer Child: 0 - Keep Alive: on - Max Per Connection: 100
ããTimeoutsConnection: 60 - Keep-Alive: 15
ããVirtual ServerYes
ããServer Root/etc/httpd
ããLoaded Modulescore mod_so http_core mod_access_compat mod_actions mod_alias mod_allowmethods mod_auth_basic mod_auth_digest mod_authn_anon mod_authn_core mod_authn_dbd mod_authn_dbm mod_authn_file mod_authn_socache mod_authz_core mod_authz_dbd mod_authz_dbm mod_authz_groupfile mod_authz_host mod_authz_owner mod_authz_user mod_autoindex mod_cache mod_cache_disk mod_data mod_dbd mod_deflate mod_dir mod_dumpio mod_echo mod_env mod_expires mod_ext_filter mod_filter mod_headers mod_include mod_info mod_log_config mod_logio mod_mime_magic mod_mime mod_negotiation mod_remoteip mod_reqtimeout mod_rewrite mod_setenvif mod_slotmem_plain mod_slotmem_shm mod_socache_dbm mod_socache_memcache mod_socache_shmcb mod_status mod_substitute mod_suexec mod_unique_id mod_unixd mod_userdir mod_version mod_vhost_alias mod_dav mod_dav_fs mod_dav_lock mod_lua prefork mod_proxy mod_lbmethod_bybusyness mod_lbmethod_byrequests mod_lbmethod_bytraffic mod_lbmethod_heartbeat mod_proxy_ajp mod_proxy_balancer mod_proxy_connect mod_proxy_express mod_proxy_fcgi mod_proxy_fdpass mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_wstunnel mod_ssl mod_systemd mod_cgi mod_perl mod_php7
ãã以ä¸æ¾ç¤º php7 å®è£ æåï¼
温馨提示:答案为网友推荐,仅供参考