文章目录
- 1、创建文件夹 tool / nginx
- 2、把安装文件放到 /opt/tool/nginx 目录下面
- 3、yum install gcc
- 4、yum install gcc-c++
- 5、tar -zxvf pcre-8.37.tar.gz
- 6、./configure
- 7、make
- 8、make install
- 9、tar -zxvf openssl-1.0.1t.tar.gz
- 10、./config
- 11、/config
1、创建文件夹 tool / nginx
[root@localhost ~]
[root@localhost opt]
[root@localhost opt]
[root@localhost tool]
[root@localhost tool]
[root@localhost nginx]
/opt/tool/nginx
[root@localhost nginx]
2、把安装文件放到 /opt/tool/nginx 目录下面
[root@localhost nginx]
/opt/tool/nginx
[root@localhost nginx]
nginx-1.20.1.tar.gz openssl-1.0.1t.tar.gz pcre-8.37.tar.gz zlib-1.2.8.tar.gz
[root@localhost nginx]
3、yum install gcc
[root@localhost nginx]
已加载插件:fastestmirror, langpacks | 2.9 kB 00:00:00
Determining fastest mirrors* base: mirrors.nju.edu.cn* centos-sclo-rh: mirrors.nju.edu.cn* centos-sclo-sclo: mirrors.163.com* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
软件包 gcc-4.8.5-44.el7.x86_64 已安装并且是最新版本
无须任何处理
4、yum install gcc-c++
[root@localhost nginx]
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile* base: mirrors.nju.edu.cn* centos-sclo-rh: mirrors.nju.edu.cn* centos-sclo-sclo: mirrors.163.com* extras: mirrors.nju.edu.cn* updates: mirrors.nju.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 gcc-c++.x86_64.0.4.8.5-44.el7 将被 安装
--> 正在处理依赖关系 libstdc++-devel = 4.8.5-44.el7,它被软件包 gcc-c++-4.8.5-44.el7.x86_64 需要
--> 正在处理依赖关系 libstdc++ = 4.8.5-44.el7,它被软件包 gcc-c++-4.8.5-44.el7.x86_64 需要
--> 正在检查事务
---> 软件包 libstdc++.x86_64.0.4.8.5-16.el7 将被 升级
---> 软件包 libstdc++.x86_64.0.4.8.5-44.el7 将被 更新
---> 软件包 libstdc++-devel.x86_64.0.4.8.5-44.el7 将被 安装
--> 解决依赖关系完成依赖关系解决================================================================================================================================================Package 架构 版本 源 大小
================================================================================================================================================
正在安装:gcc-c++ x86_64 4.8.5-44.el7 base 7.2 M
为依赖而安装:libstdc++-devel x86_64 4.8.5-44.el7 base 1.5 M
为依赖而更新:libstdc++ x86_64 4.8.5-44.el7 base 306 k事务概要
================================================================================================================================================
安装 1 软件包 (+1 依赖软件包)
升级 ( 1 依赖软件包)总计:9.0 M
总下载量:8.7 M
Is this ok [y/d/N]: y
Downloading packages:
gcc-c++-4.8.5-44.el7.x86_64.rp FAILED ] 0.0 B/s | 0 B --:--:-- ETA
http://mirrors.163.com/centos/7.9.2009/os/x86_64/Packages/gcc-c%2B%2B-4.8.5-44.el7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found-:--:-- ETA
正在尝试其它镜像。
To address this issue please refer to the below knowledge base article https://access.redhat.com/articles/1320623If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/(1/2): libstdc++-devel-4.8.5-44.el7.x86_64.rpm | 1.5 MB 00:00:01
gcc-c++-4.8.5-44.el7.x86_64.rp FAILED
http://mirrors.bupt.edu.cn/centos/7.9.2009/os/x86_64/Packages/gcc-c%2B%2B-4.8.5-44.el7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found:04 ETA
正在尝试其它镜像。
(2/2): gcc-c++-4.8.5-44.el7.x86_64.rpm | 7.2 MB 00:00:01
------------------------------------------------------------------------------------------------------------------------------------------------
总计 2.4 MB/s | 8.7 MB 00:00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在更新 : libstdc++-4.8.5-44.el7.x86_64 1/4 正在安装 : libstdc++-devel-4.8.5-44.el7.x86_64 2/4 正在安装 : gcc-c++-4.8.5-44.el7.x86_64 3/4 清理 : libstdc++-4.8.5-16.el7.x86_64 4/4 验证中 : gcc-c++-4.8.5-44.el7.x86_64 1/4 验证中 : libstdc++-devel-4.8.5-44.el7.x86_64 2/4 验证中 : libstdc++-4.8.5-44.el7.x86_64 3/4 验证中 : libstdc++-4.8.5-16.el7.x86_64 4/4 已安装:gcc-c++.x86_64 0:4.8.5-44.el7 作为依赖被安装:libstdc++-devel.x86_64 0:4.8.5-44.el7 作为依赖被升级:libstdc++.x86_64 0:4.8.5-44.el7 完毕!
5、tar -zxvf pcre-8.37.tar.gz
[root@localhost nginx]
pcre-8.37/
pcre-8.37/pcre_scanner.h
pcre-8.37/LICENCE
pcre-8.37/makevp_c.txt
pcre-8.37/PrepareRelease
pcre-8.37/RunTest.bat
pcre-8.37/pcre16_study.c
pcre-8.37/pcre16_chartables.c
6、./configure
[root@localhost nginx]
[root@localhost pcre-8.37]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
7、make
[root@localhost pcre-8.37]
rm -f pcre_chartables.c
ln -s ./pcre_chartables.c.dist pcre_chartables.c
make all-am
make[1]: 进入目录“/opt/tool/nginx/pcre-8.37”CC libpcre_la-pcre_byte_order.loCC libpcre_la-pcre_compile.loCC libpcre_la-pcre_config.loCC libpcre_la-pcre_dfa_exec.lo
8、make install
[root@localhost pcre-8.37]
make install-am
make[1]: 进入目录“/opt/tool/nginx/pcre-8.37”
make[2]: 进入目录“/opt/tool/nginx/pcre-8.37”/usr/bin/mkdir -p '/usr/local/lib'
9、tar -zxvf openssl-1.0.1t.tar.gz
[root@localhost nginx]
总用量 8064
-rw-r--r--. 1 root root 1061461 3月 9 2023 nginx-1.20.1.tar.gz
-rw-r--r--. 1 root root 4556447 3月 9 2023 openssl-1.0.1t.tar.gz
drwxr-xr-x. 9 1169 1169 12288 7月 4 23:33 pcre-8.37
-rw-r--r--. 1 root root 2041593 3月 9 2023 pcre-8.37.tar.gz
-rw-r--r--. 1 root root 571091 3月 9 2023 zlib-1.2.8.tar.gz
[root@localhost nginx]
openssl-1.0.1t/ACKNOWLEDGMENTS
openssl-1.0.1t/apps/
openssl-1.0.1t/apps/app_rand.c
openssl-1.0.1t/apps/apps.c
openssl-1.0.1t/apps/apps.h
openssl-1.0.1t/apps/asn1pars.c
10、./config
[root@localhost nginx]
[root@localhost openssl-1.0.1t]
Operating system: x86_64-whatever-linux2
Configuring for linux-x86_64
Configuring for linux-x86_64no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)no-gmp [default] OPENSSL_NO_GMP (skip dir)no-jpake [experimental] OPENSSL_NO_JPAKE (skip dir)no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5no-md2 [default] OPENSSL_NO_MD2 (skip dir)no-rc5 [default] OPENSSL_NO_RC5 (skip dir)
11、/config
[root@localhost nginx]
[root@localhost openssl-1.0.1t]
Operating system: x86_64-whatever-linux2
Configuring for linux-x86_64
Configuring for linux-x86_64no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)no-gmp [default] OPENSSL_NO_GMP (skip dir)no-jpake [experimental] OPENSSL_NO_JPAKE (skip dir)no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5no-md2 [default] OPENSSL_NO_MD2 (skip dir)no-rc5 [default] OPENSSL_NO_RC5 (skip dir)no-rfc3779 [default] OPENSSL_NO_RFC3779 (skip dir)