1. 安装php7.2
sudo apt-get install php7.2
sudo apt-get install php7.2-fpm php7.2-mysql php7.2-curl php7.2-json php7.2-mbstring php7.2-xml php7.2-intl php7.2-gd
若armbian中没有软件源,报错Unable to locate package php7.2,需要先添加软件源:
apt install ca-certificates apt-transport-https -y
wget -q https://packages.sury/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
apt update
然后再进行安装。
2. 配置php-frm
1. fpm.ini配置文件路径:/etc/php/7.2/fpm/php.ini
778行 ;cgi.fix_fathinfo=1 更改为 cgi.fix_fathinfo=0(去掉注释;)
2. www.conf文件路径:/etc/php/7.2/fpm/pool.d/www.conf
36行 listen = /run/php/php7.2-fpm.sock 修改为:listen = 127.0.0.1:9900(9000被别的占用了)
62行 listen.allowed_clients = 127.0.0.1注释去掉
113行 pm.max_children = 50
1. 安装php7.2
sudo apt-get install php7.2
sudo apt-get install php7.2-fpm php7.2-mysql php7.2-curl php7.2-json php7.2-mbstring php7.2-xml php7.2-intl php7.2-gd
若armbian中没有软件源,报错Unable to locate package php7.2,需要先添加软件源:
apt install ca-certificates apt-transport-https -y
wget -q https://packages.sury/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
apt update
然后再进行安装。
2. 配置php-frm
1. fpm.ini配置文件路径:/etc/php/7.2/fpm/php.ini
778行 ;cgi.fix_fathinfo=1 更改为 cgi.fix_fathinfo=0(去掉注释;)
2. www.conf文件路径:/etc/php/7.2/fpm/pool.d/www.conf
36行 listen = /run/php/php7.2-fpm.sock 修改为:listen = 127.0.0.1:9900(9000被别的占用了)
62行 listen.allowed_clients = 127.0.0.1注释去掉
113行 pm.max_children = 50