centos7源码安装PHP7.3
2021-05-05 23:27
标签:info XML rpc wget ring number www 安装php7 groupadd 1. 首先释放安装包: 2. 接下来进行参数配置,配置前如果没有libxml2和libxml2-devel会报错,所以应该更新libxml2并安装libxml2-devel,使用在线安装: yum -y install openssl 下载Cmake 解压Cmake centos7源码安装PHP7.3 标签:info XML rpc wget ring number www 安装php7 groupadd 原文地址:https://www.cnblogs.com/flyfly123/p/12105490.htmltar -xvzf php-7.3.2.tar.gz.gz
cd php-7.3.2
yum -y install libxml2
yum -y install libxml2-devel
yum -y install openssl-devel
yum -y install curl
yum -y install curl-devel
yum -y install libjpeg
yum -y install libjpeg-devel
yum -y install libpng
yum -y install libpng-devel
yum -y install freetype
yum -y install freetype-devel
yum -y install pcre
yum -y install pcre-devel
yum -y install libxslt
yum -y install libxslt-devel
yum -y install bzip2
yum -y install bzip2-devel./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip
可能会报错,提示需要安装zlib
查看yum是否安装,安装了还是提示错误的话就卸载了自己下载源码包编译安装,
如果zlib版本大于1.2的话可能会提示cmake版本过低,要求升级cmakewget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz
将cmake移动到/usr/local/cmake3
make && make installcp php.ini-development /usr/local/php/lib/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp sapi/fpm/php-fpm /usr/local/bin
vim /usr/local/php/lib/php.ini
打开php配置文件找到cgi.fix_pathinfo配置项,这一项默认被注释并且值为1groupadd www-data
useradd -g www-data www-data
cp /usr/local/etc/php-fpm.d/www.conf.default /usr/local/etc/php-fpm.d/www.conf
vim /usr/local/etc/php-fpm.d/www.conf
默认user和group的设置为nobody,将其改为www-data/usr/local/bin/php-fpm
上一篇:org.hibernate.LazyInitializationException: could not initialize proxy [com.angus.entity.ProductCateg