VPS侦探论坛

 找回密码
 注册
查看: 4415|回复: 11

如何卸载lnmp中拓展

[复制链接]
发表于 2021-4-16 18:12:14 | 显示全部楼层 |阅读模式

我的场景是这样的

重新安装了一个拓展 但是这个拓展跟现有的intl拓展出现了冲突 我需要将这个intl卸载掉之后 才能安装我目前需要安装的拓展
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2021-4-16 18:15:58 | 显示全部楼层


另外我的php.ini中中的拓展 都注释掉了 但是拓展还是能展示  我想问问大佬 lnmp中的的拓展 是在个配置文件进行控制的
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2021-4-16 18:21:07 | 显示全部楼层

军哥 大佬看下
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2021-4-16 19:09:36 | 显示全部楼层



我又看了下 这个lnmp的加载方式代码 不知道是在怎么加载拓展的 现在我的php.ini中的extension 前面都是;的状态 但是我php -m 里面又有这些拓展 确认服务器上的ini文件就一个 那这个拓展是怎么加载的
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2021-4-16 19:20:58 | 显示全部楼层

configure_options=" '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--with-config-file-scan-dir=/usr/local/php/conf.d' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv-dir' '--with-freetype-dir=/usr/local/freetype' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--enable-intl' '--enable-ftp' '--with-gd' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--without-libzip' '--enable-soap' '--with-gettext' '--enable-opcache' '--with-xsl' '--with-pear'"

是在php-config中这句话中进行加载的吗

军哥运维代购:http://shop63846532.taobao.com/

发表于 2021-4-16 20:20:58 | 显示全部楼层

php的intl及目前php -m 上显示的模块都是默认直接编译进去的,没法关闭,只能自己改编译参数重新编译安装
 楼主| 发表于 2021-4-16 22:57:32 | 显示全部楼层

重新编译安装 是需要重新安装lnmp  还是php呢 那这个编译的参数是在php-config配置中进行修改还是在哪进行配置呢?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2021-4-16 23:01:33 | 显示全部楼层

目前我的思路是修改 php-config中的  configure_options=" '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--with-config-file-scan-dir=/usr/local/php/conf.d' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv-dir' '--with-freetype-dir=/usr/local/freetype' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--enable-intl' '--enable-ftp' '--with-gd' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--without-libzip' '--enable-soap' '--with-gettext' '--enable-opcache' '--with-xsl' '--with-pear'"

将现有的--enable-intl 修改为 --disable-intl  然后在进行编译安装 ./configure --with-php-config=/usr/local/php/bin/php-config 这样的是正确的处理方式吗?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2021-4-17 13:29:26 | 显示全部楼层


lnmp 怎么进行重新编译我的php环境  需要执行什么命令呢 现在我将lnmp   php.sh 中的配置信息修改了  再重新安装了 能达到重新编译的效果吗
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2021-4-18 08:52:18 | 显示全部楼层



你只是改php的参数就只需要重新编译php就行

如果你说的修改php源码包目录下的 ./scripts/php-config 没用处
修改编译参数就是修改lnmp脚本里你要安装(include/php.sh)或升级安装(include/upgrade_php.sh)里对应php版本的参数,新装改新装的代码,要升级就改升级的代码

php文档和--help里面没有 --disable-intl 的参数,不确定能否使用

新装就重新卸载安装,升级php按官网教程进行升级php就可以了
 楼主| 发表于 2021-4-18 11:44:13 | 显示全部楼层

好 谢谢军哥
 楼主| 发表于 2021-5-7 17:09:47 | 显示全部楼层

分享一下我出现问题的解决办法
首先修改了  /lnmp1.7/include/upgrade_php.sh 中对应加载的拓展 我目前是需要去掉intl这个拓展
找到对应加载的版本
如果是7.2就选择Upgrade_PHP_72
根据自己的情况来
然后找到加载的地方
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/conf.d --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization ${with_curl} --enable-mbregex --enable-mbstring --disable-intl --enable-pcntl --enable-ftp --with-gd ${with_openssl} --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext ${with_fileinfo} --enable-opcache --with-xsl ${PHP_Modules_Options}
  将对应的拓展进行选择是否加载   如上红色的地方就是设置的不需要加载的拓展 默认为enable
再次感谢军哥
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-8 08:22 , Processed in 0.029275 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表