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



How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

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)

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

VS Code is available on Mac. It has powerful extensions, Git integration, terminal and debugger, and also offers a wealth of setup options. However, for particularly large projects or highly professional development, VS Code may have performance or functional limitations.

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.

How to back up VS Code configurations and extensions? Manually backup the settings file: Copy the key JSON files (settings.json, keybindings.json, extensions.json) to a safe location. Take advantage of VS Code synchronization: enable synchronization with your GitHub account to automatically back up all relevant settings and extensions. Use third-party tools: Back up configurations with reliable tools and provide richer features such as version control and incremental backups.
