nginx 安装-适用于 Centos 7.x
[root@iZhp35weqb4z7gvuh357fbZ ~]
LSB Version: :core- 4. 1- amd64:core- 4. 1- noarch
Distributor ID: CentOS
Description: CentOS Linux release 7. 9. 2009 ( Core)
Release: 7. 9. 2009
Codename: Core
[root@iZhp35weqb4z7gvuh357fbZ ~]
[root@iZhp35weqb4z7gvuh357fbZ ~]
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
base
. . . . . . . . 中间省略了
作为依赖被安装:
keyutils- libs- devel. x86_64 0:1. 5. 8- 3. el7 krb5- devel. x86_64 0:1. 15. 1- 55. el7_9 libcom_err- devel. x86_64 0:1. 42. 9- 19. el7 libkadm5. x86_64 0:1. 15. 1- 55. el7_9
libselinux- devel. x86_64 0:2. 5- 15. el7 libsepol- devel. x86_64 0:2. 5- 10. el7 libverto- devel. x86_64 0:0. 2. 5- 4. el7
完毕!
[root@iZhp35weqb4z7gvuh357fbZ ~]
[root@iZhp35weqb4z7gvuh357fbZ ~]
[root@iZhp35weqb4z7gvuh357fbZ ~]
[root@iZhp35weqb4z7gvuh357fbZ software]
总用量 144484
- rw- r-- r-- 1 root root 146729827 9月 25 14:07 jdk- 8u421- linux- x64. tar. gz
- rw- r-- r-- 1 root root 1216580 9月 25 14:07 nginx- 1. 25. 3. tar. gz
[root@iZhp35weqb4z7gvuh357fbZ software]
[root@iZhp35weqb4z7gvuh357fbZ software]
[root@iZhp35weqb4z7gvuh357fbZ nginx]
总用量 1192
- rw- r-- r-- 1 root root 1216580 9月 25 14:07 nginx- 1. 25. 3. tar. gz
[root@iZhp35weqb4z7gvuh357fbZ nginx]
[root@iZhp35weqb4z7gvuh357fbZ nginx]
总用量 1196
drwxr- xr- x 8 1001 1001 4096 10月 24 2023 nginx- 1. 25. 3
- rw- r-- r-- 1 root root 1216580 9月 25 14:07 nginx- 1. 25. 3. tar. gz
[root@iZhp35weqb4z7gvuh357fbZ nginx]
[root@iZhp35weqb4z7gvuh357fbZ nginx-1.25.3]
checking for OS
+ Linux 3. 10. 0- 1160. 119. 1. el7. x86_64 x86_64
checking for C compiler . . . found
+ using GNU C compiler
+ gcc version: 4. 8. 5 20150623 ( Red Hat 4. 8. 5- 44) ( GCC)
checking for gcc - pipe switch . . . found
. . . . . 中间省略了
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
[root@iZhp35weqb4z7gvuh357fbZ nginx-1.25.3]
make - f objs/ Makefile
make[ 1] : 进入目录“/ usr/ nginx/ nginx- 1. 25. 3”
cc - c - pipe - O - W - Wall - Wpointer- arith - Wno- unused- parameter - Werror - g - I src/ core
. . . . 中间省略了
| | mkdir - p '/usr/local/nginx/logs'
test - d '/usr/local/nginx/logs' \
| | mkdir - p '/usr/local/nginx/logs'
test - d '/usr/local/nginx/html' \
| | cp - R html '/usr/local/nginx'
test - d '/usr/local/nginx/logs' \
| | mkdir - p '/usr/local/nginx/logs'
make[ 1] : 离开目录“/ usr/ nginx/ nginx- 1. 25. 3”
[root@iZhp35weqb4z7gvuh357fbZ nginx-1.25.3]
[root@iZhp35weqb4z7gvuh357fbZ sbin]
总用量 3840
- rwxr- xr- x 1 root root 3930936 9月 25 14:09 nginx
[root@iZhp35weqb4z7gvuh357fbZ sbin]
[root@iZhp35weqb4z7gvuh357fbZ sbin]
<! DOCTYPE html>
<html>
<head>
<title>Welcome to nginx! </ title>
<p><em>Thank you for using nginx. </ em></ p>
</ body>
</ html>
[root@iZhp35weqb4z7gvuh357fbZ sbin]
通过服务器IP访问,即