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
before the command. Go to the PHP official websiteDownload
Extract to user directory
tar jxvf php-5.6.5.tar.bz2
./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
<br/>
make
make install
cp. /php.ini-development /usr/local/php/etc/php.ini
/usr/local /php/sbin/php-fpm
chmod 755 /etc/init.d/php-fpm
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!