在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
CentOS6 不支持 php7.4版本的安装了(可能是我技术不行) php7.3.x编译安装。 // 后面会提示 system libzip must be upgraded to version >= 0.11 所以提前卸载,自己编译。 yum -y remove libzip-devel libzip // 就下载这个版本,别下载太高的,centos6上编译不过 wget https://nih.at/libzip/libzip-1.2.0.tar.gz
// 安装缺失库 yum -y install bzip2 bzip2-devel libxml2-devel curl-devel libjpeg-devel libpng libpng-devel freetype-devel gmp-devel readline readline-devel libxslt openssl-devel libxslt-devel
vim /etc/ld.so.conf #添加如下几行 /usr/local/lib64 /usr/local/lib /usr/lib /usr/lib64 #保存退出 ldconfig -v # 使之生效
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
// 下载PHP wget https://www.php.net/distributions/php-7.3.24.tar.gz tar -zxvf php-7.3.24.tar.gz cd php-7.3.24
// 编译 ./configure \ --prefix=/usr/local/php73 \ --with-config-file-path=/usr/local/php73/etc \ --enable-fpm \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --enable-inline-optimization \ --disable-debug \ --disable-rpath \ --enable-shared \ --enable-soap \ --with-libxml-dir \ --with-xmlrpc \ --with-openssl \ --with-mhash \ --with-pcre-regex \ --with-sqlite3 \ --with-zlib \ --enable-bcmath \ --with-iconv \ --with-bz2 \ --enable-calendar \ --with-curl \ --with-cdb \ --enable-dom \ --enable-exif \ --enable-fileinfo \ --enable-filter \ --with-pcre-dir \ --enable-ftp \ --with-gd \ --with-openssl-dir \ --with-jpeg-dir \ --with-png-dir \ --with-zlib-dir \ --with-freetype-dir \ --enable-gd-jis-conv \ --with-gettext \ --with-gmp \ --with-mhash \ --enable-json \ --enable-mbstring \ --enable-mbregex \ --enable-mbregex-backtrack \ --with-onig \ --enable-pdo \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-zlib-dir \ --with-pdo-sqlite \ --with-readline \ --enable-session \ --enable-shmop \ --enable-simplexml \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-wddx \ --with-libxml-dir \ --with-xsl \ --enable-zip \ --enable-mysqlnd-compression-support \ --with-pear \ --enable-opcache \
make -j make install
// 配置文件修改: cp php.ini-production /usr/local/php73/etc/php.ini
#php-fpm 端口可在 www.conf 里修改 chmod +x /etc/init.d/php73-fpm /etc/init.d/php73-fpm start # php73加入环境变量 #开机自启动
# 修改不显示X-Power-By vim /usr/local/php73/etc/php.ini 找到 expose_php 把 on 改为 off /etc/init.d/php73-fpm restart
|
2022-08-17
2022-11-06
2022-08-17
2022-08-14
2022-07-18
请发表评论