• 摘要:我准备安装到/usr/local目录下1. cd/usr/local2. 安装GCC和GCC-C++yuminstallgccyuminstall-ygccgcc-c++3. 安装pcre库cd/usr/local/wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gztar-zxvfpcre-8.39.tar.gzcdpcre-8.39/.
  • 我准备安装到/usr/local目录下

    1.   cd /usr/local

    2.   安装GCC 和GCC-C++

    yum install gcc

    yum install -y gcc gcc-c++

    3.   安装pcre库

    cd /usr/local/
    wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
    tar -zxvf pcre-8.39.tar.gz
    cd pcre-8.39/
    ./configure
    make
    make install

    4.   安装zlib库

    cd /usr/local/ 
    wget http://zlib.net/zlib-1.2.8.tar.gz
    tar -zxvf zlib-1.2.8.tar.gz 
    cd zlib-1.2.8/
    ./configure
    make
    make install

    5.   安装ssl

    cd /usr/local/
    wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
    tar -zxvf openssl-1.0.1c.tar.gz
    cd openssl-1.0.1c
    ./config
    make
    make install

     

    6.  安装nginx

    这里我是先下好了包的  http://nginx.org/

    cd /usr/local/
    tar -zxvf nginx-1.10.1.tar.gz
    ./configure
    make
    make install

    7.  启动 nginx

    /usr/local/nginx/sbin/nginx

    8.  输入http://localhost/

    启动成功

     阿里云Centos7安装Nginx

     

    若找不到pcre和zlib则需要配置

    --with-pcre=/usr/src/pcre-8.39 指的是pcre-8.39 的源码路径。
    --with-zlib=/usr/src/zlib-1.2.8 指的是zlib-1.2.8 的源码路径。

     

相关文章:

  • 2021-04-20
  • 2021-09-23
  • 2021-06-14
  • 2021-11-23
  • 2021-06-03
  • 2022-12-23
  • 2022-02-08
  • 2021-04-07
猜你喜欢
  • 2022-02-08
  • 2021-01-10
  • 2022-02-08
  • 2021-11-30
  • 2021-11-28
  • 2021-06-18
相关资源
相似解决方案