nginx1.15.8源码编译安装

1.创建nginx用户https://www.cndba.cn/hbhe0316/article/4841https://www.cndba.cn/hbhe0316/article/4841

[root@mysql /]# groupadd -r nginx
[root@mysql /]# useradd -r -g nginx nginx

2.安装nginx依赖包

https://www.cndba.cn/hbhe0316/article/4841
[root@mysql /]# yum groupinstall -y "Development tools"
[root@mysql /]# yum install -y  gcc wget gcc-c++ automake autoconf     libtool libxml2-devel libxslt-devel perl-devel     perl-ExtUtils-Embed pcre-devel openssl-devel

3.创建/nginx安装目录https://www.cndba.cn/hbhe0316/article/4841

https://www.cndba.cn/hbhe0316/article/4841
https://www.cndba.cn/hbhe0316/article/4841
[root@mysql /]# mkdir /nginx
[root@mysql /]# tar xvf nginx-1.15.8.tar.gz -C /nginx/

4.下载echo模块https://www.cndba.cn/hbhe0316/article/4841

[root@mysql /]# cd /nginx
[root@mysql /]# git clone https://github.com/openresty/echo-nginx-module.git

5.编译安装

[root@mysql /]# cd /nginx/nginx-1.15.8
[root@mysql nginx-1.15.8]# ./configure /
--prefix=/nginx /
--sbin-path=/nginx/sbin/nginx /
--conf-path=/nginx/conf/nginx.conf /
--error-log-path=/nginx/log/error.log /
--http-log-path=/nginx/log/access.log /
--pid-path=/nginx/run/nginx.pid /
--lock-path=/nginx/run/nginx.lock /
--http-client-body-temp-path=/nginx/tmp/client /
--http-proxy-temp-path=/nginx/tmp/proxy /
--http-fastcgi-temp-path=/nginx/tmp/fcgi /
--http-uwsgi-temp-path=/nginx/tmp/uwsgi /
--http-scgi-temp-path=/nginx/tmp/scgi /
--user=nginx /
--group=nginx /
--with-pcre /
--with-http_v2_module /
--with-http_ssl_module /
--with-http_realip_module /
--with-http_addition_module /
--with-http_sub_module /
--with-http_dav_module /
--with-http_flv_module /
--with-http_mp4_module /
--with-http_gunzip_module /
--with-http_gzip_static_module /
--with-http_random_index_module /
--with-http_secure_link_module /
--with-http_stub_status_module /
--with-http_auth_request_module /
--with-mail /
--with-mail_ssl_module /
--with-file-aio /
--with-http_v2_module /
--with-threads /
--with-stream /
--with-stream_ssl_module /
--add-module=/nginx/echo-nginx-module
[root@mysql nginx-1.15.8]# make && make install
[root@mysql nginx-1.15.8]# mkdir -p /nginx/nginx-1.15.8/tmp/client
[root@mysql nginx-1.15.8]# ln -s /nginx/nginx-1.15.8/sbin/nginx /usr/bin/nginx

6.启动nginx

https://www.cndba.cn/hbhe0316/article/4841
https://www.cndba.cn/hbhe0316/article/4841
[root@mysql nginx-1.15.8]# nginx

7.访问nginxhttps://www.cndba.cn/hbhe0316/article/4841

版权声明:本文为博主原创文章,未经博主允许不得转载。

nginx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值