In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to install php5.4 in centos yum". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install php5.4 in centos yum.
Centos yum install php5.4 method: 1, check whether the current system has installed PHP;2, check whether yum has installable PHP software; 3, through "yum install php" to install php.
Operating environment: CentOS 7.4.1708 system, php5.4 version, DELL G3 computer
How does centos yum install php5.4?
CentOS 7.4 install PHP 5.4.16 using yum source
Check whether PHP is installed on the current system
[root@localhost ~] # rpm-qa php
Second, check whether yum has installable PHP software
[root@localhost ~] # yum list | grep phpgraphviz-php.x86_64 2.30.1-19.el7 basephp.x86_64 5.4.16-43.el7_4 updatesphp-bcmath.x86_64 5.4.16-43.el7_4 updatesphp- Cli.x86_64 5.4.16-43.el7_4 updatesphp-common.x86_64 5.4.16-43.el7_4 updatesphp-dba.x86_64 5.4.16-43.el7_4 updatesphp-devel.x86_64 5.4.16-43.el7_4 updatesphp-embedded.x86_64 5.4.16-43.el7_4 updatesphp-enchant.x86_64 5.4.16-43.el7_4 updatesphp-fpm.x86_64 5.4.16 -43.el7_4 updatesphp-gd.x86_64 5.4.16-43.el7_4 updatesphp-intl.x86_64 5.4.16-43.el7_4 updatesphp-ldap.x86_64 5.4.16-43.el7_4 Updatesphp-mbstring.x86_64 5.4.16-43.el7_4 updatesphp-mysql.x86_64 5.4.16-43.el7_4 updatesphp-mysqlnd.x86_64 5.4.16-43.el7_4 updatesphp-odbc.x86_64 5.4.16-43.el7_4 updatesphp-pdo.x86_64 5.4.16-43.el7_4 updatesphp-pear.noarch 1purl 1.9.4-21.el7 basephp-pecl-memcache.x86_64 3.0 .8-4.el7 basephp-pgsql.x86_64 5.4.16-43.el7_4 updatesphp-process.x86_64 5.4.16-43.el7_4 updatesphp-pspell.x86_64 5.4.16-43.el7_4 Updatesphp-recode.x86_64 5.4.16-43.el7_4 updatesphp-snmp.x86_64 5.4.16-43.el7_4 updatesphp-soap.x86_64 5.4.16-43.el7_4 updatesphp-xml.x86_64 5.4.16-43.el7_4 updatesphp-xmlrpc.x86_64 5.4.16-43.el7_4 updatesrrdtool-php.x86_64 1.4.8-9.el7 baseuuid-php.x86_64 1 .6.2-26.el7 base
Third, install PHP
[root@localhost ~] # yum install php
Fourth, view the version and the supported extensions
[root@localhost] # php-vPHP 5.4.16 (cli) (built: Nov 15 2017 16:33:54) Copyright (c) 1997-2013 The PHP GroupZend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies [root@localhost] # php-m [PHP Modules] bz2calendarCorectypecurldateeregexiffileinfofilterftpgettextgmphashiconvjsonlibxmlmhashopensslpcntlpcrePharreadlineReflectionsessionshmopSimpleXMLsocketsSPLstandardtokenizerxmlzipzlib [Zend Modules] [root@localhost] # [root@localhost] # ll / etc/php.d/ the total amount is 20ml. 1 root root 49 November 16 00:36 curl.ini-rw-r--r--. 1 root root 57 November 16 00:36 fileinfo.ini-rw-r--r--. 1 root root 49 November 16 00:36 json.ini-rw-r--r--. 1 root root 49 November 16 00:36 phar.ini-rw-r--r--. 1 root root 47 November 16 00:36 zip.ini [root@localhost] # ll / usr/lib64/php/modules/ total dosage 3100-rwxr-xr-x. 1 root root 74688 November 16 00:36 curl.so-rwxr-xr-x. 1 root root 2713376 November 16 00:36 fileinfo.so-rwxr-xr-x. 1 root root 44688 November 16 00:36 json.so-rwxr-xr-x. 1 root root 27 1992 November 16 00:36 phar.so-rwxr-xr-x. 1 root root 58392 November 16 00:36 zip.so
5. Install php-mysqlnd
The current version of mysql installed on the system is:
[root@localhost] # rpm-qi mysql-community-serverName: mysql-community-serverVersion: 5.7.21Release: 1.el7Architecture: x86_64Install Date: Tuesday, February 13, 2018, 09:37:23 Group: Applications/DatabasesSize: 775546923License: Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Under GPLv2 license as shown in the Description field.Signature: DSA/SHA1, Thursday, December 28th, 2017, 20:54:13 Key ID 8c718d3b5072e1f5Source RPM: mysql-community-5.7.21-1.el7.src.rpmBuild Date: Thursday, December 28, 2017, 12:11:13 Build Host: siv27.no.oracle.comRelocations: (not relocatable) Packager: MySQL Release Engineering Vendor: Oracle and/or its affiliatesURL: A very fast and reliable SQL database serverDescription: The MySQL (TM) software delivers a very fast, multi-threaded, multi-user And robust SQL (Structured Query Language) database server. MySQL Serveris intended for mission-critical, heavy-load production systems as wellas for embedding into mass-deployed software. MySQL is a trademark ofOracle and/or its affiliatesThe MySQLsoftware has Dual Licensing, which means you can use the MySQLsoftware free of charge under the GNU General Public License (http://www.gnu.org/licenses/). You can also purchase commercial MySQLlicenses from Oracle and/or its affiliates if you do not wish to be bound by the terms ofthe GPL. See the chapter "Licensing and Support" in the manual forfurther info.The MySQL web site (http://www.mysql.com/) provides the latest news andinformation about the MySQL software. Also please see the documentationand the manual for more information.This package includes the MySQL server binary as well as related utilitiesto run and administer a MySQL server. [root@localhost] # yum install php-mysqlnd [root@localhost test] # ll / etc/php.d/ total amount of 48m RW / etc/php.d/. 1 root root 49 November 16 00:36 curl.ini-rw-r--r--. 1 root root 57 November 16 00:36 fileinfo.ini-rw-r--r--. 1 root root 49 November 16 00:36 json.ini-rw-r--r--. 1 root root 55 November 16 00:36 mysqlnd.ini-rw-r--r--. 1 root root 69 November 16 00:36 mysqlnd_mysqli.ini-rw-r--r--. 1 root root 67 November 16 00:36 mysqlnd_mysql.ini-rw-r--r--. 1 root root 47 November 16 00:36 pdo.ini-rw-r--r--. 1 root root 63 November 16 00:36 pdo_mysqlnd.ini-rw-r--r--. 1 root root 61 November 16 00:36 pdo_sqlite.ini-rw-r--r--. 1 root root 49 November 16 00:36 phar.ini-rw-r--r--. 1 root root 55 November 16 00:36 sqlite3.ini-rw-r--r--. 1 root root 47 November 16 00:36 zip.ini [root@localhost test] # ll / usr/lib64/php/modules/ total dosage 3772-rwxr-xr-x. 1 root root 74688 November 16 00:36 curl.so-rwxr-xr-x. 1 root root 2713376 November 16 00:36 fileinfo.so-rwxr-xr-x. 1 root root 44688 November 16 00:36 json.so-rwxr-xr-x. 1 root root 133136 November 16 00:36 mysqlnd_mysqli.so-rwxr-xr-x. 1 root root 53584 November 16 00:36 mysqlnd_mysql.so-rwxr-xr-x. 1 root root 256584 November 16 00:36 mysqlnd.so-rwxr-xr-x. 1 root root 28784 November 16 00:36 pdo_mysqlnd.so-rwxr-xr-x. 1 root root 116344 November 16 00:36 pdo.so-rwxr-xr-x. 1 root root 29176 November 16 00:36 pdo_sqlite.so-rwxr-xr-x. 1 root root 27 1992 November 16 00:36 phar.so-rwxr-xr-x. 1 root root 51360 November 16 00:36 sqlite3.so-rwxr-xr-x. 1 root root 58392 November 16 00:36 zip.so
If php-mysql is installed instead of php-mysqlnd, there is a warning when using the function mysqli_connect ():
PHP Warning: mysqli_connect (): Headers and client library minor version mismatch. Headers:50556 Library:50637
At this point, I believe you have a deeper understanding of "centos yum how to install php5.4". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.