编译安装nginx

2023-03-12编程技术5350

一、需要的依赖包先使用yum安装

 yum install -y vim lrzsz tree screen psmisc lsof tcpdump wget ntpdate  gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel  net-tools iotop bc zip unzip zlib-devel bash-completion nfs-utils automake libxml2  libxml2-devel libxslt libxslt-devel perl perl-ExtUtils-Embed 

二、在nginx官网上下载源码包文件

三、解压缩

四、编译

./configure --prefix=/apps/nginx \ --user=nginx \ --group=nginx \ --with-http_ssl_module \ --with-http_v2_module \ --with-http_realip_module \ --with-http_stub_status_module \ --with-http_gzip_static_module \ --with-pcre \ --with-stream \ --with-stream_ssl_module \ --with-stream_realip_module 


五、安装

make && make install


本文地址:https://www.ufcn.cn/tutorials/1978220.html

如非特殊说明,本站内容均来自于网友自主分享,概不代表本站观点,如有任何问题我们都将在收到反馈后的第一时间进行处理!