VPS侦探论坛

 找回密码
 注册
查看: 3283|回复: 16

军哥,LNMP能安装set-misc模块吗?

[复制链接]
发表于 2022-10-27 22:20:20 | 显示全部楼层 |阅读模式

本帖最后由 oqiwheioqwheq 于 2022-10-27 22:21 编辑

https://www.nginx.com/resources/wiki/modules/set_misc/


网上找了一些,好像没有相关教程,不知道有没有什么禁忌。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2022-10-28 11:06:40 | 显示全部楼层


第三方模块都是一样的流程,用nginx升级脚本,升级教程里面有说明:https://lnmp.org/faq/lnmp1-2-upgrade.html
set-misc的nginx模块源码:https://github.com/openresty/set-misc-nginx-module
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2022-10-29 10:09:45 | 显示全部楼层

licess 发表于 2022-10-28 11:06
第三方模块都是一样的流程,用nginx升级脚本,升级教程里面有说明:https://lnmp.org/faq/lnmp1-2-upgrade. ...
  1. nginx-1.12.1.tar.gz [found]
  2. ============================check files==================================
  3. openssl-1.0.2l.tar.gz [found]
  4. Uncompress nginx-1.12.1.tar.gz...
  5. cd nginx-1.12.1...
  6. ./configure: error: invalid option ""
  7. make: *** No targets specified and no makefile found.  Stop.
  8. cp: cannot stat `objs/nginx': No such file or directory
  9. Test nginx configure file...
  10. include/upgrade_nginx.sh: line 59: /usr/local/nginx/sbin/nginx: No such file or directory
  11. upgrade...
  12. make: *** No rule to make target `upgrade'.  Stop.
  13. Checking ...
  14. Error: Nginx upgrade failed.
  15. [root@MyServer lnmp1.4]#
复制代码



  1. Download_Mirror='https://soft.vpser.net'

  2. Nginx_Modules_Options='--add-module=/lnmp1.4/src/ngx_devel_kit-0.3.1 \
  3.      --add-module=/lnmp1.4/src/set-misc-nginx-module-0.10'
  4. PHP_Modules_Options=''

  5. ##MySQL/MariaDB database directory##
  6. MySQL_Data_Dir='/usr/local/mysql/var'
  7. MariaDB_Data_Dir='/usr/local/mariadb/var'
  8. ##Default website home directory##
  9. Default_Website_Dir='/home/wwwroot/default'

  10. Enable_Nginx_Openssl='y'
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2022-10-29 11:12:56 | 显示全部楼层



本帖最后由 oqiwheioqwheq 于 2022-10-29 11:19 编辑
licess 发表于 2022-10-28 11:06
第三方模块都是一样的流程,用nginx升级脚本,升级教程里面有说明:https://lnmp.org/faq/lnmp1-2-upgrade. ...

OK会了,我直接复制的,所以错了,我看了一下升级脚本,明白过来了。已经安装完毕。
感谢军哥
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2022-10-29 11:22:13 | 显示全部楼层

licess 发表于 2022-10-28 11:06
第三方模块都是一样的流程,用nginx升级脚本,升级教程里面有说明:https://lnmp.org/faq/lnmp1-2-upgrade. ...
  1. /lnmp1.4/src/ngx_devel_kit-0.3.1/src/ndk_hash.c:33: error: unused variable ?.d?
  2. make[1]: *** [objs/addon/src/ndk.o] Error 1
  3. make[1]: Leaving directory `/lnmp1.4/src/nginx-1.12.1'
  4. make: *** [build] Error 2
  5. cp: cannot stat `objs/nginx': No such file or directory
  6. Test nginx configure file...
  7. include/upgrade_nginx.sh: line 59: /usr/local/nginx/sbin/nginx: No such file or directory
  8. upgrade...
  9. /usr/local/nginx/sbin/nginx -t
  10. make: /usr/local/nginx/sbin/nginx: Command not found
  11. make: *** [upgrade] Error 127
  12. Checking ...
  13. Error: Nginx upgrade failed.
复制代码



  1. Download_Mirror='https://soft.vpser.net'

  2. Nginx_Modules_Options='--add-module=/lnmp1.4/src/ngx_devel_kit-0.3.1 --add-module=/lnmp1.4/src/set-misc-nginx-module-0.10'
  3. PHP_Modules_Options=''

  4. ##MySQL/MariaDB database directory##
  5. MySQL_Data_Dir='/usr/local/mysql/var'
  6. MariaDB_Data_Dir='/usr/local/mariadb/var'
  7. ##Default website home directory##
  8. Default_Website_Dir='/home/wwwroot/default'

  9. Enable_Nginx_Openssl='y'
  10. ~                                                                                                                                                                                                                     
  11. ~                              
