How to install php environment with linux yum: first update the yum source; then install php7 directly with yum; finally install the extension through the "yum install php70w-common php70w-fpm php70w-opcache..." command.
Recommendation: "PHP Video Tutorial"
Again in the past two days After installing a virtual machine, I have to compile lnmp and make various extensions, which is very troublesome. Can I install it directly with yum? The answer is yes!
#1. First, update the yum source, otherwise it will be the default old version, which is generally 5.6 and below, but php7 has been out for a long time, and the performance has improved by more than 50%!
Update the yum source according to the system. Mine is centos7, so I run the following code!
CentOS/RHEL 7.x:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
If it is centos6, then execute the following code:
CentOS/RHEL 6.x:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Then you can install php7.0 directly with yum. The extensions that can be installed are as follows:
yum install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-devel
With just this command, you can install the following extensions!
php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
Are you excited? Don’t worry, there are even better ones! Generally, memcached, gd, mysql, etc. need to be installed, right?
1 安装包 提供的拓展 2 php70w mod_php , php70w-zts 3 php70w-bcmath 4 php70w-cli php-cgi, php-pcntl, php-readline 5 php70w-common php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml , php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib 6 php70w-dba 7 php70w-devel 8 php70w-embedded php-embedded-devel 9 php70w-enchant 10 php70w-fpm 11 php70w-gd 12 php70w-imap 13 php70w-interbase php_database, php-firebird14 php70w-intl 15 php70w-ldap 16 php70w-mbstring 17 php70w-mcrypt 18 php70w-mysql php-mysqli, php_database19 php70w-mysqlnd php-mysqli, php_database20 php70w-odbc php-pdo_odbc, php_database21 php70w-opcache php70w-pecl-zendopcache22 php70w-pdo php70w-pdo_sqlite, php70w-sqlite323 php70w-pdo_dblib php70w-mssql24 php70w-pear 25 php70w-pecl-apcu 26 php70w-pecl-imagick 27 php70w-pecl-memcached 28 php70w-pecl-mongodb 29 php70w-pecl-redis 30 php70w-pecl-xdebug 31 php70w-pgsql php-pdo_pgsql, php_database32 php70w-phpdbg 33 php70w-process php-posix, php-sysvmsg, php-sysvsem, php-sysvshm34 php70w-pspell 35 php70w-recode 36 php70w-snmp 37 php70w-soap 38 php70w-tidy 39 php70w-xml php-dom, php-domxml, php-wddx, php-xsl40 php70w-xmlrpc
For example, if you want to install xml, you can do it directly. Don’t doubt it is that simple:
yum install php70w-xml
2. Check the result:
Check the php version:
php -v
Check the php extension:
Did you see it? Basically, all the extensions you can use are available, right? If you want anything, just go to yum and it will be fine! No more having to worry about various dependency issues!
The above is the detailed content of Tutorial on installing php environment using linux yum. For more information, please follow other related articles on the PHP Chinese website!

The article compares ACID and BASE database models, detailing their characteristics and appropriate use cases. ACID prioritizes data integrity and consistency, suitable for financial and e-commerce applications, while BASE focuses on availability and

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

The article discusses the benefits of using password_hash and password_verify in PHP for securing passwords. The main argument is that these functions enhance password protection through automatic salt generation, strong hashing algorithms, and secur

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

The article discusses strategies to prevent XSS attacks in PHP, focusing on input sanitization, output encoding, and using security-enhancing libraries and frameworks.

The article discusses the use of interfaces and abstract classes in PHP, focusing on when to use each. Interfaces define a contract without implementation, suitable for unrelated classes and multiple inheritance. Abstract classes provide common funct


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver CS6
Visual web development tools