Home Backend Development PHP7 Explain PHP7.2 source code installation

Explain PHP7.2 source code installation

Mar 16, 2021 am 09:38 AM

Explain PHP7.2 source code installation

1. Download the installation package of php7.2 version

1. Download

Recommended (Free): PHP7

2. Upload to the root directory of the server

pwd: View the current directory

ll: View the current directory The file under

2. Unzip

tar -xjvf php-7.2.18.tar.bz

3.configure (compile)

cd php -7.2.18

./configure --prefix=/home/work/study

four.make(build)

make

make test

5.make install

Some commands for Linux operations on php

cd php——Enter php

cd ..——Enter the upper-level directory

.bin/php -m View it Extension

vi test.php - Create a test.php folder

<?php
echo time();
Copy after login

: wq - Save and exit

Press esc to enter command mode

Press i to edit text mode

1.:w Save the file but do not exit vi

2.:w file Save the modifications to file , Do not exit vi

3, :w! Force save, do not exit vi

4., :wq Save the file and exit vi

5, :wq! Force save file, and exit vi

6, :q do not save the file, exit vi

7, :q! do not save the file, force exit vi

./bin/php test.php ——Execute

6. Simplify the php execution command

1. Edit the . bash_profile file (vi ~/.bash_profile)

2.source ~/.bash_profile

3.php -v

Test

Summary: What pitfalls will you encounter when installing PHP source code?

1.gcc autoconfig——If it is not compiled, the system will prompt that you need to install these two software

2. The compiled file does not have a php.ini file

cp php.ini-development /home/work/study/ect /——Copy to the compiled folder

mv php.ini-development php.ini——Change the name

Changed the configuration of php.ini, it does not take effect

##php -i |grep php.ini

So move php.ini under lib

mv ./etc/php.ini ./lib

The above is the detailed content of Explain PHP7.2 source code installation. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)