首页 > 系统相关 >Linux 之 Nginx 下载/安装

Linux 之 Nginx 下载/安装

时间:2024-09-13 14:24:38浏览次数:3  
标签:nginx -- module Nginx yum library install Linux 下载

下载

下载地址

nginx: download

 

安装

在线安装 

配置新的yum源

# 切换到yum源目录
cd /etc/yum.repos.d/

# 创建yum源文件
touch nginx.repo

# 配置nginx.repo文件内容
vim nginx.repo

nginx.repo 文件内容

name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

安装 nginx

# 安装
yum install nginx

# 启动
systemctl start nginx.service

# 查看启动状态 确认
systemctl status nginx.service

 

 离线安装

1.下载 nginx-1.26.2.tar.gz 并上传到 /usr/local

2.解压

tar -zxvf nginx-1.26.2.tar.gz

 

 3. 指定相关配置--编译--安装

# 进入到解压后的目录
cd nginx-1.26.2/

# 指定配置
./configure

#编译
make

#安装
make install

4. 启动

cd /usr/local/nginx/sbin/ && ./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=<path> option.

 解决方案

yum install -y pcre pcre-devel

 问题:

./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=<path> option.

 解决方案

yum install -y zlib-devel

问题:

make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/nginx'
make: *** [install] Error 2

解决方案

nginx 的解压目录与编译目录(默认:/usr/local/nginx)不能是一个

标签:nginx,--,module,Nginx,yum,library,install,Linux,下载
From: https://blog.csdn.net/sszdzq/article/details/142104637

相关文章

  • fastDFS - 单机部署 + nginx
    准备查看操作系统的版本信息[root@lab10~]#cat/etc/redhat-releaseCentOSLinuxrelease7.9.2009(Core)查看操作系统的网卡地址[root@lab10~]#ipaddressshowens322:ens32:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu1500qdiscpfifo_faststateUPgroupdef......
  • 工具分享 | 24年最新AWVS/Acunetix Premium V24.8高级版漏洞扫描器(最新版)Windows/Li
    前言AcunetixPremium是一种Web应用程序安全解决方案,用于管理多个网站、Web应用程序和API的安全。集成功能允许您自动化DevOps和问题管理基础架构。AcunetixPremium:全面的Web应用程序安全解决方案Web应用程序对于企业和组织与客户、合作伙伴和员工的联系至关......
  • 一文通透——Kali Linux基础入门_kali linux 新手教程
    ......
  • [2023最新]美少妇Metasploit(MSF)下载安装及使用详解,永久免费使用,环境配置和使用技巧
    模块含义auxiliary:主要包含渗透测试中一些辅助性脚本,这些脚本功能有扫描,嗅探,破解,注入,漏洞挖掘等。encoders:编码工具,用于躲过入侵检测和过滤系统。exploit:主要包括了exp、0day、各种漏洞利用的脚本。主要的攻击代码全在这个目录下,这里边包括的exp的路径的命名规则是:......
  • Adobe Animate(AN)软件下载win/mac安装及快捷键操作
    软件简介AdobeAnimate(简称AN)是Adobe公司推出的一款功能强大的电脑动画制作软件,前身是AdobeFlashProfessionalCC。它不仅能够支持设计游戏、应用程序的交互式矢量动画和位图动画,还兼容HTML5Canvas、WebGL等现代网页技术,为用户提供从2D动画制作到交互式内容设计的全方位解......
  • nginx 添加 ngx_fastdfs_module 模块
    目录nginx添加ngx_fastdfs_module模块背景安装fastdfslibcommon组件安装libserverframe组件安装fastdfs源码编译安装nginx重新源码编译下载ngx_fastdfs_module模块下载nginx源码包替换nginx添加ngx_fastdfs_module模块背景我在机器上源码安装了一个nginx,然后用户又让......
  • php毕业设计和课程设计14套——源码+论文完整资源下载
    精选14套基于php的毕业设计源码+论文完整下载大家好,给大家筛选整理一些质量很高的php毕业设计程序+源码+论文全套资源,希望能对大家有所帮助。需要下载开题报告PPT模板及论文答辩PPT模板等的小伙伴,可以进入我的博客主页查看左侧最下面栏目中的自助下载方法哦温馨提示:可按ct......
  • 终极 Nginx 配置指南
    转自:https://www.toutiao.com/article/7412444010868687412/?app=news_article_lite&timestamp=1726183629&use_new_style=1&req_id=20240913072708897999327556746BD261&group_id=7412444010868687412&share_token=d101eb4b-9c8a-45a3-82f8-a9020419cc39&......
  • VMware Avi Load Balancer 30.2.2 发布下载,新增功能概览
    VMwareAviLoadBalancer30.2.2-多云负载均衡平台应用交付:多云负载均衡、Web应用防火墙和容器Ingress服务负载均衡平台VMwareAviLoadBalancerVMwareAviLoadBalancer可简化应用交付,并提供多云负载均衡、Web应用防火墙和容器Ingress服务。名称变更VMwareNS......
  • VMware NSX 4.2.0.1 发布下载,新增功能概览
    VMwareNSX4.2.0.1-网络安全虚拟化平台构建具有网络连接和安全性的云智能网络,跨多种云环境支持一致的策略、运维和自动化。VMwareNSX提供了一个敏捷式软件定义基础架构,用来构建云原生应用程序环境。NSX专注于为具有异构端点环境和技术堆栈的新兴应用程序框架和架构提供网......