1,下载解压
tar xf php-7.2.0.tar.gz
cd php-7.2.0/
2,安装必要的库
sudo apt-get install libxml2-dev
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install make
sudo apt-get install curl
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libpng-dev
sudo apt-get install libmcrypt-dev
3,编译
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=ghostwu
make && sudo make install
4,写一个测试文件,测试php
时间: 2024-11-10 03:52:36