一、官网下载源码
http://nginx.org/en/download.html

二、上传到指定的安装目录
tar vxf nginx-1.16.1.tar.gz
cd cd nginx-1.16.1 && ./config --prefix=/etc/nginx
./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 --with-pcre=
安装需要的插件yum -y install openssl openssl-devel
checking for zlib library ... not found
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=
安装需要的插件yum install zlib-devel -y
./configure --prefix=/usr/local/nginx
make
三、启动nginx
./sbin/nginx
四、查看nginx 启动配置详情
./sbin/nginx -t
五、隐藏nginx版本号
vim conf/nginx.conf
http server 路径下添加 server_tokens off;
vim conf/fastcgi.conf
修改 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param SERVER_SOFTWARE nginx;
重启或者reload nginx
pkill nginx && ./sbin/nginx另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网页名称:nginx-1.16.1安装-创新互联
浏览路径:http://www.yingshanweb.cn/article/degccs.html
其他资讯
- 怎么在Windows764位环境中安装最新版本MySQL-创新互联
- 讲解Thinkphp框架扩展之标签库驱动原理与用法-创新互联
- Kotlin中单利常用的五种写法
- ios开发视频剪辑 ios开发视频教程
- css3.0层叠样式表 层叠样式表css的主要作用是改变什么
- 一个500M的网站空间大概多少钱?(网站空间一般要多少钱)
- 一步到位,轻松Linux查看当前目录大小(linux查看当前目录大小)
- win安全中心怎么设置信任?(windows信任关系是什么意思)
- C语言实现SQL数据库连接教程(c语言连接sql数据库)
- Linux休眠时间设置:为什么需要休眠和如何设置休眠时间? (linux休眠几秒)


咨询
建站咨询
