centos 7.0 安装nginx 1.11.7

百度nginx去官网下载

下载目录 解压目录 安装目录

/usr/etc

 

1.首先下载文件

[root@iZwz9g4tkk4ub8b17r32kpZ etc]# wget http://nginx.org/download/nginx-1.11.7.tar.gz
--2016-12-24 10:24:11-- http://nginx.org/download/nginx-1.11.7.tar.gz
Resolving nginx.org (nginx.org)... 95.211.80.227, 206.251.255.63, 2606:7100:1:69::3f, ...
Connecting to nginx.org (nginx.org)|95.211.80.227|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 962302 (940K) [application/octet-stream]
Saving to: ‘nginx-1.11.7.tar.gz’

100%[====================================================================================================================================================================================================================================>] 962,302 19.4KB/s in 44s

2016-12-24 10:24:58 (21.2 KB/s) - ‘nginx-1.11.7.tar.gz’ saved [962302/962302]

 

2.解压安装 

[root@iZwz9g4tkk4ub8b17r32kpZ etc]# tar zxvf nginx-1.11.7.tar.gz -C /usr/etc

进入解压目录

安装GCC 

 

这里完整的过程

[root@iZwz9g4tkk4ub8b17r32kpZ nginx-1.11.7]# yum -y install gcc-c++
Loaded plugins: langpacks
base                                                                                                                                                                                                                                                   | 3.6 kB  00:00:00     
epel                                                                                                                                                                                                                                                   | 4.3 kB  00:00:00     
extras                                                                                                                                                                                                                                                 | 3.4 kB  00:00:00     
updates                                                                                                                                                                                                                                                | 3.4 kB  00:00:00     
(1/7): base/7/x86_64/group_gz                                                                                                                                                                                                                          | 155 kB  00:00:00     
(2/7): epel/x86_64/group_gz                                                                                                                                                                                                                            | 170 kB  00:00:00     
(3/7): epel/x86_64/updateinfo                                                                                                                                                                                                                          | 693 kB  00:00:00     
(4/7): extras/7/x86_64/primary_db                                                                                                                                                                                                                      | 183 kB  00:00:00     
(5/7): updates/7/x86_64/primary_db                                                                                                                                                                                                                     | 1.2 MB  00:00:01     
(6/7): epel/x86_64/primary_db                                                                                                                                                                                                                          | 4.4 MB  00:00:04     
(7/7): base/7/x86_64/primary_db                                                                                                                                                                                                                        | 5.6 MB  00:00:05     
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package gcc-c++.x86_64 0:4.8.5-11.el7 will be an update
--> Processing Dependency: libstdc++-devel = 4.8.5-11.el7 for package: gcc-c++-4.8.5-11.el7.x86_64
--> Processing Dependency: libstdc++ = 4.8.5-11.el7 for package: gcc-c++-4.8.5-11.el7.x86_64
--> Processing Dependency: gcc = 4.8.5-11.el7 for package: gcc-c++-4.8.5-11.el7.x86_64
--> Running transaction check
---> Package gcc.x86_64 0:4.8.2-16.2.el7_0 will be updated
--> Processing Dependency: gcc = 4.8.2-16.2.el7_0 for package: gcc-gfortran-4.8.2-16.2.el7_0.x86_64
--> Processing Dependency: gcc = 4.8.2-16.2.el7_0 for package: libquadmath-devel-4.8.2-16.2.el7_0.x86_64
---> Package gcc.x86_64 0:4.8.5-11.el7 will be an update
--> Processing Dependency: libgomp = 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: cpp = 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libgcc >= 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
---> Package libstdc++.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package libstdc++.x86_64 0:4.8.5-11.el7 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package libstdc++-devel.x86_64 0:4.8.5-11.el7 will be an update
--> Running transaction check
---> Package cpp.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package cpp.x86_64 0:4.8.5-11.el7 will be an update
---> Package gcc-gfortran.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package gcc-gfortran.x86_64 0:4.8.5-11.el7 will be an update
--> Processing Dependency: libquadmath = 4.8.5-11.el7 for package: gcc-gfortran-4.8.5-11.el7.x86_64
--> Processing Dependency: libgfortran = 4.8.5-11.el7 for package: gcc-gfortran-4.8.5-11.el7.x86_64
---> Package libgcc.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package libgcc.x86_64 0:4.8.5-11.el7 will be an update
---> Package libgomp.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package libgomp.x86_64 0:4.8.5-11.el7 will be an update
---> Package libquadmath-devel.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package libquadmath-devel.x86_64 0:4.8.5-11.el7 will be an update
--> Running transaction check
---> Package libgfortran.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package libgfortran.x86_64 0:4.8.5-11.el7 will be an update
---> Package libquadmath.x86_64 0:4.8.2-16.2.el7_0 will be updated
---> Package libquadmath.x86_64 0:4.8.5-11.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                                  Arch                                                          Version                                                             Repository                                                   Size
==============================================================================================================================================================================================================================================================================
Updating:
 gcc-c++                                                                  x86_64                                                        4.8.5-11.el7                                                        base                                                        7.2 M
Updating for dependencies:
 cpp                                                                      x86_64                                                        4.8.5-11.el7                                                        base                                                        5.9 M
 gcc                                                                      x86_64                                                        4.8.5-11.el7                                                        base                                                         16 M
 gcc-gfortran                                                             x86_64                                                        4.8.5-11.el7                                                        base                                                        6.6 M
 libgcc                                                                   x86_64                                                        4.8.5-11.el7                                                        base                                                         97 k
 libgfortran                                                              x86_64                                                        4.8.5-11.el7                                                        base                                                        295 k
 libgomp                                                                  x86_64                                                        4.8.5-11.el7                                                        base                                                        152 k
 libquadmath                                                              x86_64                                                        4.8.5-11.el7                                                        base                                                        184 k
 libquadmath-devel                                                        x86_64                                                        4.8.5-11.el7                                                        base                                                         47 k
 libstdc++                                                                x86_64                                                        4.8.5-11.el7                                                        base                                                        300 k
 libstdc++-devel                                                          x86_64                                                        4.8.5-11.el7                                                        base                                                        1.5 M

Transaction Summary
==============================================================================================================================================================================================================================================================================
Upgrade  1 Package (+10 Dependent packages)

