CentOS6编译安装nginx1.18

下载

openssl zlib pcre nginx

https://codeload.github.com/openssl/openssl/tar.gz/OpenSSL_1_1_1e

https://jaist.dl.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz

https://jaist.dl.sourceforge.net/project/pcre/pcre/8.44/pcre-8.44.tar.gz

http://nginx.org/download/nginx-1.18.0.tar.gz

将以上源码上传至root目录

编译

[root@localhost ~]# tar -zxf pcre-8.44.tar.gz

[root@localhost ~]# cd  ~/pcre-8.44

[root@localhost pcre-8.44]# ./configure --prefix=/usr/local/pcre-8.44

[root@localhost pcre-8.44]# make

[root@localhost ~]# cd ~

[root@localhost ~]# tar -zxf zlib-1.2.11.tar.gz

[root@localhost ~]# cd zlib-1.2.11

[root@localhost zlib-1.2.11]# ./configure --prefix=/usr/local/zlib-1.2.11

[root@localhost zlib-1.2.11]# make

[root@localhost zlib-1.2.11]#cd ~

[root@localhost ~]#tar -zxf openssl-OpenSSL_1_1_1e.tar.gz

[root@localhost ~]#cd openssl-OpenSSL_1_1_1e

[root@localhost openssl-OpenSSL_1_1_1e]#./config no-shared --prefix=/usr/local/openssl-1.1.1e --openssldir=ssl

[root@localhost openssl-OpenSSL_1_1_1e]#make

[root@localhost openssl-OpenSSL_1_1_1e]#cd ~

[root@localhost ~]#tar -zxf nginx-1.18.0.tar.gz

[root@localhost ~]#cd nginx-1.18.0

[root@localhost nginx-1.18.0]#./configure --prefix=/usr/local/nginx6 --with-http_ssl_module --with-pcre=/root/pcre-8.44 --with-zlib=/root/zlib-1.2.11 --with-openssl=/root/openssl-OpenSSL_1_1_1e

[root@localhost nginx-1.18.0]#make

[root@localhost nginx-1.18.0]#make install

说明

本地gcc版本为4.8.2

[root@localhost openssl-OpenSSL_1_1_1e]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-2/root/usr --mandir=/opt/rh/devtoolset-2/root/usr/share/man --infodir=/opt/rh/devtoolset-2/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --with-mpc=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC) 
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值