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的主要内容,如果未能解决你的问题,请参考以下文章
python 瀹夎pytorch 鍙?瀹夎澶辫触瑙e喅鍔炴硶