Total download size: 38 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/11): cpp-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                                    | 5.9 MB  00:00:05     
(2/11): gcc-c++-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                                | 7.2 MB  00:00:06     
(3/11): gcc-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                                    |  16 MB  00:00:16     
(4/11): libgcc-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                                 |  97 kB  00:00:00     
(5/11): libgfortran-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                            | 295 kB  00:00:00     
(6/11): libgomp-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                                | 152 kB  00:00:00     
(7/11): libquadmath-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                            | 184 kB  00:00:00     
(8/11): libquadmath-devel-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                      |  47 kB  00:00:00     
(9/11): libstdc++-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                              | 300 kB  00:00:00     
(10/11): libstdc++-devel-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                       | 1.5 MB  00:00:01     
(11/11): gcc-gfortran-4.8.5-11.el7.x86_64.rpm                                                                                                                                                                                                          | 6.6 MB  00:00:06     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                         2.0 MB/s |  38 MB  00:00:19     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libgcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                1/22 
  Updating   : libquadmath-4.8.5-11.el7.x86_64                                                                                                                                                                                                                           2/22 
  Updating   : libstdc++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                             3/22 
  Updating   : libstdc++-devel-4.8.5-11.el7.x86_64                                                                                                                                                                                                                       4/22 
  Updating   : libgfortran-4.8.5-11.el7.x86_64                                                                                                                                                                                                                           5/22 
  Updating   : libgomp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                               6/22 
  Updating   : cpp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                   7/22 
  Updating   : gcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                   8/22 
  Updating   : libquadmath-devel-4.8.5-11.el7.x86_64                                                                                                                                                                                                                     9/22 
  Updating   : gcc-gfortran-4.8.5-11.el7.x86_64                                                                                                                                                                                                                         10/22 
  Updating   : gcc-c++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                              11/22 
  Cleanup    : gcc-gfortran-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                     12/22 
  Cleanup    : gcc-c++-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                          13/22 
  Cleanup    : libquadmath-devel-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                14/22 
  Cleanup    : gcc-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                              15/22 
  Cleanup    : libgfortran-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                      16/22 
  Cleanup    : libstdc++-devel-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                  17/22 
  Cleanup    : libstdc++-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                        18/22 
  Cleanup    : libgcc-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                           19/22 
  Cleanup    : libquadmath-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                      20/22 
  Cleanup    : cpp-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                              21/22 
  Cleanup    : libgomp-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                          22/22 
  Verifying  : gcc-c++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                               1/22 
  Verifying  : libquadmath-4.8.5-11.el7.x86_64                                                                                                                                                                                                                           2/22 
  Verifying  : cpp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                   3/22 
  Verifying  : libgfortran-4.8.5-11.el7.x86_64                                                                                                                                                                                                                           4/22 
  Verifying  : libquadmath-devel-4.8.5-11.el7.x86_64                                                                                                                                                                                                                     5/22 
  Verifying  : libgcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                6/22 
  Verifying  : libstdc++-4.8.5-11.el7.x86_64                                                                                                                                                                                                                             7/22 
  Verifying  : gcc-gfortran-4.8.5-11.el7.x86_64                                                                                                                                                                                                                          8/22 
  Verifying  : libgomp-4.8.5-11.el7.x86_64                                                                                                                                                                                                                               9/22 
  Verifying  : gcc-4.8.5-11.el7.x86_64                                                                                                                                                                                                                                  10/22 
  Verifying  : libstdc++-devel-4.8.5-11.el7.x86_64                                                                                                                                                                                                                      11/22 
  Verifying  : libquadmath-devel-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                12/22 
  Verifying  : libgfortran-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                      13/22 
  Verifying  : gcc-gfortran-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                     14/22 
  Verifying  : cpp-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                              15/22 
  Verifying  : gcc-c++-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                          16/22 
  Verifying  : gcc-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                              17/22 
  Verifying  : libstdc++-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                        18/22 
  Verifying  : libgcc-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                           19/22 
  Verifying  : libgomp-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                          20/22 
  Verifying  : libquadmath-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                      21/22 
  Verifying  : libstdc++-devel-4.8.2-16.2.el7_0.x86_64                                                                                                                                                                                                                  22/22 

Updated:
  gcc-c++.x86_64 0:4.8.5-11.el7                                                                                                                                                                                                                                               

Dependency Updated:
  cpp.x86_64 0:4.8.5-11.el7                   gcc.x86_64 0:4.8.5-11.el7           gcc-gfortran.x86_64 0:4.8.5-11.el7        libgcc.x86_64 0:4.8.5-11.el7     libgfortran.x86_64 0:4.8.5-11.el7     libgomp.x86_64 0:4.8.5-11.el7     libquadmath.x86_64 0:4.8.5-11.el7    
  libquadmath-devel.x86_64 0:4.8.5-11.el7     libstdc++.x86_64 0:4.8.5-11.el7     libstdc++-devel.x86_64 0:4.8.5-11.el7    

Complete!

  

 

安装gzip   zlib-devel  

完整过程

[root@iZwz9g4tkk4ub8b17r32kpZ nginx-1.11.7]# yum -y install zlib-devel
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package zlib-devel.x86_64 0:1.2.7-17.el7 will be installed
--> Processing Dependency: zlib = 1.2.7-17.el7 for package: zlib-devel-1.2.7-17.el7.x86_64
--> Running transaction check
---> Package zlib.x86_64 0:1.2.7-13.el7 will be updated
---> Package zlib.x86_64 0:1.2.7-17.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                            Arch                                                           Version                                                                 Repository                                                    Size
==============================================================================================================================================================================================================================================================================
Installing:
 zlib-devel                                                         x86_64                                                         1.2.7-17.el7                                                            base                                                          50 k
Updating for dependencies:
 zlib                                                               x86_64                                                         1.2.7-17.el7                                                            base                                                          90 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  1 Package
Upgrade             ( 1 Dependent package)

Total download size: 140 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): zlib-devel-1.2.7-17.el7.x86_64.rpm                                                                                                                                                                                                              |  50 kB  00:00:00     
(2/2): zlib-1.2.7-17.el7.x86_64.rpm                                                                                                                                                                                                                    |  90 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                         383 kB/s | 140 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : zlib-1.2.7-17.el7.x86_64                                                                                                                                                                                                                                   1/3 
  Installing : zlib-devel-1.2.7-17.el7.x86_64                                                                                                                                                                                                                             2/3 
  Cleanup    : zlib-1.2.7-13.el7.x86_64                                                                                                                                                                                                                                   3/3 
  Verifying  : zlib-devel-1.2.7-17.el7.x86_64                                                                                                                                                                                                                             1/3 
  Verifying  : zlib-1.2.7-17.el7.x86_64                                                                                                                                                                                                                                   2/3 
  Verifying  : zlib-1.2.7-13.el7.x86_64                                                                                                                                                                                                                                   3/3 

Installed:
  zlib-devel.x86_64 0:1.2.7-17.el7                                                                                                                                                                                                                                            

Dependency Updated:
  zlib.x86_64 0:1.2.7-17.el7                                                                                                                                                                                                                                                  

Complete!

安装PCRE库

 这里用的阿里云 我在自己机子上测试的时候就没有装这个 不解~

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

 

下载地址

https://sourceforge.net/projects/pcre/files/pcre/  

下载

[root@iZwz9g4tkk4ub8b17r32kpZ etc]# wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.39/pcre-8.39.tar.gz

 

解压

[root@iZwz9g4tkk4ub8b17r32kpZ etc]# tar zxvf pcre-8.39.tar.gz -C /usr/etc

 

 进入解压目录

 

 

 编译安装

[root@iZwz9g4tkk4ub8b17r32kpZ pcre-8.39]# ./configure

完整过程

[root@iZwz9g4tkk4ub8b17r32kpZ pcre-8.39]# ./configure
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
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for int64_t... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether ln -s works... yes
checking whether the -Werror option is usable... yes
checking for simple visibility declarations... yes
checking for ANSI C header files... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for alias support in the linker... no
checking for alias support in the linker... no
checking string usability... yes
checking string presence... yes
checking for string... yes
checking bits/type_traits.h usability... no
checking bits/type_traits.h presence... no
checking for bits/type_traits.h... no
checking type_traits.h usability... no
checking type_traits.h presence... no
checking for type_traits.h... no
checking for strtoq... yes
checking for long long... yes
checking for unsigned long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for bcopy... yes
checking for memmove... yes
checking for strerror... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzopen in -lz... yes
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
checking for libbz2... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libpcre.pc
config.status: creating libpcre16.pc
config.status: creating libpcre32.pc
config.status: creating libpcreposix.pc
config.status: creating libpcrecpp.pc
config.status: creating pcre-config
config.status: creating pcre.h
config.status: creating pcre_stringpiece.h
config.status: creating pcrecpparg.h
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing script-chmod commands
config.status: executing delete-old-chartables commands

pcre-8.39 configuration summary:

    Install prefix .................. : /usr/local
    C preprocessor .................. : gcc -E
    C compiler ...................... : gcc
    C++ preprocessor ................ : g++ -E
    C++ compiler .................... : g++
    Linker .......................... : /usr/bin/ld -m elf_x86_64
    C preprocessor flags ............ : 
    C compiler flags ................ : -g -O2 -fvisibility=hidden
    C++ compiler flags .............. : -O2 -fvisibility=hidden -fvisibility-inlines-hidden
    Linker flags .................... : 
    Extra libraries ................. : 

    Build 8 bit pcre library ........ : yes
    Build 16 bit pcre library ....... : no
    Build 32 bit pcre library ....... : no
    Build C++ library ............... : yes
    Enable JIT compiling support .... : no
    Enable UTF-8/16/32 support ...... : no
    Unicode properties .............. : no
    Newline char/sequence ........... : lf
    \R matches only ANYCRLF ......... : no
    EBCDIC coding ................... : no
    EBCDIC code for NL .............. : n/a
    Rebuild char tables ............. : no
    Use stack recursion ............. : yes
    POSIX mem threshold ............. : 10
    Internal link size .............. : 2
    Nested parentheses limit ........ : 250
    Match limit ..................... : 10000000
    Match limit recursion ........... : MATCH_LIMIT
    Build shared libs ............... : yes
    Build static libs ............... : yes
    Use JIT in pcregrep ............. : no
    Buffer size for pcregrep ........ : 20480
    Link pcregrep with libz ......... : no
    Link pcregrep with libbz2 ....... : no
    Link pcretest with libedit ...... : no
    Link pcretest with libreadline .. : no
    Valgrind support ................ : no
    Code coverage ................... : no

make 安装

[root@iZwz9g4tkk4ub8b17r32kpZ pcre-8.39]# make
rm -f pcre_chartables.c
ln -s ./pcre_chartables.c.dist pcre_chartables.c
make  all-am
make[1]: Entering directory `/usr/etc/pcre-8.39'
  CC       libpcre_la-pcre_byte_order.lo
  CC       libpcre_la-pcre_compile.lo
  CC       libpcre_la-pcre_config.lo
  CC       libpcre_la-pcre_dfa_exec.lo
  CC       libpcre_la-pcre_exec.lo
  CC       libpcre_la-pcre_fullinfo.lo
  CC       libpcre_la-pcre_get.lo
  CC       libpcre_la-pcre_globals.lo
  CC       libpcre_la-pcre_jit_compile.lo
  CC       libpcre_la-pcre_maketables.lo
  CC       libpcre_la-pcre_newline.lo
  CC       libpcre_la-pcre_ord2utf8.lo
  CC       libpcre_la-pcre_refcount.lo
  CC       libpcre_la-pcre_string_utils.lo
  CC       libpcre_la-pcre_study.lo
  CC       libpcre_la-pcre_tables.lo
  CC       libpcre_la-pcre_ucd.lo
  CC       libpcre_la-pcre_valid_utf8.lo
  CC       libpcre_la-pcre_version.lo
  CC       libpcre_la-pcre_xclass.lo
  CC       libpcre_la-pcre_chartables.lo
  CCLD     libpcre.la
  CC       libpcreposix_la-pcreposix.lo
  CCLD     libpcreposix.la
  CXX      libpcrecpp_la-pcrecpp.lo
  CXX      libpcrecpp_la-pcre_scanner.lo
  CXX      libpcrecpp_la-pcre_stringpiece.lo
  CXXLD    libpcrecpp.la
  CC       pcretest-pcretest.o
  CC       pcretest-pcre_printint.o
  CCLD     pcretest
  CC       pcregrep-pcregrep.o
  CCLD     pcregrep
  CXX      pcrecpp_unittest-pcrecpp_unittest.o
  CXXLD    pcrecpp_unittest
  CXX      pcre_scanner_unittest-pcre_scanner_unittest.o
  CXXLD    pcre_scanner_unittest
  CXX      pcre_stringpiece_unittest-pcre_stringpiece_unittest.o
  CXXLD    pcre_stringpiece_unittest
make[1]: Leaving directory `/usr/etc/pcre-8.39'

make check检测是否正确

 

make install

