切换脚本(可以手动设置版本,另外开机时会检测当前cli版本,选择同一版本的fpm启动)
1 | #!/bin/bash |
配置开机服务
cd /etc/systemd/system
vi run-on-startup.service
1 | [Unit] |
systemctl enable run-on-startup.service
systemctl start run-on-startup.service
使用方法
1 | ./switch-php.sh 8.2 or ./switch-php.sh 7.3 |