0
点赞
收藏
分享

微信扫一扫

3-4 使用nginx-haproxy-实现七层负载均衡

悄然丝语 2022-05-20 阅读 118

1. 源码安装nginx

  1. 安装依赖
    [root@xuegod13 ~]# yum -y install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre pcre-devel
  2. 创建nginx用户,解压源码包
    [root@xuegod13 ~]# useradd -s /sbin/nologin -M nginx
    [root@xuegod13 ~]# tar xf nginx-1.18.0.tar.gz
    [root@xuegod13 ~]# cd nginx-1.18.0/
    [root@xuegod13 nginx-1.18.0]# ls
    auto CHANGES.ru configure html man src
    CHANGES conf contrib LICENSE README
  3. 安装
    [root@xuegod13 nginx-1.18.0]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_gzip_static_module --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --with-http_flv_module  --with-http_mp4_module --with-pcre
举报

相关推荐

0 条评论