先更新本机内置的程序。

sudo apt-get update
sudo apt-get upgrade

安装PHP

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1 php7.1-common php7.1-fpm php7.1-dev 
sudo apt-get install php7.1-mbstring php7.1-xml

安装结束之后就可以执行php -i命令查看到php-cli的信息 
不过要配合nginx的话,需要用php-fpm来管理php的进程。

service php7.1-fpm start
service php7.1-fpm stop
service php7.1-fpm restart

 

相关文章:

  • 2021-08-21
  • 2021-12-07
  • 2021-08-04
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-17
  • 2021-06-07
  • 2021-08-26
  • 2021-10-05
  • 2022-01-23
  • 2022-01-18
  • 2021-06-06
相关资源
相似解决方案