源码编译安装nginx

nginx版本:1.22

安装依赖包:

#yum -y install pcre-devel openssl openssl-devel  GeoIP-devel.x86_64

#cd nginx-1.22.0/

#./configure --prefix=/export/server/nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_geoip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module

#make && make install

添加stream模块

查看编译安装命令

#./nginx -V

#./configure --prefix=/export/server/nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_geoip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-stream

#执行make (不要执行make install)

# make

备份nginx源文件

cp nginx nginx.bak

覆盖源nginx文件

cp -fp objs/nginx /export/server/nginx/sbin/

查看编译模块

/export/server/nginx/sbin/nginx -V

 

posted @   fighting-go  阅读(32)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· .NET Core 中如何实现缓存的预热?
· 三行代码完成国际化适配,妙~啊~
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
点击右上角即可分享
微信分享提示