CentOs7瀹夎PHP

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOs7瀹夎PHP相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/native' title='native'>native   tar.gz   iconv   zip   .gz   lin   api   target   html   

鏉ユ簮锛?a href="https://jingyan.baidu.com/article/2d5afd692df18d85a3e28e4c.html" target="_blank">https://jingyan.baidu.com/article/2d5afd692df18d85a3e28e4c.html

涓€銆佷笅杞芥簮鐮?/p>

1銆乧d /usr/local/src/

2. 鎵ц鍛戒护: wget http://cn2.php.net/distributions/php-5.6.31.tar.gz

3. 瑙e帇php婧愮爜: tar zxvf php-5.6.31.tar.gz

4. 杩涘叆瑙e帇婧愮爜鐩綍: cd php-5.6.31

浜屻€佸畨瑁匬HP闇€瑕佺殑杞欢

yum install -y gcc gcc-c++ libxml2 libxml2-devel autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel curl curl-devel libxslt-devel openssl-devel

涓夈€佺紪璇戝畨瑁呴厤缃?/p>

鍦╬hp-5.6.31鐩綍鎵ц浠ヤ笅鍛戒护锛堝畨瑁卲hp鍒?usr/local/php鐩綍锛夛細

./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysql --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-xmlrpc --with-xsl --with-zlib --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-sockets --enable-sysvsem --enable-xml --enable-zip

鍥涖€佺紪璇慞HP婧愮爜

make

ps:缂栬瘧闇€瑕佷竴娈垫椂闂达紝缂栬瘧瀹屼箣鍚庝笉鐢ㄧ鐣岄潰鎻愮ず鐩存帴鎵ц涓嬩竴姝?/p>

浜斻€佸畨瑁匬HP婧愮爜

make install

鍏€佸鍒禤HP閰嶇疆鍒板畨瑁匬HP瀹夎鐩綍

    1. 澶嶅埗php.ini鍛戒护:cp php.ini-development /usr/local/php/lib/php.ini

    2. 澶嶅埗php-fmp閰嶇疆鍛戒护: cp ./sapi/fpm/php-fpm.conf /usr/local/php/etc/php-fpm.conf

    3. 鏌ョ湅php鏄惁瀹夎鎴愬姛: /usr/local/php/bin/php --version

    鏄剧ずphp鐗堟湰灏卞畨瑁呮垚鍔熶簡

php5.6.31灏辩紪璇戝畨瑁呭畬浜?/p>

以上是关于CentOs7瀹夎PHP的主要内容,如果未能解决你的问题,请参考以下文章

vmware瀹夎centos7鍥炬枃鏁欑▼

Centos7瀹夎骞堕厤缃畆edis

python 瀹夎pytorch 鍙?瀹夎澶辫触瑙e喅鍔炴硶

CentOS 7安装zabbix-2.4.8监控

Windows 2016 瀹归尟绉昏綁鍙㈤泦瀹夎 鍙㈤泦瀹夎

mac锛欸o瀹夎鍜岄厤缃?GoLand瀹夎鍜屼娇鐢ㄤ箣瀹屾暣鏁欑▼