1、去官网下载nginx源码包 下载地址: http://nginx.org/en/download.html,选择一个版本

2、分别下载openssl 、pcre(不能用pcre2) 、zlib源码包,并解压

记录 centos配置nginx

3、进入nginx解压出来的目录 图中是nginx-1.12-1

运行 ./configure --with-pcre=../pcre-8.32 --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.0.2l 生成makefile文件

然后运行 make命令

最后运行make install命令

此时,不出意外,应该安装成功了

4、启动nginx服务

在objs中有一个nginx的可执行文件。运行./nginx 服务就启动了。

访问服务器地址,成功!记录 centos配置nginx

相关文章:

  • 2021-08-23
  • 2021-12-27
  • 2021-12-27
  • 2021-12-27
  • 2021-12-27
  • 2021-12-27
  • 2021-12-27
  • 2021-12-29
猜你喜欢
  • 2021-12-27
  • 2021-10-07
  • 2020-03-22
  • 2019-05-22
  • 2021-12-27
  • 2022-01-14
  • 2021-12-27
相关资源
相似解决方案