How to install php source code

爱喝马黛茶的安东尼
Release: 2023-02-25 07:10:01
Original
5491 people have browsed it

How to install php source code

Download the source code package from the official website: https://www.php.net/downloads.php

Steps:

1. Unzip

Command: tar -xjvf php.tar.bz2

2. configure

The configure tool is a shell script that requires gcc and autoconfig tools before configuration and compilation.

Related recommendations: "php tutorial"

You can view the configuration parameters through ./configure --help

Enter decompression After the PHP directory, compile the source code:

./configure --prefix=/home/php (--prefix specifies the path to install PHP)

3 , make

Execute the compile and build command: make

4, make install

Execute the compile Build command: make install

Note: Execute command: php -i | grep php.ini Check the php.ini path of php execution, copy the configuration file php.ini file to the directory, otherwise load it Configuration file failed

PHP command:

php -m View php extension

php -v View version

php --ini Check the php.ini path

php --ri swoole Check whether the swoole expansion is successful

mac pro configure php environment variables

vim ~/.bash_profile

Add: alias php=/home/php/bin/php Save

source ~/.bash_profile

The above is the detailed content of How to install php source code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!