Compile and install PHP-PHP tutorial

不言
Release: 2023-03-22 19:56:01
Original
1967 people have browsed it

This article shares the issues about compiling and installing PHP. It is very detailed. Friends in need can refer to it.

Assume that all dependencies have been resolved. If you encounter an uninstalled program, continue after installation
Set up the user with the highest authority. If not, add sudo

  1. before the command. Go to the PHP official websiteDownload

  2. Extract to user directory

    tar jxvf php-5.6.5.tar.bz2

  3. ##Configure installation options

    ./configure \

    --prefix=/usr/local/php \
    --with-config-file-path=/usr/local/php/etc \
    --enable-zip \
    --enable-fpm \
    --enable-static \
    --enable-debug \
    --enable-calendar \
    --enable-mbstring \
    --enable-sockets \
    --with-openssl \
    --with-zlib \
    --with-curl \
    --with-gettext \
    --with-iconv \
    --with-pcre-regex \
    --with-mcrypt \
    --with-iconv \
    --with-libdir=/lib/x86_64-linux-gnu \
    --with-mysql=mysqlnd \
    --with-mysqli=mysqlnd \
    --with-pdo-mysql=mysqlnd

  4. <br/>
    Copy after login
  5. Compile program

    make

  6. Installer

    make install

  7. Copy configuration file

    cp. /php.ini-development /usr/local/php/etc/php.ini

  8. Start php-fpm

    /usr/local /php/sbin/php-fpm

  9. ##Add the php-fpm script to the startup item
  10. cp ./sapi/fpm/init.d .php-fpm /etc/init.d/php-fpm
    chmod 755 /etc/init.d/php-fpm


  11. Related recommendations:

LNMP compilation and installation of PHP and LNMP configuration and verification example sharing

About problems with compiling and installing PHP

Records of errors and solutions encountered during manual compilation and installation of PHP


The above is the detailed content of Compile and install PHP-PHP tutorial. 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
Popular Tutorials
More>
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!