OneinStack installed PHP version switch LNMP

If your environment is not OneinStack installed, you can skip this blog up

Note: All the following command prompt if insufficient permissions please add sudo *** in front of the command

①, first check the PHP version currently installed, I installed several versions here, you can, as the case may be.

  Command is as follows:

  ll /usr/local/

 

 

②, delete the current php (link).

  Command is as follows:

  rm -rf /usr/local/php

③, add new links PHP version directory php72.

  Command is as follows:

  ln -s /usr/local/php72 /usr/local/php

④, see the PHP process (if PHP has not started, skip).

  Command is as follows:

  ps -ef | grep php

  

  If the above situation (to get rid of the main process)

  kill 2526

⑤, PHP restart process.

  service php-fpm restart

  Of course, you can restart the following NGINX

  service nginx reload

⑥, view the current PHP version

  php -v

  

OK

 

Guess you like

Origin www.cnblogs.com/zhangkuan/p/11082546.html