复制代码


军哥,出现错误了。

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

发表于 2022-10-29 16:10:39 | 显示全部楼层

oqiwheioqwheq 发表于 2022-10-29 11:22
军哥,出现错误了。

不清楚你当前什么系统版本,如果用的lnmp1.4的话估计可能比较老旧
按提示信息有可能与ngx_devel_kit有兼容性问题
 楼主| 发表于 2022-10-29 20:48:05 | 显示全部楼层

licess 发表于 2022-10-29 16:10
不清楚你当前什么系统版本,如果用的lnmp1.4的话估计可能比较老旧
按提示信息有可能与ngx_devel_kit有兼 ...

那过几天我卸载了安装LNMP 1.9试试
军哥,我应该先安装好后,再编辑LNMP.conf加模块进行二次编译,还是直接修改lnmp.conf加模块安装不用第二次编译好呢。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2022-10-30 09:34:07 | 显示全部楼层

oqiwheioqwheq 发表于 2022-10-29 20:48
那过几天我卸载了安装LNMP 1.9试试
军哥,我应该先安装好后,再编辑LNMP.conf加模块进行二次编译,还是直 ...

新安装可以直接修改lnmp.conf 后新装,但是如果是地方模块需要提前下载好并按要求写好参数
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2022-10-31 18:32:09 | 显示全部楼层


licess 发表于 2022-10-30 09:34
新安装可以直接修改lnmp.conf 后新装,但是如果是地方模块需要提前下载好并按要求写好参数 ...

好的,过几天就换成1.9了,现在1.4不知道咋回事,前几天编译了几次之后,网站运行有点卡,还有就是log功能也失效了。access_log
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2022-11-1 12:07:29 | 显示全部楼层



