```
wget http://cn2.php.NET/distributions/php-7.0.4.tar.gz
tar zxvf php-7.0.4.tar.gz
cd php-7.0.4</pre>
```
注:上面的php版本可以替換成最新的版本
?編譯:
```
./configure --enable-fpm --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc?--with-fpm-user=nginx?--with-fpm-group=nginx?--with-bz2?--with-curl?--with-gd?--with-mcrypt?--with-openssl?--with-mhash?--with-jpeg-dir?--with-png-dir?--with-freetype-dir?--with-iconv-dir=/usr/local/libiconv?--with-gettext?--with-libxml-dir?--with-zlib?--with-xmlrpc?--with-pcre-regex?--with-pear?--with-pdo-mysql=mysqlnd?--with-mysql=mysqlnd?--with-mysqli=mysqlnd?--with-libdir=lib64?--enable-dom?--enable-xml?--enable-fpm?--enable-bcmath?--enable-ftp?--enable-sockets?--disable-ipv6?--enable-mbregex?--enable-mbstring?--enable-calendar?--enable-gd-native-ttf?--enable-static?--enable-fpm?--enable-bcmath?--enable-libxml?--enable-inline-optimization?--enable-mbregex?--enable-opcache?--enable-pcntl?--enable-shmop?--enable-soap?--enable-sockets?--enable-sysvsem?--enable-zip
```
如果出現下列錯誤。。那就是沒有編譯環境 。 請安裝gcc

yum install gcc
之后看最后又遇到這個問題:

yum install libxml2-devel
最后:
make && make install
安裝完成。
配置 ?(一下配置都是我個人的路徑配置 大家請按照各自路徑配置)
cp php.ini-development /usr/local/lib/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php7-fpm chmod +x /etc/init.d/php7-fpm
cd /usr/local/php/etc
cp php-fpm.conf.default php-fpm.conf
cp php-fpm.d/www.conf.default php-fpm.d/www.conf
配置完畢
/etc/init.d/php7-fpm start 啟動php
注意:在安裝完之后看下PHPINFO里面,php.ini的路徑,然后去服務器檢查試一下是否存在該文件,如果不存在就cp過來
**逐步剔除php7不支持的代碼**
檢測工具:[https://github.com/sstalle/php7cc](https://github.com/sstalle/php7cc)
- 技能知識點
- 對死鎖問題的理解
- 文件系統原理:如何用1分鐘遍歷一個100TB的文件?
- 數據庫原理:為什么PrepareStatement性能更好更安全?
- Java Web程序的運行時環境到底是怎樣的?
- 你真的知道自己要解決的問題是什么嗎?
- 如何解決問題
- 經驗分享
- GIT的HTTP方式免密pull、push
- 使用xhprof對php7程序進行性能分析
- 微信掃碼登錄和使用公眾號方式進行掃碼登錄
- 關于curl跳轉抓取
- Linux 下配置 Git 操作免登錄 ssh 公鑰
- Linux Memcached 安裝
- php7安裝3.4版本的phalcon擴展
- centos7下php7.0.x安裝phalcon框架
- 將字符串按照指定長度分割
- 搜索html源碼中標簽包的純文本
- 更換composer鏡像源為阿里云
- mac 隱藏文件顯示/隱藏
- 谷歌(google)世界各國網址大全
- 實戰文檔
- PHP7安裝intl擴展和linux安裝icu
- linux編譯安裝時常見錯誤解決辦法
- linux刪除文件后不釋放磁盤空間解決方法
- PHP開啟異步多線程執行腳本
- file_exists(): open_basedir restriction in effect. File完美解決方案
- PHP 7.1 安裝 ssh2 擴展,用于PHP進行ssh連接
- php命令行加載的php.ini
- linux文件實時同步
- linux下php的psr.so擴展源碼安裝
- php將字符串中的\n變成真正的換行符?
- PHP7 下安裝 memcache 和 memcached 擴展
- PHP 高級面試題 - 如果沒有 mb 系列函數,如何切割多字節字符串
- PHP設置腳本最大執行時間的三種方法
- 升級Php 7.4帶來的兩個大坑
- 不同域名的iframe下,fckeditor在chrome下的SecurityError,解決辦法~~
- Linux find+rm -rf 執行組合刪除
- 從零搭建Prometheus監控報警系統
- Bug之group_concat默認長度限制
- PHP生成的XML顯示無效的Char值27消息(PHP generated XML shows invalid Char value 27 message)
- XML 解析中,如何排除控制字符
- PHP各種時間獲取
- nginx配置移動自適應跳轉
- 已安裝nginx動態添加模塊
- auto_prepend_file與auto_append_file使用方法
- 利用nginx實現web頁面插入統計代碼
- Nginx中的rewrite指令(break,last,redirect,permanent)
- nginx 中 index try_files location 這三個配置項的作用
- linux安裝git服務器
- PHP 中運用 elasticsearch
- PHP解析Mysql Binlog
- 好用的PHP學習網(持續更新中)
- 一篇寫給準備升級PHP7的小伙伴的文章
- linux 安裝php7 -系統centos7
- Linux 下多php 版本共存安裝
- PHP編譯安裝時常見錯誤解決辦法,php編譯常見錯誤
- nginx upstream模塊--負載均衡
- 如何解決Tomcat服務器打開不了HOST Manager的問題
- PHP的內存泄露問題與垃圾回收
- Redis數據結構 - string字符串
- PHP開發api接口安全驗證
- 服務接口API限流 Rate Limit
- php內核分析---內存管理(一)
- PHP內存泄漏問題解析
- 【代碼片-1】 MongoDB與PHP -- 高級查詢
- 【代碼片-1】 php7 mongoDB 簡單封裝
- php與mysql系統中出現大量數據庫sleep的空連接問題分析
- 解決crond引發大量sendmail、postdrop進程問題
- PHP操作MongoDB GridFS 存儲文件,如圖片文件
- 淺談php安全
- linux上keepalived+nginx實現高可用web負載均衡
- 整理php防注入和XSS攻擊通用過濾