[TOC] > [参考文档](https://www.jianshu.com/p/0a79847c8151) ## 快速安装 ``` tar zxvf php-5.6.25.tar.gz // 解压php安装包,得到一个php-5.6.25的文件夹 cd php-5.6.25 ./configure make && make install //或是 php.ini-production -> php.ini 复制到php安装文件中的相应位置, // 把/usr/local/php/etc/php-fpm.conf.default 复制到当前文件夹下,保存未php-fpm.conf ``` ## 推荐配置 ``` ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --enable-mysqlnd --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-zip --enable-ftp --enable-soap --enable-xml --enable-mbstring --disable-rpath --disable-debug --disable-fileinfo --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pcre-regex --with-iconv --with-zlib --with-gd --with-openssl --with-xmlrpc --with-curl --with-imap-ssl --with-freetype-dir --enable-fpm --enable-pcntl --with-mcrypt --with-mhash ```