Compiling and installing php-php tutorials

Source: Internet
Author: User
Tags fpm php website
This article shared the issue of compiling and installing PHP, very detailed, the need for friends can refer to

Assuming that all dependencies have been resolved, such as installing a program that is not installed, continue after installation
Set up to use the highest privileged user, if not then add sudo before the command

  1. Download to PHP website

  2. Extract to User directory

    Tar jxvf php-5.6.5.tar.bz2

  3. Configuring 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. Compiling the program

    Make

  5. installation program

    Make install

  6. Copying a configuration file

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

  7. Start PHP-FPM

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

  8. Add PHP-FPM script to startup item

    CP./SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM
    chmod 755/etc/init.d/php-fpm

Related recommendations:

LNMP compile and install PHP and LNMP configuration and authentication instance sharing

Questions about compiling and installing PHP

Manually compiling and installing PHP encounters errors and resolution records

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.