Linux 安装 nginx

111 阅读1分钟

原文链接LINUX安装nginx详细步骤

  1. 一键安装上面四个依赖
    yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
    
  2. 解压安装包到 /usr/local/nginx 目录下
  3. 执行命令 考虑到后续安装ssl证书 添加两个模块
    ./configure --with-http_stub_status_module --with-http_ssl_module
    
  4. 执行make命令
    make
    make install
    
  5. 启动nginx
    /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf