ms133 发表于 2018-11-11 07:16:57

Nginx程序部署及启动

  **Nginx程序部署及启动
  以下所有操作为centos6.7环境
  一、安装Nginx所需的pcre库
  Pcre:中文perl兼容正则表达式,官方网站:http://www.pcre.org/
  安装pcre库是为了使nginx支持HTTP Rewrite模块
  安装过程:
  1)安装Pcre软件
  # mkdir tools   #创建一个工具目录
  # ll
  drwxr-xr-x. 2 root root    6 4月24 15:49 tools
  #
  # mv pcre-8.42.tar.gz tools/
  # cd tools/
  # ll
  总用量 2036
  -rw-r--r--. 1 root root 2081413 7月24 01:12 pcre-8.42.tar.gz
  #
  # tar zxf pcre-8.42.tar.gz    #解压pcre包
  # ll
  总用量 2040
  drwxr-xr-x. 7 1169 1169    4096 3月20 18:53 pcre-8.42
  -rw-r--r--. 1 root root 2081413 7月24 01:12 pcre-8.42.tar.gz
  #
  # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
  --2018-07-24 01:30:08--ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
  => “pcre-8.40.tar.gz”
  正在解析主机 ftp.csx.cam.ac.uk... 131.111.8.115
  正在连接 ftp.csx.cam.ac.uk|131.111.8.115|:21... 已连接。
  正在以 anonymous 登录 ... 登录成功!
  ==> SYST ... 完成。    ==> PWD ... 完成。
  ==> TYPE I ... 完成。==> CWD (1) /pub/software/programming/pcre ... 完成。

  ==>>  ==> PASV ... 完成。    ==> RETR pcre-8.40.tar.gz ... 完成。
  长度:2065161 (2.0M) (非正式数据)
  37% [=======================>                                        ] 782,544      242K/s eta(英国中部时41% [=========================>                                    ] 859,656      246K/s eta(英国中部时45% [============================>                                 ] 938,196      253K/s eta(英国中部时49% [==============================>                                 ] 1,012,452    259K/s eta(英国中部时52% [================================>                               ] 1,086,708    264K/s eta(英国中部时56% [===================================>                            ] 1,169,532    277K/s eta(英国中部时60% [=====================================>                        ] 1,242,360    289K/s eta(英国中部时64% [=======================================>                        ] 1,322,328    296K/s eta(英国中部时67% [==========================================>                     ] 1,399,440    296K/s eta(英国中部时71% [============================================>                   ] 1,467,984    315K/s eta(英国中部时74% [==============================================>               ] 1,546,524    315K/s eta(英国中部时78% [=================================================>            ] 1,625,064    320K/s eta(英国中部时81% [===================================================>            ] 1,692,180    323K/s eta(英国中部时85% [=====================================================>          ] 1,759,296    322K/s eta(英国中部时88% [=======================================================>      ] 1,827,840    322K/s eta(英国中部时92% [==========================================================>   ] 1,909,236    324K/s eta(英国中部时95% [============================================================>   ] 1,982,064    328K/s eta(英国中部时100%[===============================================================>] 2,065,161    327K/s eta(英国中部时100%[===============================================================>] 2,065,161    327K/s   in 6.9s
  2018-07-24 01:30:18 (291 KB/s) - “pcre-8.40.tar.gz” 已保存
  # ll
  总用量 4060
  drwxr-xr-x. 7 1169 1169    4096 3月20 18:53 pcre-8.42
  -rw-r--r--. 1 root root 2081413 7月24 01:12 pcre-8.42.tar.gz
  #
  # cd pcre-8.42
以下是经典错误:
  # ./configure
  checking for gcc... no
  checking for cc... no
  checking for cl.exe... no
  configure: error: in `/root/ pcre-8.42':
  configure: error: no acceptable C compiler found in $PATH
解决办法:
  # *yum -y install gcc   #安装gcc工具**
  # ./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... /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... /bin/grep
  checking for egrep... /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-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking how to print strings... printf
  checking for a sed that does not truncate output... /bin/sed
  checking for fgrep... /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... 1966080
  checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
  checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop

  checking for /usr/bin/ld option to>  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... /bin/dd
  checking how to truncate binary pipes... /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>  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.42 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>  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>  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
  # echo $?   #确认上一条命令“./configure”执行是否成功
  0
  #
  # make && make install      #编译安装
  rm -f pcre_chartables.c
  ln -s ./pcre_chartables.c.dist pcre_chartables.c
  makeall-am
  make: Entering directory /root/tools/pcre-8.42'CC       libpcre_la-pcre_byte_order.loCC       libpcre_la-pcre_compile.loCC       libpcre_la-pcre_config.loCC       libpcre_la-pcre_dfa_exec.loCC       libpcre_la-pcre_exec.loCC       libpcre_la-pcre_fullinfo.loCC       libpcre_la-pcre_get.loCC       libpcre_la-pcre_globals.loCC       libpcre_la-pcre_jit_compile.loCC       libpcre_la-pcre_maketables.loCC       libpcre_la-pcre_newline.loCC       libpcre_la-pcre_ord2utf8.loCC       libpcre_la-pcre_refcount.loCC       libpcre_la-pcre_string_utils.loCC       libpcre_la-pcre_study.loCC       libpcre_la-pcre_tables.loCC       libpcre_la-pcre_ucd.loCC       libpcre_la-pcre_valid_utf8.loCC       libpcre_la-pcre_version.loCC       libpcre_la-pcre_xclass.loCC       libpcre_la-pcre_chartables.loCCLD   libpcre.laCC       libpcreposix_la-pcreposix.loCCLD   libpcreposix.laCXX      libpcrecpp_la-pcrecpp.loCXX      libpcrecpp_la-pcre_scanner.loCXX      libpcrecpp_la-pcre_stringpiece.loCXXLD    libpcrecpp.laCC       pcretest-pcretest.oCC       pcretest-pcre_printint.oCCLD   pcretestCC       pcregrep-pcregrep.oCCLD   pcregrepCXX      pcrecpp_unittest-pcrecpp_unittest.oCXXLD    pcrecpp_unittestCXX      pcre_scanner_unittest-pcre_scanner_unittest.oCXXLD    pcre_scanner_unittestCXX      pcre_stringpiece_unittest-pcre_stringpiece_unittest.oCXXLD    pcre_stringpiece_unittestmake: Leaving directory/root/tools/pcre-8.42'
  makeinstall-am
  make: Entering directory /root/tools/pcre-8.42'make: Warning: File/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/limits.h' has modification time 6.4e+06 s in the future
  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: Entering directory /root/tools/pcre-8.42'make: Warning: File/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stddef.h' has modification time 6.4e+06 s in the future
  CC       pcretest-pcretest.o
  CC       pcretest-pcre_printint.o
  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
  CCLD   pcretest
  CC       pcregrep-pcregrep.o
  CCLD   pcregrep
  CXX      libpcrecpp_la-pcrecpp.lo
  CXX      libpcrecpp_la-pcre_scanner.lo
  CXX      libpcrecpp_la-pcre_stringpiece.lo
  CXXLD    libpcrecpp.la
  /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.10 /usr/local/lib/libpcre.so.1.2.10
  libtool: install: (cd /usr/local/lib && { ln -s -f libpcre.so.1.2.10 libpcre.so.1 || { rm -f libpcre.so.1 && ln -s libpcre.so.1.2.10 libpcre.so.1; }; })
  libtool: install: (cd /usr/local/lib && { ln -s -f libpcre.so.1.2.10 libpcre.so || { rm -f libpcre.so && ln -s libpcre.so.1.2.10 libpcre.so; }; })
  libtool: install: /usr/bin/install -c .libs/libpcre.lai /usr/local/lib/libpcre.la

  libtool: warning:>  libtool: install: (cd /root/tools/pcre-8.42; /bin/sh "/root/tools/pcre-8.42/libtool"--silent --tag CC --mode=relink gcc -fvisibility=hidden -g -O2 -version-info 0:6: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.6T /usr/local/lib/libpcreposix.so.0.0.6
  libtool: install: (cd /usr/local/lib && { ln -s -f libpcreposix.so.0.0.6 libpcreposix.so.0 || { rm -f libpcreposix.so.0 && ln -s libpcreposix.so.0.0.6 libpcreposix.so.0; }; })
  libtool: install: (cd /usr/local/lib && { ln -s -f libpcreposix.so.0.0.6 libpcreposix.so || { rm -f libpcreposix.so && ln -s libpcreposix.so.0.0.6 libpcreposix.so; }; })
  libtool: install: /usr/bin/install -c .libs/libpcreposix.lai /usr/local/lib/libpcreposix.la

  libtool: warning:>  libtool: install: (cd /root/tools/pcre-8.42; /bin/sh "/root/tools/pcre-8.42/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/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/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.
  /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
  /bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c pcre-config '/usr/local/bin'
  /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'
  /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'
  /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'
  /bin/mkdir -p '/usr/local/include'
  /usr/bin/install -c -m 644 pcreposix.h pcrecpp.h pcre_scanner.h '/usr/local/include'
  /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'
  /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'
  /bin/mkdir -p '/usr/local/include'
  /usr/bin/install -c -m 644 pcre.h pcrecpparg.h pcre_stringpiece.h '/usr/local/include'
  /bin/mkdir -p '/usr/local/lib/pkgconfig'
  /usr/bin/install -c -m 644 libpcre.pc libpcreposix.pc libpcrecpp.pc '/usr/local/lib/pkgconfig'
  makeinstall-data-hook
  make: Entering directory /root/tools/pcre-8.42'ln -sf pcre_assign_jit_stack.3       /usr/local/share/man/man3/pcre16_assign_jit_stack.3ln -sf pcre_compile.3            /usr/local/share/man/man3/pcre16_compile.3ln -sf pcre_compile2.3         /usr/local/share/man/man3/pcre16_compile2.3ln -sf pcre_config.3             /usr/local/share/man/man3/pcre16_config.3ln -sf pcre_copy_named_substring.3   /usr/local/share/man/man3/pcre16_copy_named_substring.3ln -sf pcre_copy_substring.3         /usr/local/share/man/man3/pcre16_copy_substring.3ln -sf pcre_dfa_exec.3         /usr/local/share/man/man3/pcre16_dfa_exec.3ln -sf pcre_exec.3         /usr/local/share/man/man3/pcre16_exec.3ln -sf pcre_free_study.3         /usr/local/share/man/man3/pcre16_free_study.3ln -sf pcre_free_substring.3         /usr/local/share/man/man3/pcre16_free_substring.3ln -sf pcre_free_substring_list.3    /usr/local/share/man/man3/pcre16_free_substring_list.3ln -sf pcre_fullinfo.3         /usr/local/share/man/man3/pcre16_fullinfo.3ln -sf pcre_get_named_substring.3    /usr/local/share/man/man3/pcre16_get_named_substring.3ln -sf pcre_get_stringnumber.3       /usr/local/share/man/man3/pcre16_get_stringnumber.3ln -sf pcre_get_stringtable_entries.3    /usr/local/share/man/man3/pcre16_get_stringtable_entries.3ln -sf pcre_get_substring.3      /usr/local/share/man/man3/pcre16_get_substring.3ln -sf pcre_get_substring_list.3   /usr/local/share/man/man3/pcre16_get_substring_list.3ln -sf pcre_jit_exec.3         /usr/local/share/man/man3/pcre16_jit_exec.3ln -sf pcre_jit_stack_alloc.3      /usr/local/share/man/man3/pcre16_jit_stack_alloc.3ln -sf pcre_jit_stack_free.3         /usr/local/share/man/man3/pcre16_jit_stack_free.3ln -sf pcre_maketables.3         /usr/local/share/man/man3/pcre16_maketables.3ln -sf pcre_pattern_to_host_byte_order.3 /usr/local/share/man/man3/pcre16_pattern_to_host_byte_order.3ln -sf pcre_refcount.3         /usr/local/share/man/man3/pcre16_refcount.3ln -sf pcre_study.3          /usr/local/share/man/man3/pcre16_study.3ln -sf pcre_utf16_to_host_byte_order.3   /usr/local/share/man/man3/pcre16_utf16_to_host_byte_order.3ln -sf pcre_version.3            /usr/local/share/man/man3/pcre16_version.3ln -sf pcre_assign_jit_stack.3       /usr/local/share/man/man3/pcre32_assign_jit_stack.3ln -sf pcre_compile.3            /usr/local/share/man/man3/pcre32_compile.3ln -sf pcre_compile2.3         /usr/local/share/man/man3/pcre32_compile2.3ln -sf pcre_config.3             /usr/local/share/man/man3/pcre32_config.3ln -sf pcre_copy_named_substring.3   /usr/local/share/man/man3/pcre32_copy_named_substring.3ln -sf pcre_copy_substring.3         /usr/local/share/man/man3/pcre32_copy_substring.3ln -sf pcre_dfa_exec.3         /usr/local/share/man/man3/pcre32_dfa_exec.3ln -sf pcre_exec.3         /usr/local/share/man/man3/pcre32_exec.3ln -sf pcre_free_study.3         /usr/local/share/man/man3/pcre32_free_study.3ln -sf pcre_free_substring.3         /usr/local/share/man/man3/pcre32_free_substring.3ln -sf pcre_free_substring_list.3    /usr/local/share/man/man3/pcre32_free_substring_list.3ln -sf pcre_fullinfo.3         /usr/local/share/man/man3/pcre32_fullinfo.3ln -sf pcre_get_named_substring.3    /usr/local/share/man/man3/pcre32_get_named_substring.3ln -sf pcre_get_stringnumber.3       /usr/local/share/man/man3/pcre32_get_stringnumber.3ln -sf pcre_get_stringtable_entries.3    /usr/local/share/man/man3/pcre32_get_stringtable_entries.3ln -sf pcre_get_substring.3      /usr/local/share/man/man3/pcre32_get_substring.3ln -sf pcre_get_substring_list.3   /usr/local/share/man/man3/pcre32_get_substring_list.3ln -sf pcre_jit_exec.3         /usr/local/share/man/man3/pcre32_jit_exec.3ln -sf pcre_jit_stack_alloc.3      /usr/local/share/man/man3/pcre32_jit_stack_alloc.3ln -sf pcre_jit_stack_free.3         /usr/local/share/man/man3/pcre32_jit_stack_free.3ln -sf pcre_maketables.3         /usr/local/share/man/man3/pcre32_maketables.3ln -sf pcre_pattern_to_host_byte_order.3 /usr/local/share/man/man3/pcre32_pattern_to_host_byte_order.3ln -sf pcre_refcount.3         /usr/local/share/man/man3/pcre32_refcount.3ln -sf pcre_study.3          /usr/local/share/man/man3/pcre32_study.3ln -sf pcre_utf32_to_host_byte_order.3   /usr/local/share/man/man3/pcre32_utf32_to_host_byte_order.3ln -sf pcre_version.3            /usr/local/share/man/man3/pcre32_version.3make: Leaving directory/root/tools/pcre-8.42'
  make: warning:Clock skew detected.Your build may be incomplete.
  make: Leaving directory /root/tools/pcre-8.42'make: warning:Clock skew detected.Your build may be incomplete.make: Leaving directory/root/tools/pcre-8.42'
  #
  # echo $?
  0
  #
  二、安装Nginx软件
  Nginx官方网站:http://nginx.org/
  选择nginx版本最好稳定型,新版本一般有bug,稳定版本(Stable version)
  # wget http://nginx.org/download/nginx-1.14.0.tar.gz      #下载nginx安装包
  --2018-04-06 10:16:26--http://nginx.org/download/nginx-1.14.0.tar.gz
  Resolving nginx.org... 95.211.80.227, 206.251.255.63, 2001:1af8:4060:a004:21::e3, ...
  Connecting to nginx.org|95.211.80.227|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 1016272 (992K)
  Saving to: “nginx-1.14.0.tar.gz”
  100%[===============================================================>] 1,016,272    577K/s   in 1.7s
  2018-04-06 10:16:29 (577 KB/s) - “nginx-1.14.0.tar.gz” saved
  # ll
  total 3044
  -rw-r--r--. 1 root root 1016272 Apr 172018 nginx-1.14.0.tar.gz
  drwxr-xr-x. 9 1169 1169   12288 Apr6 10:04 pcre-8.42
  -rw-r--r--. 1 root root 2081413 Apr6 10:00 pcre-8.42.tar.gz
  #
  # tar zxf nginx-1.14.0.tar.gz   #解压nginx安装包
  # useradd nginx -s /bin/nologin -M       #创建nginx用户帐号
  # tail -1 /etc/group #查看创建的帐号
  nginx:x:501:
  #
  # ./configure--user=nginx--group=nginx --prefix=/application/nginx-1.14.0 --with-http_stub_status_module--with-http_ssl_module
  checking for OS

[*]Linux 2.6.32-573.el6.x86_64 x86_64  checking for C compiler ... found
[*]using GNU C compiler
[*]gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (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 ... not found
  checking for sendfile() ... found
  checking for sendfile64() ... found
  checking for sys/prctl.h ... found
  checking for prctl(PR_SET_DUMPABLE) ... found
  checking for prctl(PR_SET_KEEPCAPS) ... found
  checking for capabilities ... found
  checking for crypt_r() ... found
  checking for sys/vfs.h ... 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 sched_setaffinity() ... 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_TRANSPARENT ... found
  checking for IP_BINDANY ... not found
  checking for IP_BIND_ADDRESS_NO_PORT ... not found
  checking for IP_RECVDSTADDR ... not found
  checking for IP_SENDSRCADDR ... 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>
  checking for long>
  checking for long long>
  checking for void *>  checking for uint32_t ... found
  checking for uint64_t ... found
  checking for sig_atomic_t ... found

  checking for sig_atomic_t>  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>
  checking for off_t>
  checking for time_t>  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 clock_gettime(CLOCK_MONOTONIC) ... not found
  checking for clock_gettime(CLOCK_MONOTONIC) in librt ... 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 sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
  checking for openat(), fstatat() ... found
  checking for getaddrinfo() ... found
  checking for PCRE library ... found
  checking for PCRE JIT support ... found
  checking for OpenSSL library ... not found
  checking for OpenSSL library in /usr/local/ ... not found
  checking for OpenSSL library in /usr/pkg/ ... not found
  checking for OpenSSL library in /opt/local/ ... not found
以下是经典错误,提示需要安装ssl
  ./configure: error: SSL modules require the OpenSSL library.
  You can either do not enable the modules, or install the OpenSSL library
  into the system, or build the OpenSSL library statically from the source
  with nginx by using --with-openssl= option.
--------------------------------------------------
  #
  解决办法:安装ssl包
  # yum -y install openssl*
  已加载插件:fastestmirror, security
  设置安装进程
  Loading mirror speeds from cached hostfile

[*]base: mirrors.163.com
[*]extras: mirrors.cn99.com
[*]updates: mirrors.aliyun.com  解决依赖关系
  --> 执行事务检查
  ---> Package openssl.x86_64 0:1.0.1e-42.el6 will be 升级
  ---> Package openssl.x86_64 0:1.0.1e-57.el6 will be an update
  ---> Package openssl-devel.x86_64 0:1.0.1e-57.el6 will be 安装
  --> 处理依赖关系 krb5-devel,它被软件包 openssl-devel-1.0.1e-57.el6.x86_64 需要
  ---> Package openssl-perl.x86_64 0:1.0.1e-57.el6 will be 安装
  --> 处理依赖关系 perl(WWW::Curl::Easy),它被软件包 openssl-perl-1.0.1e-57.el6.x86_64 需要
  ---> Package openssl-static.x86_64 0:1.0.1e-57.el6 will be 安装
  ---> Package openssl098e.x86_64 0:0.9.8e-20.el6.centos.1 will be 安装
  --> 执行事务检查
  ---> Package krb5-devel.x86_64 0:1.10.3-65.el6 will be 安装
  --> 处理依赖关系 libkadm5(x86-64) = 1.10.3-65.el6,它被软件包 krb5-devel-1.10.3-65.el6.x86_64 需要
  --> 处理依赖关系 krb5-libs = 1.10.3-65.el6,它被软件包 krb5-devel-1.10.3-65.el6.x86_64 需要
  --> 处理依赖关系 libselinux-devel,它被软件包 krb5-devel-1.10.3-65.el6.x86_64 需要
  --> 处理依赖关系 libcom_err-devel,它被软件包 krb5-devel-1.10.3-65.el6.x86_64 需要
  --> 处理依赖关系 keyutils-libs-devel,它被软件包 krb5-devel-1.10.3-65.el6.x86_64 需要
  ---> Package perl-WWW-Curl.x86_64 0:4.09-4.el6 will be 安装
  --> 执行事务检查
  ---> Package keyutils-libs-devel.x86_64 0:1.4-5.el6 will be 安装
  ---> Package krb5-libs.x86_64 0:1.10.3-42.el6 will be 升级
  --> 处理依赖关系 krb5-libs = 1.10.3-42.el6,它被软件包 krb5-workstation-1.10.3-42.el6.x86_64 需要
  ---> Package krb5-libs.x86_64 0:1.10.3-65.el6 will be an update
  ---> Package libcom_err-devel.x86_64 0:1.41.12-24.el6 will be 安装
  --> 处理依赖关系 libcom_err = 1.41.12-24.el6,它被软件包 libcom_err-devel-1.41.12-24.el6.x86_64 需要
  ---> Package libkadm5.x86_64 0:1.10.3-65.el6 will be 安装
  ---> Package libselinux-devel.x86_64 0:2.0.94-7.el6 will be 安装
  --> 处理依赖关系 libselinux = 2.0.94-7.el6,它被软件包 libselinux-devel-2.0.94-7.el6.x86_64 需要
  --> 处理依赖关系 libsepol-devel >= 2.0.32-1,它被软件包 libselinux-devel-2.0.94-7.el6.x86_64 需要
  --> 处理依赖关系 pkgconfig(libsepol),它被软件包 libselinux-devel-2.0.94-7.el6.x86_64 需要
  --> 执行事务检查
  ---> Package krb5-workstation.x86_64 0:1.10.3-42.el6 will be 升级
  ---> Package krb5-workstation.x86_64 0:1.10.3-65.el6 will be an update
  ---> Package libcom_err.x86_64 0:1.41.12-22.el6 will be 升级
  --> 处理依赖关系 libcom_err = 1.41.12-22.el6,它被软件包 libss-1.41.12-22.el6.x86_64 需要
  --> 处理依赖关系 libcom_err = 1.41.12-22.el6,它被软件包 e2fsprogs-libs-1.41.12-22.el6.x86_64 需要
  --> 处理依赖关系 libcom_err = 1.41.12-22.el6,它被软件包 e2fsprogs-1.41.12-22.el6.x86_64 需要
  ---> Package libcom_err.x86_64 0:1.41.12-24.el6 will be an update
  ---> Package libselinux.x86_64 0:2.0.94-5.8.el6 will be 升级
  --> 处理依赖关系 libselinux = 2.0.94-5.8.el6,它被软件包 libselinux-utils-2.0.94-5.8.el6.x86_64 需要
  ---> Package libselinux.x86_64 0:2.0.94-7.el6 will be an update
  ---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be 安装
  --> 执行事务检查
  ---> Package e2fsprogs.x86_64 0:1.41.12-22.el6 will be 升级
  ---> Package e2fsprogs.x86_64 0:1.41.12-24.el6 will be an update
  ---> Package e2fsprogs-libs.x86_64 0:1.41.12-22.el6 will be 升级
  ---> Package e2fsprogs-libs.x86_64 0:1.41.12-24.el6 will be an update
  ---> Package libselinux-utils.x86_64 0:2.0.94-5.8.el6 will be 升级
  ---> Package libselinux-utils.x86_64 0:2.0.94-7.el6 will be an update
  ---> Package libss.x86_64 0:1.41.12-22.el6 will be 升级
  ---> Package libss.x86_64 0:1.41.12-24.el6 will be an update
  --> 完成依赖关系计算
  依赖关系解决
  ============================================================================================================================
  软件包                           架构                  版本                                    仓库               大小
  正在安装:
  openssl-devel                      x86_64                1.0.1e-57.el6                           base                1.2 M
  openssl-perl                     x86_64                1.0.1e-57.el6                           base               57 k
  openssl-static                     x86_64                1.0.1e-57.el6                           base                1.0 M
  openssl098e                        x86_64                0.9.8e-20.el6.centos.1                  base                762 k
  正在升级:
  openssl                            x86_64                1.0.1e-57.el6                           base                1.5 M
  为依赖而安装:
  keyutils-libs-devel                x86_64                1.4-5.el6                               base               29 k
  krb5-devel                         x86_64                1.10.3-65.el6                           base                504 k
  libcom_err-devel                   x86_64                1.41.12-24.el6                        base               33 k
  libkadm5                           x86_64                1.10.3-65.el6                           base                143 k
  libselinux-devel                   x86_64                2.0.94-7.el6                            base                137 k
  libsepol-devel                     x86_64                2.0.41-4.el6                            base               64 k
  perl-WWW-Curl                      x86_64                4.09-4.el6                              base               47 k
  为依赖而更新:
  e2fsprogs                        x86_64                1.41.12-24.el6                        base                554 k
  e2fsprogs-libs                     x86_64                1.41.12-24.el6                        base                121 k
  krb5-libs                        x86_64                1.10.3-65.el6                           base                675 k
  krb5-workstation                   x86_64                1.10.3-65.el6                           base                814 k
  libcom_err                         x86_64                1.41.12-24.el6                        base               38 k
  libselinux                         x86_64                2.0.94-7.el6                            base                109 k
  libselinux-utils                   x86_64                2.0.94-7.el6                            base               82 k
  libss                              x86_64                1.41.12-24.el6                        base               42 k
  事务概要
  Install      11 Package(s)
  Upgrade       9 Package(s)
  总下载量:7.8 M
  下载软件包:
  (1/20): e2fsprogs-1.41.12-24.el6.x86_64.rpm                                                          | 554 kB   00:00
  (2/20): e2fsprogs-libs-1.41.12-24.el6.x86_64.rpm                                                   | 121 kB   00:00
  (3/20): keyutils-libs-devel-1.4-5.el6.x86_64.rpm                                                   |29 kB   00:00
  (4/20): krb5-devel-1.10.3-65.el6.x86_64.rpm                                                          | 504 kB   00:00
  (5/20): krb5-libs-1.10.3-65.el6.x86_64.rpm                                                         | 675 kB   00:00
  (6/20): krb5-workstation-1.10.3-65.el6.x86_64.rpm                                                    | 814 kB   00:01
  (7/20): libcom_err-1.41.12-24.el6.x86_64.rpm                                                         |38 kB   00:00
  (8/20): libcom_err-devel-1.41.12-24.el6.x86_64.rpm                                                   |33 kB   00:00
  (9/20): libkadm5-1.10.3-65.el6.x86_64.rpm                                                            | 143 kB   00:00
  (10/20): libselinux-2.0.94-7.el6.x86_64.rpm                                                          | 109 kB   00:00
  (11/20): libselinux-devel-2.0.94-7.el6.x86_64.rpm                                                    | 137 kB   00:00
  (12/20): libselinux-utils-2.0.94-7.el6.x86_64.rpm                                                    |82 kB   00:00
  (13/20): libsepol-devel-2.0.41-4.el6.x86_64.rpm                                                      |64 kB   00:00
  (14/20): libss-1.41.12-24.el6.x86_64.rpm                                                             |42 kB   00:00
  (15/20): openssl-1.0.1e-57.el6.x86_64.rpm                                                            | 1.5 MB   00:00
  http://mirrors.163.com/centos/6.10/os/x86_64/Packages/openssl-devel-1.0.1e-57.el6.x86_64.rpm: Timeout on http://211.162.61.205/files/5081000004654E86/mirrors.163.com/centos/6/os/x86_64/Packages/openssl-devel-1.0.1e-57.el6.x86_64.rpm: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
  尝试其他镜像。
  (16/20): openssl-devel-1.0.1e-57.el6.x86_64.rpm                                                      | 1.2 MB   00:01
  (17/20): openssl-perl-1.0.1e-57.el6.x86_64.rpm                                                       |57 kB   00:00
  (18/20): openssl-static-1.0.1e-57.el6.x86_64.rpm                                                   | 1.0 MB   00:01
  (19/20): openssl098e-0.9.8e-20.el6.centos.1.x86_64.rpm                                             | 762 kB   00:00
  (20/20): perl-WWW-Curl-4.09-4.el6.x86_64.rpm                                                         |47 kB   00:00
  总计                                                                                       65 kB/s | 7.8 MB   02:03
  运行 rpm_check_debug
  执行事务测试
  事务测试成功
  执行事务
  正在升级   : libcom_err-1.41.12-24.el6.x86_64                                                                        1/29
  正在升级   : libselinux-2.0.94-7.el6.x86_64                                                                        2/29
  正在升级   : krb5-libs-1.10.3-65.el6.x86_64                                                                        3/29
  正在升级   : openssl-1.0.1e-57.el6.x86_64                                                                            4/29
  正在安装   : libkadm5-1.10.3-65.el6.x86_64                                                                           5/29
  正在升级   : libss-1.41.12-24.el6.x86_64                                                                           6/29
  正在安装   : libcom_err-devel-1.41.12-24.el6.x86_64                                                                  7/29
  正在升级   : e2fsprogs-libs-1.41.12-24.el6.x86_64                                                                  8/29
  正在安装   : libsepol-devel-2.0.41-4.el6.x86_64                                                                      9/29
  正在安装   : libselinux-devel-2.0.94-7.el6.x86_64                                                                   10/29
  正在安装   : keyutils-libs-devel-1.4-5.el6.x86_64                                                                   11/29
  正在安装   : krb5-devel-1.10.3-65.el6.x86_64                                                                        12/29
  正在安装   : openssl-devel-1.0.1e-57.el6.x86_64                                                                     13/29
  正在安装   : perl-WWW-Curl-4.09-4.el6.x86_64                                                                        14/29
  正在安装   : openssl-perl-1.0.1e-57.el6.x86_64                                                                      15/29
  正在安装   : openssl-static-1.0.1e-57.el6.x86_64                                                                  16/29
  正在升级   : e2fsprogs-1.41.12-24.el6.x86_64                                                                        17/29
  正在升级   : krb5-workstation-1.10.3-65.el6.x86_64                                                                  18/29
  正在安装   : openssl098e-0.9.8e-20.el6.centos.1.x86_64                                                            19/29
  正在升级   : libselinux-utils-2.0.94-7.el6.x86_64                                                                   20/29
  清理       : krb5-workstation-1.10.3-42.el6.x86_64                                                                  21/29
  清理       : e2fsprogs-1.41.12-22.el6.x86_64                                                                        22/29
  清理       : openssl-1.0.1e-42.el6.x86_64                                                                           23/29
  清理       : krb5-libs-1.10.3-42.el6.x86_64                                                                         24/29
  清理       : e2fsprogs-libs-1.41.12-22.el6.x86_64                                                                   25/29
  清理       : libss-1.41.12-22.el6.x86_64                                                                            26/29
  清理       : libselinux-utils-2.0.94-5.8.el6.x86_64                                                               27/29
  清理       : libselinux-2.0.94-5.8.el6.x86_64                                                                     28/29
  清理       : libcom_err-1.41.12-22.el6.x86_64                                                                     29/29
  Verifying: perl-WWW-Curl-4.09-4.el6.x86_64                                                                         1/29
  Verifying: krb5-devel-1.10.3-65.el6.x86_64                                                                         2/29
  Verifying: openssl-perl-1.0.1e-57.el6.x86_64                                                                     3/29
  Verifying: krb5-libs-1.10.3-65.el6.x86_64                                                                        4/29
  Verifying: krb5-workstation-1.10.3-65.el6.x86_64                                                                   5/29
  Verifying: libcom_err-devel-1.41.12-24.el6.x86_64                                                                  6/29
  Verifying: keyutils-libs-devel-1.4-5.el6.x86_64                                                                  7/29
  Verifying: openssl098e-0.9.8e-20.el6.centos.1.x86_64                                                               8/29
  Verifying: libss-1.41.12-24.el6.x86_64                                                                           9/29
  Verifying: openssl-devel-1.0.1e-57.el6.x86_64                                                                     10/29
  Verifying: e2fsprogs-libs-1.41.12-24.el6.x86_64                                                                   11/29
  Verifying: libcom_err-1.41.12-24.el6.x86_64                                                                     12/29
  Verifying: libsepol-devel-2.0.41-4.el6.x86_64                                                                     13/29
  Verifying: libselinux-utils-2.0.94-7.el6.x86_64                                                                   14/29
  Verifying: openssl-1.0.1e-57.el6.x86_64                                                                           15/29
  Verifying: libkadm5-1.10.3-65.el6.x86_64                                                                        16/29
  Verifying: libselinux-2.0.94-7.el6.x86_64                                                                         17/29
  Verifying: libselinux-devel-2.0.94-7.el6.x86_64                                                                   18/29
  Verifying: openssl-static-1.0.1e-57.el6.x86_64                                                                  19/29
  Verifying: e2fsprogs-1.41.12-24.el6.x86_64                                                                        20/29
  Verifying: libss-1.41.12-22.el6.x86_64                                                                            21/29
  Verifying: libselinux-utils-2.0.94-5.8.el6.x86_64                                                               22/29
  Verifying: openssl-1.0.1e-42.el6.x86_64                                                                           23/29
  Verifying: e2fsprogs-1.41.12-22.el6.x86_64                                                                        24/29
  Verifying: krb5-libs-1.10.3-42.el6.x86_64                                                                         25/29
  Verifying: krb5-workstation-1.10.3-42.el6.x86_64                                                                  26/29
  Verifying: libselinux-2.0.94-5.8.el6.x86_64                                                                     27/29
  Verifying: libcom_err-1.41.12-22.el6.x86_64                                                                     28/29
  Verifying: e2fsprogs-libs-1.41.12-22.el6.x86_64                                                                   29/29
  已安装:
  openssl-devel.x86_64 0:1.0.1e-57.el6         openssl-perl.x86_64 0:1.0.1e-57.el6openssl-static.x86_64 0:1.0.1e-57.el6
  openssl098e.x86_64 0:0.9.8e-20.el6.centos.1
  作为依赖被安装:
  keyutils-libs-devel.x86_64 0:1.4-5.el6krb5-devel.x86_64 0:1.10.3-65.el6       libcom_err-devel.x86_64 0:1.41.12-24.el6
  libkadm5.x86_64 0:1.10.3-65.el6         libselinux-devel.x86_64 0:2.0.94-7.el6libsepol-devel.x86_64 0:2.0.41-4.el6
  perl-WWW-Curl.x86_64 0:4.09-4.el6
  更新完毕:
  openssl.x86_64 0:1.0.1e-57.el6
  作为依赖被升级:
  e2fsprogs.x86_64 0:1.41.12-24.el6          e2fsprogs-libs.x86_64 0:1.41.12-24.el6    krb5-libs.x86_64 0:1.10.3-65.el6
  krb5-workstation.x86_64 0:1.10.3-65.el6    libcom_err.x86_64 0:1.41.12-24.el6      libselinux.x86_64 0:2.0.94-7.el6
  libselinux-utils.x86_64 0:2.0.94-7.el6   libss.x86_64 0:1.41.12-24.el6
  完毕!
  #
  # ./configure--user=nginx--group=nginx --prefix=/application/nginx-1.14.0 --with-http_stub_status_module--with-http_ssl_module
  checking for OS

[*]Linux 2.6.32-573.el6.x86_64 x86_64  checking for C compiler ... found
[*]using GNU C compiler
[*]gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (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 ... not found
  checking for sendfile() ... found
  checking for sendfile64() ... found
  checking for sys/prctl.h ... found
  checking for prctl(PR_SET_DUMPABLE) ... found
  checking for prctl(PR_SET_KEEPCAPS) ... found
  checking for capabilities ... found
  checking for crypt_r() ... found
  checking for sys/vfs.h ... 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 sched_setaffinity() ... 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_TRANSPARENT ... found
  checking for IP_BINDANY ... not found
  checking for IP_BIND_ADDRESS_NO_PORT ... not found
  checking for IP_RECVDSTADDR ... not found
  checking for IP_SENDSRCADDR ... 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>
  checking for long>
  checking for long long>
  checking for void *>  checking for uint32_t ... found
  checking for uint64_t ... found
  checking for sig_atomic_t ... found

  checking for sig_atomic_t>  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>
  checking for off_t>
  checking for time_t>  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 clock_gettime(CLOCK_MONOTONIC) ... not found
  checking for clock_gettime(CLOCK_MONOTONIC) in librt ... 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 sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
  checking for openat(), fstatat() ... found
  checking for getaddrinfo() ... found
  checking for PCRE library ... found
  checking for PCRE JIT support ... found
  checking for OpenSSL library ... found
  checking for zlib library ... found
  creating objs/Makefile
  Configuration summary

[*]using system PCRE library
[*]using system OpenSSL library
[*]  using system zlib library
  nginx path prefix: "/application/nginx-1.14.0"
  nginx binary file: "/application/nginx-1.14.0/sbin/nginx"
  nginx modules path: "/application/nginx-1.14.0/modules"
  nginx configuration prefix: "/application/nginx-1.14.0/conf"
  nginx configuration file: "/application/nginx-1.14.0/conf/nginx.conf"
  nginx pid file: "/application/nginx-1.14.0/logs/nginx.pid"
  nginx error log file: "/application/nginx-1.14.0/logs/error.log"
  nginx http access log file: "/application/nginx-1.14.0/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"
  # echo $?
  0
  # make && make install
  # find / -name nginx-1.14.0 #查找安装的nginx-1.14.0
  /root/nginx/nginx-1.14.0
  /application/nginx-1.14.0   #安装完成的nginx-1.14.0
  #
  # ln -s /application/nginx-1.14.0/ /application/nginx   #制作软链接
  #
  # ll /application/
  总用量 4
  lrwxrwxrwx. 1 root root   26 7月25 03:59 nginx -> /application/nginx-1.14.0/   #已制作完成的链接
  drwxr-xr-x. 6 root root 4096 7月25 03:48 nginx-1.14.0
  #
  # ll /application/nginx/
  总用量 16
  drwxr-xr-x. 2 root root 4096 7月25 03:48 conf
  drwxr-xr-x. 2 root root 4096 7月25 03:48 html
  drwxr-xr-x. 2 root root 4096 7月25 03:48 logs
  drwxr-xr-x. 2 root root 4096 7月25 03:48 sbin
  #
  # /application/nginx/sbin/nginx -t#“-t”检查语法
  /application/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
  #
  #
  # find / -name libpcre.so.1   #查找libpcre.so.1文件
  /usr/local/lib/libpcre.so.1
  /root/nginx/pcre-8.40/.libs/libpcre.so.1
  #
  # vi /etc/ld.so.conf      #编辑库文件,将/usr/local/lib/加到库文件里
  # cat /etc/ld.so.conf
  include ld.so.conf.d/.conf
  /usr/local/lib/
  #
  # ldconfig#让库修改生效
  #
  # /application/nginx/sbin/nginx -t#再次检查语法
  nginx: the configuration file /application/nginx-1.14.0/conf/nginx.conf syntax is ok
  nginx: configuration file /application/nginx-1.14.0/conf/nginx.conf test is successful
  #
  # /application/nginx/sbin/nginx   #启动nginx服务
  # lsof -i tcp:80      #查看nginx端口是否启动

  COMMAND   PIDUSER   FD   TYPE DEVICE>  nginx   16711root    6uIPv464414      0t0TCP :http (LISTEN)
  nginx   16712   nginx    6uIPv464414      0t0TCP *:http (LISTEN)
  #
  # service iptables stop #关闭防火墙
  iptables:将链设置为政策 ACCEPT:filter                  [确定]
  iptables:清除防火墙规则:                                 [确定]
  iptables:正在卸载模块:                                 [确定]
  #
  在浏览器输入服务端IP地址
**

页: [1]
查看完整版本: Nginx程序部署及启动