加载中...

如何从php5升级到php7


如何从php5升级到php7,ubuntu 14 ,nginx+php7

  1. #安装ppa
  2. sudo apt-get install python-software-properties software-properties-common
  3. sudo add-apt-repository ppa:ondrej/php-7.0
  4. sudo apt-get update
  5. #删除php5
  6. sudo apt-get purge php5-fpm php5-mysql php5-common
  7. sudo apt-get --purge autoremove
  8. #安装php7
  9. sudo apt-get install php7.0-fpm php7.0-mysql php7.0-common php7.0-curl
  10. #把nginx *.conf 里的fastcgi_pass配置改成:
  11. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  12. #重启nginx
  13. sudo service nginx reload
  14. #完成.


还没有评论.