CentOS7下的Nginx安装

1 编译工具与库文件

Nginx依赖于一些编译环境与库文件,安装Nginx之前需提前安装所需环境

yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel

yum -y install make xxx:安装并编译相关工具

2 安装 pcre 依赖

1.下载解压包,使用tar方式安装
    链接:https://pan.baidu.com/s/1I0KPYnEStJKSGpOEuuBe4g 
    提取码:ii54 
2.解压
    tar -zxvf pcre-8.35.tar.gz
3.切换至根路径并编译
    cd pcre-8.35
    ./configure
    make && make install

3 安装Nginx

1.下载解压包
    链接:https://pan.baidu.com/s/11gTlHGvnY87rz5YpEWxUNQ 
    提取码:bb5l 
2.解压
    tar -zxvf  nginx-1.19.1.tar.gz
3.切换至根路径并编译
    cd  nginx-1.19.1
    ./configure
    make && make install

你可能感兴趣的:(linux,nginx)