前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >nginx编译

nginx编译

原创
作者头像
用户7011049
发布2021-12-10 10:58:34
2790
发布2021-12-10 10:58:34
举报
文章被收录于专栏:开发笔记1988开发笔记1988
代码语言:javascript
复制
sudo apt-get update   
sudo apt-get install libpcre3 libpcre3-dev 
apt-get install zlib1g-dev
安装gcc
sudo apt-get  install  build-essential
应该需要手动创建nginx属主和nginx属组。
groupadd www
useradd www -g www -s /sbin/nologin -M
cd ~
cd ~/nginx-1.21.0/pcre-8.45
make clean
./configure 
make install
cd ../
make clean
./configure --user=www --group=www --prefix=/usr/local/nginx --with-debug --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module  --with-stream --with-stream_ssl_module --with-openssl=/root/nginx-1.21.0/openssl-1.1.1k --with-openssl-opt='enable-weak-ssl-ciphers' --add-module=/root/nginx-1.21.0/headers-more-nginx-module-0.33 
make
make install
mkdir -p /home/wwwroot/default
mkdir -p /home/wwwlogs/
chown -R www:www /home/wwwlogs
chown -R www:www /home/wwwroot
chmod -R 755 /home/wwwlogs
chmod -R 755 /home/wwwroot
./configure --user=www --group=www --prefix=/Users/mingwei/nginx --with-debug --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_sub_module  --with-stream --with-stream_ssl_module --with-openssl=/Users/mingwei/Desktop/code/lnmp1.8/nginx-1.21.0/openssl-1.1.1k --with-openssl-opt='enable-weak-ssl-ciphers' --add-module=/Users/mingwei/Desktop/code/lnmp1.8/nginx-1.21.0/headers-more-nginx-module-0.33 --add-module=/Users/mingwei/Desktop/code/lnmp1.8/nginx-1.21.0/nginx-let-module-master

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档