{"id":85624,"date":"2023-12-20T05:47:03","date_gmt":"2023-12-19T21:47:03","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=85624"},"modified":"2023-12-20T05:47:03","modified_gmt":"2023-12-19T21:47:03","slug":"httpd-make-php","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/httpd-make-php.html","title":{"rendered":"\u4e3ahttpd2.4.x\u7f16\u8bd1\u5b89\u88c5php\u6a21\u5757"},"content":{"rendered":"

\u524d\u9762\u6211\u4eec\u5df2\u7ecf\u7f16\u8bd1\u5b89\u88c5\u4e86httpd\u670d\u52a1\uff0c\u90a3\u4e48\u73b0\u5728\uff0c\u6211\u4eec\u5c31\u6765\u7f16\u8bd1php\u5427~~<\/p>\n

php\u7b80\u4ecb<\/strong><\/div>\n

PHP\uff08\u5916\u6587\u540d:PHP: Hypertext Preprocessor\uff0c\u4e2d\u6587\u540d\uff1a\u201c\u8d85\u6587\u672c\u9884\u5904\u7406\u5668\u201d\uff09\u662f\u4e00\u79cd\u901a\u7528\u5f00\u6e90\u811a\u672c\u8bed\u8a00\u3002\u8bed\u6cd5\u5438\u6536\u4e86C\u8bed\u8a00\u3001Java\u548cPerl\u7684\u7279\u70b9\uff0c\u5229\u4e8e\u5b66\u4e60\uff0c\u4f7f\u7528\u5e7f\u6cdb\uff0c\u4e3b\u8981\u9002\u7528\u4e8eWeb\u5f00\u53d1\u9886\u57df\u3002<\/p>\n

\u8ddfweb\u670d\u52a1\u7684\u7ed3\u5408\u4e3b\u8981\u53ef\u4ee5\u4f7f\u7528CGI\u3001apache module\u3001fcgi\u7684\u65b9\u5f0f\u7ed3\u5408\uff0cCGI\u56e0\u4e3a\u6548\u7387\u95ee\u9898\u5df2\u7ecf\u7b97\u662f\u88ab\u6dd8\u6c70\u7684\u6280\u672f\u4e86\uff0c\u800c\u5c06php\u4f5c\u4e3aapache module\u7684\u8bdd\uff0c\u914d\u7f6e\u76f8\u5bf9\u7b80\u5355\uff0c\u4f46\u6548\u7387\u4e0d\u662f\u6700\u597d\u7684\uff0c\u56e0\u4e3aapache\u518d\u52a0\u8f7d\u9759\u6001\u8d44\u6e90\u7684\u65f6\u5019\u4e5f\u4f1a\u52a0\u8f7dphp-module\uff0c\u800c\u5c06php\u4ee5fcgi\u7684\u65b9\u5f0f\u8c8c\u4f3c\u6210\u4e3a\u4e86\u73b0\u5728\u7684\u4e3b\u6d41\u9009\u62e9\uff0c\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u8bb0\u5f55\u4e0b\u7f16\u8bd1Php\u4f5c\u4e3aapache\u6a21\u5757\u7684\u6b65\u9aa4\u3002<\/p>\n

\u4e0b\u8f7dphp<\/strong><\/div>\n

\u8bbf\u95eephp\u7684\u5b98\u65b9\u7f51\u7ad9<\/a>\uff0c\u53ef\u4ee5\u770b\u5230\u73b0\u5728\u4e3b\u8981\u6709\u4e09\u4e2a\u5206\u652f5.6.x 7.0.x 7.1.x\uff0c\u6211\u9009\u62e95.6.x\u6765\u7f16\u8bd1\u3002<\/p>\n

 \r\ncd ~\r\nwget http:\/\/hk1.php.net\/distributions\/php-5.6.31.tar.gz\r\n<\/pre>\n
\u914d\u7f6e\u5e76\u7f16\u8bd1<\/strong><\/div>\n

\u5148\u5b89\u88c5\u4e24\u4e2a\u5305 yum install libxml2-devel openssl-devel \uff0c\u8fd9\u4e24\u4e2a\u5305\u5728\u540e\u9762\u7f16\u8bd1\u4f1a\u88ab\u4f9d\u8d56\u3002<\/p>\n

\r\ntar -xf php-5.6.31.tar.gz \r\ncd php-5.6.31\r\n.\/configure --prefix \/usr\/local\/php56 --with-apxs2=\/usr\/local\/httpd24\/bin\/apxs  --with-config-file-path=\/etc\/ --with-config-file-scan-dir=\/etc\/php.d --with-libxml-dir --with-openssl --with-zlib --enable-mbstring --with-mysql\r\nmake -j 2 && make install\r\n<\/pre>\n