Tutorial on installing php environment using linux yum
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!

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

vscode built-in terminal is a development tool that allows running commands and scripts within the editor to simplify the development process. How to use vscode terminal: Open the terminal with the shortcut key (Ctrl/Cmd). Enter a command or run the script. Use hotkeys (such as Ctrl L to clear the terminal). Change the working directory (such as the cd command). Advanced features include debug mode, automatic code snippet completion, and interactive command history.

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

Causes and solutions for the VS Code terminal commands not available: The necessary tools are not installed (Windows: WSL; macOS: Xcode command line tools) Path configuration is wrong (add executable files to PATH environment variables) Permission issues (run VS Code as administrator) Firewall or proxy restrictions (check settings, unrestrictions) Terminal settings are incorrect (enable use of external terminals) VS Code installation is corrupt (reinstall or update) Terminal configuration is incompatible (try different terminal types or commands) Specific environment variables are missing (set necessary environment variables)