[root@iZwz9g4tkk4ub8b17r32kpZ pcre-8.39]# make install
make  install-am
make[1]: Entering directory `/usr/etc/pcre-8.39'
make[2]: Entering directory `/usr/etc/pcre-8.39'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libpcre.la libpcreposix.la libpcrecpp.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libpcre.so.1.2.7 /usr/local/lib/libpcre.so.1.2.7
libtool: install: (cd /usr/local/lib && { ln -s -f libpcre.so.1.2.7 libpcre.so.1 || { rm -f libpcre.so.1 && ln -s libpcre.so.1.2.7 libpcre.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libpcre.so.1.2.7 libpcre.so || { rm -f libpcre.so && ln -s libpcre.so.1.2.7 libpcre.so; }; })
libtool: install: /usr/bin/install -c .libs/libpcre.lai /usr/local/lib/libpcre.la
libtool: warning: relinking 'libpcreposix.la'
libtool: install: (cd /usr/etc/pcre-8.39; /bin/sh "/usr/etc/pcre-8.39/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -g -O2 -version-info 0:4:0 -o libpcreposix.la -rpath /usr/local/lib libpcreposix_la-pcreposix.lo libpcre.la )
libtool: install: /usr/bin/install -c .libs/libpcreposix.so.0.0.4T /usr/local/lib/libpcreposix.so.0.0.4
libtool: install: (cd /usr/local/lib && { ln -s -f libpcreposix.so.0.0.4 libpcreposix.so.0 || { rm -f libpcreposix.so.0 && ln -s libpcreposix.so.0.0.4 libpcreposix.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libpcreposix.so.0.0.4 libpcreposix.so || { rm -f libpcreposix.so && ln -s libpcreposix.so.0.0.4 libpcreposix.so; }; })
libtool: install: /usr/bin/install -c .libs/libpcreposix.lai /usr/local/lib/libpcreposix.la
libtool: warning: relinking 'libpcrecpp.la'
libtool: install: (cd /usr/etc/pcre-8.39; /bin/sh "/usr/etc/pcre-8.39/libtool"  --silent --tag CXX --mode=relink g++ -fvisibility=hidden -fvisibility-inlines-hidden -O2 -version-info 0:1:0 -o libpcrecpp.la -rpath /usr/local/lib libpcrecpp_la-pcrecpp.lo libpcrecpp_la-pcre_scanner.lo libpcrecpp_la-pcre_stringpiece.lo libpcre.la )
libtool: install: /usr/bin/install -c .libs/libpcrecpp.so.0.0.1T /usr/local/lib/libpcrecpp.so.0.0.1
libtool: install: (cd /usr/local/lib && { ln -s -f libpcrecpp.so.0.0.1 libpcrecpp.so.0 || { rm -f libpcrecpp.so.0 && ln -s libpcrecpp.so.0.0.1 libpcrecpp.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libpcrecpp.so.0.0.1 libpcrecpp.so || { rm -f libpcrecpp.so && ln -s libpcrecpp.so.0.0.1 libpcrecpp.so; }; })
libtool: install: /usr/bin/install -c .libs/libpcrecpp.lai /usr/local/lib/libpcrecpp.la
libtool: install: /usr/bin/install -c .libs/libpcre.a /usr/local/lib/libpcre.a
libtool: install: chmod 644 /usr/local/lib/libpcre.a
libtool: install: ranlib /usr/local/lib/libpcre.a
libtool: install: /usr/bin/install -c .libs/libpcreposix.a /usr/local/lib/libpcreposix.a
libtool: install: chmod 644 /usr/local/lib/libpcreposix.a
libtool: install: ranlib /usr/local/lib/libpcreposix.a
libtool: install: /usr/bin/install -c .libs/libpcrecpp.a /usr/local/lib/libpcrecpp.a
libtool: install: chmod 644 /usr/local/lib/libpcrecpp.a
libtool: install: ranlib /usr/local/lib/libpcrecpp.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/usr/local/bin'
  /bin/sh ./libtool   --mode=install /usr/bin/install -c pcretest pcregrep '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/pcretest /usr/local/bin/pcretest
libtool: install: /usr/bin/install -c .libs/pcregrep /usr/local/bin/pcregrep
 /usr/bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c pcre-config '/usr/local/bin'
 /usr/bin/mkdir -p '/usr/local/share/doc/pcre'
 /usr/bin/install -c -m 644 doc/pcre.txt doc/pcre-config.txt doc/pcregrep.txt doc/pcretest.txt AUTHORS COPYING ChangeLog LICENCE NEWS README '/usr/local/share/doc/pcre'
 /usr/bin/mkdir -p '/usr/local/share/doc/pcre/html'
 /usr/bin/install -c -m 644 doc/html/NON-AUTOTOOLS-BUILD.txt doc/html/README.txt doc/html/index.html doc/html/pcre-config.html doc/html/pcre.html doc/html/pcre16.html doc/html/pcre32.html doc/html/pcre_assign_jit_stack.html doc/html/pcre_compile.html doc/html/pcre_compile2.html doc/html/pcre_config.html doc/html/pcre_copy_named_substring.html doc/html/pcre_copy_substring.html doc/html/pcre_dfa_exec.html doc/html/pcre_exec.html doc/html/pcre_free_study.html doc/html/pcre_free_substring.html doc/html/pcre_free_substring_list.html doc/html/pcre_fullinfo.html doc/html/pcre_get_named_substring.html doc/html/pcre_get_stringnumber.html doc/html/pcre_get_stringtable_entries.html doc/html/pcre_get_substring.html doc/html/pcre_get_substring_list.html doc/html/pcre_jit_exec.html doc/html/pcre_jit_stack_alloc.html doc/html/pcre_jit_stack_free.html doc/html/pcre_maketables.html doc/html/pcre_pattern_to_host_byte_order.html doc/html/pcre_refcount.html doc/html/pcre_study.html doc/html/pcre_utf16_to_host_byte_order.html doc/html/pcre_utf32_to_host_byte_order.html doc/html/pcre_version.html doc/html/pcreapi.html doc/html/pcrebuild.html doc/html/pcrecallout.html doc/html/pcrecompat.html doc/html/pcredemo.html doc/html/pcregrep.html '/usr/local/share/doc/pcre/html'
 /usr/bin/install -c -m 644 doc/html/pcrejit.html doc/html/pcrelimits.html doc/html/pcrematching.html doc/html/pcrepartial.html doc/html/pcrepattern.html doc/html/pcreperform.html doc/html/pcreposix.html doc/html/pcreprecompile.html doc/html/pcresample.html doc/html/pcrestack.html doc/html/pcresyntax.html doc/html/pcretest.html doc/html/pcreunicode.html '/usr/local/share/doc/pcre/html'
 /usr/bin/mkdir -p '/usr/local/share/doc/pcre/html'
 /usr/bin/install -c -m 644 doc/html/pcrecpp.html '/usr/local/share/doc/pcre/html'
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 pcreposix.h pcrecpp.h pcre_scanner.h '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 doc/pcre-config.1 doc/pcregrep.1 doc/pcretest.1 '/usr/local/share/man/man1'
 /usr/bin/mkdir -p '/usr/local/share/man/man3'
 /usr/bin/install -c -m 644 doc/pcre.3 doc/pcre16.3 doc/pcre32.3 doc/pcre_assign_jit_stack.3 doc/pcre_compile.3 doc/pcre_compile2.3 doc/pcre_config.3 doc/pcre_copy_named_substring.3 doc/pcre_copy_substring.3 doc/pcre_dfa_exec.3 doc/pcre_exec.3 doc/pcre_free_study.3 doc/pcre_free_substring.3 doc/pcre_free_substring_list.3 doc/pcre_fullinfo.3 doc/pcre_get_named_substring.3 doc/pcre_get_stringnumber.3 doc/pcre_get_stringtable_entries.3 doc/pcre_get_substring.3 doc/pcre_get_substring_list.3 doc/pcre_jit_exec.3 doc/pcre_jit_stack_alloc.3 doc/pcre_jit_stack_free.3 doc/pcre_maketables.3 doc/pcre_pattern_to_host_byte_order.3 doc/pcre_refcount.3 doc/pcre_study.3 doc/pcre_utf16_to_host_byte_order.3 doc/pcre_utf32_to_host_byte_order.3 doc/pcre_version.3 doc/pcreapi.3 doc/pcrebuild.3 doc/pcrecallout.3 doc/pcrecompat.3 doc/pcredemo.3 doc/pcrejit.3 doc/pcrelimits.3 doc/pcrematching.3 doc/pcrepartial.3 doc/pcrepattern.3 '/usr/local/share/man/man3'
 /usr/bin/install -c -m 644 doc/pcreperform.3 doc/pcreposix.3 doc/pcreprecompile.3 doc/pcresample.3 doc/pcrestack.3 doc/pcresyntax.3 doc/pcreunicode.3 doc/pcrecpp.3 '/usr/local/share/man/man3'
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 pcre.h pcrecpparg.h pcre_stringpiece.h '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libpcre.pc libpcreposix.pc libpcrecpp.pc '/usr/local/lib/pkgconfig'
make  install-data-hook
make[3]: Entering directory `/usr/etc/pcre-8.39'
ln -sf pcre_assign_jit_stack.3		 /usr/local/share/man/man3/pcre16_assign_jit_stack.3
ln -sf pcre_compile.3			 /usr/local/share/man/man3/pcre16_compile.3
ln -sf pcre_compile2.3			 /usr/local/share/man/man3/pcre16_compile2.3
ln -sf pcre_config.3			 /usr/local/share/man/man3/pcre16_config.3
ln -sf pcre_copy_named_substring.3	 /usr/local/share/man/man3/pcre16_copy_named_substring.3
ln -sf pcre_copy_substring.3		 /usr/local/share/man/man3/pcre16_copy_substring.3
ln -sf pcre_dfa_exec.3			 /usr/local/share/man/man3/pcre16_dfa_exec.3
ln -sf pcre_exec.3			 /usr/local/share/man/man3/pcre16_exec.3
ln -sf pcre_free_study.3		 /usr/local/share/man/man3/pcre16_free_study.3
ln -sf pcre_free_substring.3		 /usr/local/share/man/man3/pcre16_free_substring.3
ln -sf pcre_free_substring_list.3	 /usr/local/share/man/man3/pcre16_free_substring_list.3
ln -sf pcre_fullinfo.3			 /usr/local/share/man/man3/pcre16_fullinfo.3
ln -sf pcre_get_named_substring.3	 /usr/local/share/man/man3/pcre16_get_named_substring.3
ln -sf pcre_get_stringnumber.3		 /usr/local/share/man/man3/pcre16_get_stringnumber.3
ln -sf pcre_get_stringtable_entries.3	 /usr/local/share/man/man3/pcre16_get_stringtable_entries.3
ln -sf pcre_get_substring.3		 /usr/local/share/man/man3/pcre16_get_substring.3
ln -sf pcre_get_substring_list.3	 /usr/local/share/man/man3/pcre16_get_substring_list.3
ln -sf pcre_jit_exec.3			 /usr/local/share/man/man3/pcre16_jit_exec.3
ln -sf pcre_jit_stack_alloc.3		 /usr/local/share/man/man3/pcre16_jit_stack_alloc.3
ln -sf pcre_jit_stack_free.3		 /usr/local/share/man/man3/pcre16_jit_stack_free.3
ln -sf pcre_maketables.3		 /usr/local/share/man/man3/pcre16_maketables.3
ln -sf pcre_pattern_to_host_byte_order.3 /usr/local/share/man/man3/pcre16_pattern_to_host_byte_order.3
ln -sf pcre_refcount.3			 /usr/local/share/man/man3/pcre16_refcount.3
ln -sf pcre_study.3			 /usr/local/share/man/man3/pcre16_study.3
ln -sf pcre_utf16_to_host_byte_order.3	 /usr/local/share/man/man3/pcre16_utf16_to_host_byte_order.3
ln -sf pcre_version.3			 /usr/local/share/man/man3/pcre16_version.3
ln -sf pcre_assign_jit_stack.3		 /usr/local/share/man/man3/pcre32_assign_jit_stack.3
ln -sf pcre_compile.3			 /usr/local/share/man/man3/pcre32_compile.3
ln -sf pcre_compile2.3			 /usr/local/share/man/man3/pcre32_compile2.3
ln -sf pcre_config.3			 /usr/local/share/man/man3/pcre32_config.3
ln -sf pcre_copy_named_substring.3	 /usr/local/share/man/man3/pcre32_copy_named_substring.3
ln -sf pcre_copy_substring.3		 /usr/local/share/man/man3/pcre32_copy_substring.3
ln -sf pcre_dfa_exec.3			 /usr/local/share/man/man3/pcre32_dfa_exec.3
ln -sf pcre_exec.3			 /usr/local/share/man/man3/pcre32_exec.3
ln -sf pcre_free_study.3		 /usr/local/share/man/man3/pcre32_free_study.3
ln -sf pcre_free_substring.3		 /usr/local/share/man/man3/pcre32_free_substring.3
ln -sf pcre_free_substring_list.3	 /usr/local/share/man/man3/pcre32_free_substring_list.3
ln -sf pcre_fullinfo.3			 /usr/local/share/man/man3/pcre32_fullinfo.3
ln -sf pcre_get_named_substring.3	 /usr/local/share/man/man3/pcre32_get_named_substring.3
ln -sf pcre_get_stringnumber.3		 /usr/local/share/man/man3/pcre32_get_stringnumber.3
ln -sf pcre_get_stringtable_entries.3	 /usr/local/share/man/man3/pcre32_get_stringtable_entries.3
ln -sf pcre_get_substring.3		 /usr/local/share/man/man3/pcre32_get_substring.3
ln -sf pcre_get_substring_list.3	 /usr/local/share/man/man3/pcre32_get_substring_list.3
ln -sf pcre_jit_exec.3			 /usr/local/share/man/man3/pcre32_jit_exec.3
ln -sf pcre_jit_stack_alloc.3		 /usr/local/share/man/man3/pcre32_jit_stack_alloc.3
ln -sf pcre_jit_stack_free.3		 /usr/local/share/man/man3/pcre32_jit_stack_free.3
ln -sf pcre_maketables.3		 /usr/local/share/man/man3/pcre32_maketables.3
ln -sf pcre_pattern_to_host_byte_order.3 /usr/local/share/man/man3/pcre32_pattern_to_host_byte_order.3
ln -sf pcre_refcount.3			 /usr/local/share/man/man3/pcre32_refcount.3
ln -sf pcre_study.3			 /usr/local/share/man/man3/pcre32_study.3
ln -sf pcre_utf32_to_host_byte_order.3	 /usr/local/share/man/man3/pcre32_utf32_to_host_byte_order.3
ln -sf pcre_version.3			 /usr/local/share/man/man3/pcre32_version.3
make[3]: Leaving directory `/usr/etc/pcre-8.39'
make[2]: Leaving directory `/usr/etc/pcre-8.39'
make[1]: Leaving directory `/usr/etc/pcre-8.39'

  

 cd /usr/etc

mkdir nginx 

[root@iZwz9g4tkk4ub8b17r32kpZ etc]# chmod +rw nginx

 阿里云下面这部编译 无法生成文件不知道为什么?准备用yum安装了

这部分解决:在解压目录里执行完

在解压目录 make mak instal 

解决80端口占用 

sudo fuser -k 80/tcp

 

 

编译nginx

[root@iZwz9g4tkk4ub8b17r32kpZ nginx-1.11.7]# ./configure --prefix=/usr/etc/nginx1117 --without-http_rewrite_module

完整过程

[root@iZwz9g4tkk4ub8b17r32kpZ nginx-1.11.7]# ./configure --prefix=/usr/etc/nginx1117 --without-http_rewrite_module
checking for OS
 + Linux 3.10.0-123.9.3.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-11) (GCC) 
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for EPOLLEXCLUSIVE ... not found
checking for O_PATH ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for SO_BINDANY ... not found
checking for IP_BIND_ADDRESS_NO_PORT ... not found
checking for IP_TRANSPARENT ... found
checking for IP_BINDANY ... not found
checking for IP_RECVDSTADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... not found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for eventfd() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint32_t ... found
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for zlib library ... found
creating objs/Makefile

Configuration summary
  + PCRE library is not used
  + OpenSSL library is not used
  + using system zlib library

  nginx path prefix: "/usr/etc/nginx1117"
  nginx binary file: "/usr/etc/nginx1117/sbin/nginx"
  nginx modules path: "/usr/etc/nginx1117/modules"
  nginx configuration prefix: "/usr/etc/nginx1117/conf"
  nginx configuration file: "/usr/etc/nginx1117/conf/nginx.conf"
  nginx pid file: "/usr/etc/nginx1117/logs/nginx.pid"
  nginx error log file: "/usr/etc/nginx1117/logs/error.log"
  nginx http access log file: "/usr/etc/nginx1117/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  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"

  

启动nginx

cd /usr/etc/nginx/sbin

./nginx

 

 

 

 


 

因为上面nginx总是无法生成文件 所有下面这里用yum安装

[root@iZwz9g4tkk4ub8b17r32kpZ /]# yum -y install nginx

[root@iZwz9g4tkk4ub8b17r32kpZ /]# yum -y install nginx
Loaded plugins: langpacks
base                                                                                                                                                                                                                                                   | 3.6 kB  00:00:00     
epel                                                                                                                                                                                                                                                   | 4.3 kB  00:00:00     
extras                                                                                                                                                                                                                                                 | 3.4 kB  00:00:00     
updates                                                                                                                                                                                                                                                | 3.4 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.10.2-1.el7 will be installed
--> Processing Dependency: nginx-filesystem = 1:1.10.2-1.el7 for package: 1:nginx-1.10.2-1.el7.x86_64
--> Processing Dependency: nginx-all-modules = 1:1.10.2-1.el7 for package: 1:nginx-1.10.2-1.el7.x86_64
--> Processing Dependency: nginx-filesystem for package: 1:nginx-1.10.2-1.el7.x86_64
--> Processing Dependency: libprofiler.so.0()(64bit) for package: 1:nginx-1.10.2-1.el7.x86_64
--> Running transaction check
---> Package gperftools-libs.x86_64 0:2.4-8.el7 will be installed
--> Processing Dependency: libunwind.so.8()(64bit) for package: gperftools-libs-2.4-8.el7.x86_64
---> Package nginx-all-modules.noarch 1:1.10.2-1.el7 will be installed
--> Processing Dependency: nginx-mod-stream = 1:1.10.2-1.el7 for package: 1:nginx-all-modules-1.10.2-1.el7.noarch
--> Processing Dependency: nginx-mod-mail = 1:1.10.2-1.el7 for package: 1:nginx-all-modules-1.10.2-1.el7.noarch
--> Processing Dependency: nginx-mod-http-xslt-filter = 1:1.10.2-1.el7 for package: 1:nginx-all-modules-1.10.2-1.el7.noarch
--> Processing Dependency: nginx-mod-http-perl = 1:1.10.2-1.el7 for package: 1:nginx-all-modules-1.10.2-1.el7.noarch
--> Processing Dependency: nginx-mod-http-image-filter = 1:1.10.2-1.el7 for package: 1:nginx-all-modules-1.10.2-1.el7.noarch
--> Processing Dependency: nginx-mod-http-geoip = 1:1.10.2-1.el7 for package: 1:nginx-all-modules-1.10.2-1.el7.noarch
---> Package nginx-filesystem.noarch 1:1.10.2-1.el7 will be installed
--> Running transaction check
---> Package libunwind.x86_64 2:1.1-5.el7_2.2 will be installed
---> Package nginx-mod-http-geoip.x86_64 1:1.10.2-1.el7 will be installed
--> Processing Dependency: GeoIP for package: 1:nginx-mod-http-geoip-1.10.2-1.el7.x86_64
--> Processing Dependency: libGeoIP.so.1()(64bit) for package: 1:nginx-mod-http-geoip-1.10.2-1.el7.x86_64
---> Package nginx-mod-http-image-filter.x86_64 1:1.10.2-1.el7 will be installed
--> Processing Dependency: gd for package: 1:nginx-mod-http-image-filter-1.10.2-1.el7.x86_64
--> Processing Dependency: libgd.so.2()(64bit) for package: 1:nginx-mod-http-image-filter-1.10.2-1.el7.x86_64
---> Package nginx-mod-http-perl.x86_64 1:1.10.2-1.el7 will be installed
---> Package nginx-mod-http-xslt-filter.x86_64 1:1.10.2-1.el7 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: 1:nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: 1:nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: 1:nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: 1:nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64
---> Package nginx-mod-mail.x86_64 1:1.10.2-1.el7 will be installed
---> Package nginx-mod-stream.x86_64 1:1.10.2-1.el7 will be installed
--> Running transaction check
---> Package GeoIP.x86_64 0:1.5.0-11.el7 will be installed
---> Package gd.x86_64 0:2.0.35-26.el7 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: gd-2.0.35-26.el7.x86_64
---> Package libxslt.x86_64 0:1.1.28-5.el7 will be installed
--> Running transaction check
---> Package libXpm.x86_64 0:3.5.11-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                                        Arch                                                      Version                                                               Repository                                               Size
==============================================================================================================================================================================================================================================================================
Installing:
 nginx                                                                          x86_64                                                    1:1.10.2-1.el7                                                        epel                                                    505 k
Installing for dependencies:
 GeoIP                                                                          x86_64                                                    1.5.0-11.el7                                                          base                                                    1.1 M
 gd                                                                             x86_64                                                    2.0.35-26.el7                                                         base                                                    146 k
 gperftools-libs                                                                x86_64                                                    2.4-8.el7                                                             base                                                    272 k
 libXpm                                                                         x86_64                                                    3.5.11-3.el7                                                          base                                                     54 k
 libunwind                                                                      x86_64                                                    2:1.1-5.el7_2.2                                                       base                                                     56 k
 libxslt                                                                        x86_64                                                    1.1.28-5.el7                                                          base                                                    242 k
 nginx-all-modules                                                              noarch                                                    1:1.10.2-1.el7                                                        epel                                                     16 k
 nginx-filesystem                                                               noarch                                                    1:1.10.2-1.el7                                                        epel                                                     17 k
 nginx-mod-http-geoip                                                           x86_64                                                    1:1.10.2-1.el7                                                        epel                                                     23 k
 nginx-mod-http-image-filter                                                    x86_64                                                    1:1.10.2-1.el7                                                        epel                                                     26 k
 nginx-mod-http-perl                                                            x86_64                                                    1:1.10.2-1.el7                                                        epel                                                     35 k
 nginx-mod-http-xslt-filter                                                     x86_64                                                    1:1.10.2-1.el7                                                        epel                                                     25 k
 nginx-mod-mail                                                                 x86_64                                                    1:1.10.2-1.el7                                                        epel                                                     53 k
 nginx-mod-stream                                                               x86_64                                                    1:1.10.2-1.el7                                                        epel                                                     46 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  1 Package (+14 Dependent packages)

Total download size: 2.5 M
Installed size: 7.1 M
Downloading packages:
(1/15): gd-2.0.35-26.el7.x86_64.rpm                                                                                                                                                                                                                    | 146 kB  00:00:00     
(2/15): gperftools-libs-2.4-8.el7.x86_64.rpm                                                                                                                                                                                                           | 272 kB  00:00:00     
(3/15): libXpm-3.5.11-3.el7.x86_64.rpm                                                                                                                                                                                                                 |  54 kB  00:00:00     
(4/15): libunwind-1.1-5.el7_2.2.x86_64.rpm                                                                                                                                                                                                             |  56 kB  00:00:00     
(5/15): libxslt-1.1.28-5.el7.x86_64.rpm                                                                                                                                                                                                                | 242 kB  00:00:00     
(6/15): nginx-all-modules-1.10.2-1.el7.noarch.rpm                                                                                                                                                                                                      |  16 kB  00:00:00     
(7/15): nginx-filesystem-1.10.2-1.el7.noarch.rpm                                                                                                                                                                                                       |  17 kB  00:00:00     
(8/15): GeoIP-1.5.0-11.el7.x86_64.rpm                                                                                                                                                                                                                  | 1.1 MB  00:00:01     
(9/15): nginx-mod-http-geoip-1.10.2-1.el7.x86_64.rpm                                                                                                                                                                                                   |  23 kB  00:00:00     
(10/15): nginx-mod-http-image-filter-1.10.2-1.el7.x86_64.rpm                                                                                                                                                                                           |  26 kB  00:00:00     
(11/15): nginx-mod-http-perl-1.10.2-1.el7.x86_64.rpm                                                                                                                                                                                                   |  35 kB  00:00:00     
(12/15): nginx-1.10.2-1.el7.x86_64.rpm                                                                                                                                                                                                                 | 505 kB  00:00:00     
(13/15): nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64.rpm                                                                                                                                                                                            |  25 kB  00:00:00     
(14/15): nginx-mod-mail-1.10.2-1.el7.x86_64.rpm                                                                                                                                                                                                        |  53 kB  00:00:00     
(15/15): nginx-mod-stream-1.10.2-1.el7.x86_64.rpm                                                                                                                                                                                                      |  46 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                         1.5 MB/s | 2.5 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:libunwind-1.1-5.el7_2.2.x86_64                                                                                                                                                                                                                          1/15 
  Installing : gperftools-libs-2.4-8.el7.x86_64                                                                                                                                                                                                                          2/15 
  Installing : libxslt-1.1.28-5.el7.x86_64                                                                                                                                                                                                                               3/15 
  Installing : 1:nginx-filesystem-1.10.2-1.el7.noarch                                                                                                                                                                                                                    4/15 
  Installing : libXpm-3.5.11-3.el7.x86_64                                                                                                                                                                                                                                5/15 
  Installing : gd-2.0.35-26.el7.x86_64                                                                                                                                                                                                                                   6/15 
  Installing : GeoIP-1.5.0-11.el7.x86_64                                                                                                                                                                                                                                 7/15 
  Installing : 1:nginx-mod-http-perl-1.10.2-1.el7.x86_64                                                                                                                                                                                                                 8/15 
  Installing : 1:nginx-mod-mail-1.10.2-1.el7.x86_64                                                                                                                                                                                                                      9/15 
  Installing : 1:nginx-mod-http-geoip-1.10.2-1.el7.x86_64                                                                                                                                                                                                               10/15 
  Installing : 1:nginx-mod-http-image-filter-1.10.2-1.el7.x86_64                                                                                                                                                                                                        11/15 
  Installing : 1:nginx-mod-stream-1.10.2-1.el7.x86_64                                                                                                                                                                                                                   12/15 
  Installing : 1:nginx-1.10.2-1.el7.x86_64                                                                                                                                                                                                                              13/15 
  Installing : 1:nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64                                                                                                                                                                                                         14/15 
  Installing : 1:nginx-all-modules-1.10.2-1.el7.noarch                                                                                                                                                                                                                  15/15 
  Verifying  : 1:nginx-mod-http-xslt-filter-1.10.2-1.el7.x86_64                                                                                                                                                                                                          1/15 
  Verifying  : 1:nginx-mod-http-perl-1.10.2-1.el7.x86_64                                                                                                                                                                                                                 2/15 
  Verifying  : 1:nginx-mod-mail-1.10.2-1.el7.x86_64                                                                                                                                                                                                                      3/15 
  Verifying  : gperftools-libs-2.4-8.el7.x86_64                                                                                                                                                                                                                          4/15 
  Verifying  : GeoIP-1.5.0-11.el7.x86_64                                                                                                                                                                                                                                 5/15 
  Verifying  : 1:nginx-mod-http-geoip-1.10.2-1.el7.x86_64                                                                                                                                                                                                                6/15 
  Verifying  : 1:nginx-mod-http-image-filter-1.10.2-1.el7.x86_64                                                                                                                                                                                                         7/15 
  Verifying  : libXpm-3.5.11-3.el7.x86_64                                                                                                                                                                                                                                8/15 
  Verifying  : 1:nginx-mod-stream-1.10.2-1.el7.x86_64                                                                                                                                                                                                                    9/15 
  Verifying  : 1:nginx-all-modules-1.10.2-1.el7.noarch                                                                                                                                                                                                                  10/15 
  Verifying  : gd-2.0.35-26.el7.x86_64                                                                                                                                                                                                                                  11/15 
  Verifying  : 1:nginx-1.10.2-1.el7.x86_64                                                                                                                                                                                                                              12/15 
  Verifying  : 1:nginx-filesystem-1.10.2-1.el7.noarch                                                                                                                                                                                                                   13/15 
  Verifying  : libxslt-1.1.28-5.el7.x86_64                                                                                                                                                                                                                              14/15 
  Verifying  : 2:libunwind-1.1-5.el7_2.2.x86_64                                                                                                                                                                                                                         15/15 

Installed:
  nginx.x86_64 1:1.10.2-1.el7                                                                                                                                                                                                                                                 

Dependency Installed:
  GeoIP.x86_64 0:1.5.0-11.el7              gd.x86_64 0:2.0.35-26.el7               gperftools-libs.x86_64 0:2.4-8.el7          libXpm.x86_64 0:3.5.11-3.el7                       libunwind.x86_64 2:1.1-5.el7_2.2           libxslt.x86_64 0:1.1.28-5.el7                    
  nginx-all-modules.noarch 1:1.10.2-1.el7  nginx-filesystem.noarch 1:1.10.2-1.el7  nginx-mod-http-geoip.x86_64 1:1.10.2-1.el7  nginx-mod-http-image-filter.x86_64 1:1.10.2-1.el7  nginx-mod-http-perl.x86_64 1:1.10.2-1.el7  nginx-mod-http-xslt-filter.x86_64 1:1.10.2-1.el7 
  nginx-mod-mail.x86_64 1:1.10.2-1.el7     nginx-mod-stream.x86_64 1:1.10.2-1.el7 

Complete!

 启动nginx

 

[root@iZwz9g4tkk4ub8b17r32kpZ /]# systemctl start nginx.service

查看是否运行

 

查看文件位置

[root@iZwz9g4tkk4ub8b17r32kpZ /]# ps aux | grep nginx

 

1、判断apache
首先执行命令找到httpd路径
ps aux | grep httpd
如httpd路径为 /usr/local/apache/bin/httpd
然后执行以下命令
/usr/local/apache/bin/httpd -V | grep “SERVER_CONFIG_FILE”
即可找到编译时加载的配置文件路径 httpd.conf
-V 参数可以看到编译时配置的参数


2、判断nginx
首先执行命令找到nginx路径
ps aux | grep nginx
如nginx路径为
/usr/local/nginx/sbin/nginx
然后执行以下命令
/usr/local/nginx/sbin/nginx -V
默认放在安装目录下 conf/nginx.conf


3、判断MySQL
首先执行命令找到mysql路径
ps aux | grep mysqld
如mysqld路径为
/usr/bin/mysql
然后执行以下命令
/usr/bin/mysql –verbose –help | grep -A 1 ‘Default options’
或
/usr/bin/mysql –print-defaults


4、判断PHP加载的配置文件路径
(1)、可通过php函数phpinfo来查看,写个文件,然后用网址访问一下,查找“LoadedConfiguration File”对应的值即为php加载的配置文件
(2)、如果是nginx+php配置,也可以通过查找php执行路径
ps aux | grep php
如,路径为/usr/local/nginx/sbin/php-fpm
然后执行以下命令
/usr/local/nginx/sbin/php-fpm -i | grep “Loaded Configuration File”
即可看到php加载的配置文件
(3)、如果是apache+mod_php配置,也可以在apache配置文件中查看加载的php.ini路径。如 PHPIniDir“/usr/local/apache/conf/php.ini”
当然也有简单的方法,就是通过find来搜索
如
find / -name nginx.conf
find / -name php.ini
find / -name my.cnf
find / -name httpd.conf
这种找发要经过刷选才行

  

 

参考资料:

查看apache nginx mysql php配置文件位置

http://blog.csdn.net/wujunokay/article/details/51287334 查找配置文件位置(nginx)

查看配置信息

[root@iZwz9g4tkk4ub8b17r32kpZ /]# /usr/sbin/nginx -V

全部过程

[root@iZwz9g4tkk4ub8b17r32kpZ /]# /usr/sbin/nginx -V
nginx version: nginx/1.10.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) 
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'
[root@iZwz9g4tkk4ub8b17r32kpZ /]# 

  

 结合这里的文章 http://www.cnblogs.com/xxx91hx/p/5848602.html 编写  nginx.service  传到/usr/lib/systemd/system下

自启动

systemctl enable nginx.service 

查看自启动服务

 

PHP安装

[root@iZwz9g4tkk4ub8b17r32kpZ /]# yum -y install php
[root@iZwz9g4tkk4ub8b17r32kpZ /]# yum -y install php
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-42.el7 for package: php-5.4.16-42.el7.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.4.16-42.el7 for package: php-5.4.16-42.el7.x86_64
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: php-5.4.16-42.el7.x86_64
--> Processing Dependency: httpd for package: php-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-45.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-45.el7.centos for package: httpd-2.4.6-45.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-45.el7.centos.x86_64
---> Package php-cli.x86_64 0:5.4.16-42.el7 will be installed
---> Package php-common.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-45.el7.centos will be installed
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                           Arch                                                         Version                                                                      Repository                                                  Size
==============================================================================================================================================================================================================================================================================
Installing:
 php                                                               x86_64                                                       5.4.16-42.el7                                                                base                                                       1.4 M
Installing for dependencies:
 httpd                                                             x86_64                                                       2.4.6-45.el7.centos                                                          base                                                       2.7 M
 httpd-tools                                                       x86_64                                                       2.4.6-45.el7.centos                                                          base                                                        84 k
 libzip                                                            x86_64                                                       0.10.1-8.el7                                                                 base                                                        48 k
 mailcap                                                           noarch                                                       2.1.41-2.el7                                                                 base                                                        31 k
 php-cli                                                           x86_64                                                       5.4.16-42.el7                                                                base                                                       2.7 M
 php-common                                                        x86_64                                                       5.4.16-42.el7                                                                base                                                       564 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  1 Package (+6 Dependent packages)

Total download size: 7.5 M
Installed size: 27 M
Downloading packages:
(1/7): libzip-0.10.1-8.el7.x86_64.rpm                                                                                                                                                                                                                  |  48 kB  00:00:00     
(2/7): httpd-tools-2.4.6-45.el7.centos.x86_64.rpm                                                                                                                                                                                                      |  84 kB  00:00:00     
(3/7): mailcap-2.1.41-2.el7.noarch.rpm                                                                                                                                                                                                                 |  31 kB  00:00:00     
(4/7): php-5.4.16-42.el7.x86_64.rpm                                                                                                                                                                                                                    | 1.4 MB  00:00:00     
(5/7): httpd-2.4.6-45.el7.centos.x86_64.rpm                                                                                                                                                                                                            | 2.7 MB  00:00:02     
(6/7): php-common-5.4.16-42.el7.x86_64.rpm                                                                                                                                                                                                             | 564 kB  00:00:00     
(7/7): php-cli-5.4.16-42.el7.x86_64.rpm                                                                                                                                                                                                                | 2.7 MB  00:00:02     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                         2.4 MB/s | 7.5 MB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : httpd-tools-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                     1/7 
  Installing : libzip-0.10.1-8.el7.x86_64                                                                                                                                                                                                                                 2/7 
  Installing : php-common-5.4.16-42.el7.x86_64                                                                                                                                                                                                                            3/7 
  Installing : php-cli-5.4.16-42.el7.x86_64                                                                                                                                                                                                                               4/7 
  Installing : mailcap-2.1.41-2.el7.noarch                                                                                                                                                                                                                                5/7 
  Installing : httpd-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                           6/7 
  Installing : php-5.4.16-42.el7.x86_64                                                                                                                                                                                                                                   7/7 
  Verifying  : php-cli-5.4.16-42.el7.x86_64                                                                                                                                                                                                                               1/7 
  Verifying  : mailcap-2.1.41-2.el7.noarch                                                                                                                                                                                                                                2/7 
  Verifying  : php-common-5.4.16-42.el7.x86_64                                                                                                                                                                                                                            3/7 
  Verifying  : php-5.4.16-42.el7.x86_64                                                                                                                                                                                                                                   4/7 
  Verifying  : libzip-0.10.1-8.el7.x86_64                                                                                                                                                                                                                                 5/7 
  Verifying  : httpd-tools-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                     6/7 
  Verifying  : httpd-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                           7/7 

Installed:
  php.x86_64 0:5.4.16-42.el7                                                                                                                                                                                                                                                  

Dependency Installed:
  httpd.x86_64 0:2.4.6-45.el7.centos            httpd-tools.x86_64 0:2.4.6-45.el7.centos            libzip.x86_64 0:0.10.1-8.el7            mailcap.noarch 0:2.1.41-2.el7            php-cli.x86_64 0:5.4.16-42.el7            php-common.x86_64 0:5.4.16-42.el7           

Complete!

  

[root@iZwz9g4tkk4ub8b17r32kpZ /]# systemctl start php

[root@iZwz9g4tkk4ub8b17r32kpZ /]# systemctl start php
Failed to issue method call: Unit php.service failed to load: No such file or directory.
[root@iZwz9g4tkk4ub8b17r32kpZ /]# yum -y install php
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-42.el7 for package: php-5.4.16-42.el7.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.4.16-42.el7 for package: php-5.4.16-42.el7.x86_64
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: php-5.4.16-42.el7.x86_64
--> Processing Dependency: httpd for package: php-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-45.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-45.el7.centos for package: httpd-2.4.6-45.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-45.el7.centos.x86_64
---> Package php-cli.x86_64 0:5.4.16-42.el7 will be installed
---> Package php-common.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-45.el7.centos will be installed
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                           Arch                                                         Version                                                                      Repository                                                  Size
==============================================================================================================================================================================================================================================================================
Installing:
 php                                                               x86_64                                                       5.4.16-42.el7                                                                base                                                       1.4 M
Installing for dependencies:
 httpd                                                             x86_64                                                       2.4.6-45.el7.centos                                                          base                                                       2.7 M
 httpd-tools                                                       x86_64                                                       2.4.6-45.el7.centos                                                          base                                                        84 k
 libzip                                                            x86_64                                                       0.10.1-8.el7                                                                 base                                                        48 k
 mailcap                                                           noarch                                                       2.1.41-2.el7                                                                 base                                                        31 k
 php-cli                                                           x86_64                                                       5.4.16-42.el7                                                                base                                                       2.7 M
 php-common                                                        x86_64                                                       5.4.16-42.el7                                                                base                                                       564 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  1 Package (+6 Dependent packages)

Total download size: 7.5 M
Installed size: 27 M
Downloading packages:
(1/7): libzip-0.10.1-8.el7.x86_64.rpm                                                                                                                                                                                                                  |  48 kB  00:00:00     
(2/7): httpd-tools-2.4.6-45.el7.centos.x86_64.rpm                                                                                                                                                                                                      |  84 kB  00:00:00     
(3/7): mailcap-2.1.41-2.el7.noarch.rpm                                                                                                                                                                                                                 |  31 kB  00:00:00     
(4/7): php-5.4.16-42.el7.x86_64.rpm                                                                                                                                                                                                                    | 1.4 MB  00:00:00     
(5/7): httpd-2.4.6-45.el7.centos.x86_64.rpm                                                                                                                                                                                                            | 2.7 MB  00:00:02     
(6/7): php-common-5.4.16-42.el7.x86_64.rpm                                                                                                                                                                                                             | 564 kB  00:00:00     
(7/7): php-cli-5.4.16-42.el7.x86_64.rpm                                                                                                                                                                                                                | 2.7 MB  00:00:02     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                         2.4 MB/s | 7.5 MB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : httpd-tools-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                     1/7 
  Installing : libzip-0.10.1-8.el7.x86_64                                                                                                                                                                                                                                 2/7 
  Installing : php-common-5.4.16-42.el7.x86_64                                                                                                                                                                                                                            3/7 
  Installing : php-cli-5.4.16-42.el7.x86_64                                                                                                                                                                                                                               4/7 
  Installing : mailcap-2.1.41-2.el7.noarch                                                                                                                                                                                                                                5/7 
  Installing : httpd-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                           6/7 
  Installing : php-5.4.16-42.el7.x86_64                                                                                                                                                                                                                                   7/7 
  Verifying  : php-cli-5.4.16-42.el7.x86_64                                                                                                                                                                                                                               1/7 
  Verifying  : mailcap-2.1.41-2.el7.noarch                                                                                                                                                                                                                                2/7 
  Verifying  : php-common-5.4.16-42.el7.x86_64                                                                                                                                                                                                                            3/7 
  Verifying  : php-5.4.16-42.el7.x86_64                                                                                                                                                                                                                                   4/7 
  Verifying  : libzip-0.10.1-8.el7.x86_64                                                                                                                                                                                                                                 5/7 
  Verifying  : httpd-tools-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                     6/7 
  Verifying  : httpd-2.4.6-45.el7.centos.x86_64                                                                                                                                                                                                                           7/7 

Installed:
  php.x86_64 0:5.4.16-42.el7                                                                                                                                                                                                                                                  

Dependency Installed:
  httpd.x86_64 0:2.4.6-45.el7.centos            httpd-tools.x86_64 0:2.4.6-45.el7.centos            libzip.x86_64 0:0.10.1-8.el7            mailcap.noarch 0:2.1.41-2.el7            php-cli.x86_64 0:5.4.16-42.el7            php-common.x86_64 0:5.4.16-42.el7           

Complete!

  

 

 

MYSQL的安装

[root@iZwz9g4tkk4ub8b17r32kpZ /]# yum -y install mysql

[root@iZwz9g4tkk4ub8b17r32kpZ /]# yum -y install mysql
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.52-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.52-1.el7 for package: 1:mariadb-5.5.52-1.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.40-1.el7_0 will be updated
---> Package mariadb-libs.x86_64 1:5.5.52-1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                             Arch                                                          Version                                                                  Repository                                                   Size
==============================================================================================================================================================================================================================================================================
Installing:
 mariadb                                                             x86_64                                                        1:5.5.52-1.el7                                                           base                                                        8.7 M
Updating for dependencies:
 mariadb-libs                                                        x86_64                                                        1:5.5.52-1.el7                                                           base                                                        761 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  1 Package
Upgrade             ( 1 Dependent package)

Total download size: 9.5 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): mariadb-libs-5.5.52-1.el7.x86_64.rpm                                                                                                                                                                                                            | 761 kB  00:00:01     
(2/2): mariadb-5.5.52-1.el7.x86_64.rpm                                                                                                                                                                                                                 | 8.7 MB  00:00:08     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                         1.1 MB/s | 9.5 MB  00:00:08     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 1:mariadb-libs-5.5.52-1.el7.x86_64                                                                                                                                                                                                                         1/3 
  Installing : 1:mariadb-5.5.52-1.el7.x86_64                                                                                                                                                                                                                              2/3 
  Cleanup    : 1:mariadb-libs-5.5.40-1.el7_0.x86_64                                                                                                                                                                                                                       3/3 
  Verifying  : 1:mariadb-5.5.52-1.el7.x86_64                                                                                                                                                                                                                              1/3 
  Verifying  : 1:mariadb-libs-5.5.52-1.el7.x86_64                                                                                                                                                                                                                         2/3 
  Verifying  : 1:mariadb-libs-5.5.40-1.el7_0.x86_64                                                                                                                                                                                                                       3/3 

Installed:
  mariadb.x86_64 1:5.5.52-1.el7                                                                                                                                                                                                                                               

Dependency Updated:
  mariadb-libs.x86_64 1:5.5.52-1.el7                                                                                                                                                                                                                                          

Complete!

  

 

 

 

 

 

 




 

posted @ 2016-12-24 22:43  星耀学园  阅读(371)  评论(0)    收藏  举报