licess 发表于 2022-10-30 09:34
新安装可以直接修改lnmp.conf 后新装,但是如果是地方模块需要提前下载好并按要求写好参数 ...
  1.         objs/addon/src/ngx_http_set_random.o \
  2.         objs/addon/src/ngx_http_set_secure_random.o \
  3.         objs/addon/src/ngx_http_set_rotate.o \
  4.         objs/addon/src/ngx_http_set_hmac.o \
  5.         objs/ngx_modules.o \
  6.         -ldl -lrt -lpthread -lcrypt /lnmp1.9/src/pcre-8.45/.libs/libpcre.a /lnmp1.9/src/openssl-1.1.1o/.openssl/lib/libssl.a /lnmp1.9/src/openssl-1.1.1o/.openssl/lib/libcrypto.a -ldl -lpthread -lz \
  7.         -Wl,-E
  8. make[1]: Leaving directory `/lnmp1.9/src/nginx-1.22.0'
  9. mv: cannot stat `/usr/local/nginx/sbin/nginx': No such file or directory
  10. cp: cannot create regular file `/usr/local/nginx/sbin/nginx': No such file or directory
  11. Test nginx configure file...
  12. include/upgrade_nginx.sh: line 74: /usr/local/nginx/sbin/nginx: No such file or directory
  13. upgrade...
  14. /usr/local/nginx/sbin/nginx -t
  15. make: /usr/local/nginx/sbin/nginx: Command not found
  16. make: *** [upgrade] Error 127
  17. Checking ...
  18. Error: Nginx upgrade failed.
  19. [root@C20221101104393 lnmp1.9]#
复制代码

  1. Download_Mirror='https://soft.vpser.net'

  2. Nginx_Modules_Options='--add-module=/lnmp1.9/src/ngx_devel_kit-0.3.2  --add-module=/lnmp1.9/src/set-misc-nginx-module-0.33'
  3. PHP_Modules_Options=''

  4. ##MySQL/MariaDB database directory##
  5. MySQL_Data_Dir='/usr/local/mysql/var'
  6. MariaDB_Data_Dir='/usr/local/mariadb/var'
  7. ##Default website home directory##
  8. Default_Website_Dir='/home/wwwroot/default'

  9. Enable_Nginx_Openssl='y'
  10. Enable_Nginx_Lua='n'
  11. Enable_Ngx_FancyIndex='n'
  12. Enable_Swap='y'
  13. Enable_PHP_Exif='n'
  14. Enable_PHP_Fileinfo='n'
  15. Enable_PHP_Ldap='n'
  16. Enable_PHP_Bz2='n'
  17. Enable_PHP_Sodium='n'
  18. Enable_PHP_Imap='n'
复制代码

哎,还是不行。
发表于 2022-11-1 14:19:59 | 显示全部楼层


日志不完整无法确定什么情况
 楼主| 发表于 2022-11-1 14:54:00 | 显示全部楼层

本帖最后由 oqiwheioqwheq 于 2022-11-1 14:55 编辑
licess 发表于 2022-11-1 14:19
日志不完整无法确定什么情况
  1. 2022-11-01 14:31:18 (1.09 MB/s) - “openssl-1.1.1o.tar.gz” saved [9856386/9856386]

  2. Uncompress nginx-1.22.0.tar.gz...
  3. cd nginx-1.22.0...
  4. checking for OS
  5. + Linux 2.6.32-754.el6.i686 i686
  6. checking for C compiler ... found
  7. + using GNU C compiler
  8. + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
  9. checking for gcc -pipe switch ... found
  10. checking for --with-ld-opt="'-ljemalloc'" ... not found
  11. ./configure: error: the invalid value in --with-ld-opt="'-ljemalloc'"

  12. make: *** No rule to make target `build', needed by `default'.  Stop.
  13. make: *** No rule to make target `build', needed by `default'.  Stop.
  14. make: *** No rule to make target `install'.  Stop.
  15. cp: cannot create regular file `/usr/local/nginx/conf/nginx.conf': No such file or directory
  16. cp: cannot create directory `/usr/local/nginx/conf/': No such file or directory
  17. cp: cannot create regular file `/usr/local/nginx/conf/pathinfo.conf': No such file or directory
  18. cp: cannot create regular file `/usr/local/nginx/conf/enable-php.conf': No such file or directory
  19. cp: cannot create regular file `/usr/local/nginx/conf/enable-php-pathinfo.conf': No such file or directory
  20. cp: cannot create directory `/usr/local/nginx/conf/example': No such file or directory
  21. mkdir: cannot create directory `/usr/local/nginx/conf/vhost': No such file or directory
  22. include/nginx.sh: line 162: /usr/local/nginx/conf/fastcgi.conf: No such file or directory
  23. cp: cannot create regular file `/etc/systemd/system/nginx.service': No such file or directory
  24. Create PHP Info Tool...
  25. Copy PHP Prober...
  26. Copy Opcache Control Panel...
复制代码


好像在这里出错了,LOG文件太大,上传不了。
换了几个系统都不行
CentOS 6.9
CentOS 6.8
CentOS 6.1
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2022-11-1 23:29:39 | 显示全部楼层
licess 发表于 2022-11-1 14:19
日志不完整无法确定什么情况

放弃了,CentOS 6.1 X32 无法安装LNMP1.9,只有1.8可以安装上,但模块不能安装,现在用的是1.8,首次安装的是PHP7.0.33,发现网站目录下没有防跨站文件【user.ini】,是1.8现在没有防跨站文件了吗?还是改位置了吗?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2022-11-2 08:24:10 | 显示全部楼层
oqiwheioqwheq 发表于 2022-11-1 23:29
放弃了,CentOS 6.1 X32 无法安装LNMP1.9,只有1.8可以安装上,但模块不能安装,现在用的是1.8,首次安装 ...

按前面 ./configure: error: the invalid value in --with-ld-opt="'-ljemalloc'" 的信息看你系统上jemalloc没找到可能被删掉了吧
lnmp 1.8和lnmp 1.9没多少变化,nginx版本上变化而已,1.8可以1.9不行那大概率是nginx新版本与centos 6的兼容性问题
现在手头的vps上centos6的都难找

.user.ini 一直就有,这个是隐藏文件,没有可能不是用lnmp模式,lnmpa和lamp是没有的

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

 楼主| 发表于 2022-11-2 09:20:10 | 显示全部楼层
licess 发表于 2022-11-2 08:24
按前面 ./configure: error: the invalid value in --with-ld-opt="'-ljemalloc'" 的信息看你系统上jemall ...

我看了一下现在LNMP1.8的PHP.ini关于user.ini设置,前面有个;符号,不知道这个有没有影响。
本来打算用centos 7的,但一些命令的变化,用不太习惯,所以一直用centos 6。
这个日志附近是昨天lnmp1.9的脚本install安装不上,但日志文件又太大,我用upgrade脚本安装不成功的日志文件。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-7-27 08:30 , Processed in 0.031915 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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