1.首先需要一台Linux服务器(如果没有参考地址:https://blog.csdn.net/yu1xue1fei/article/details/112679686)
2.到nginx官网下载nginx(这里下载开源版的网址:nginx.org)
3.然后把nginx拷贝到你的Linux上 (这里推荐是 shell、xftp)
4.使用xftp把下载好的nginx.tar.gz 包考到到root目录下
5.是用解压命令解压nginx 包
tar -zxvf nginx1.19.6.tar.gz
6.进入到nginx1.19.6文件夹
cd nginx.1.19.6
7.执行编译文件
./configure --prefix=/usr/local/nginx
# --prefix 指安装的位置
如果出现警告或报错
提示:
./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using -