Chinaunix

标题: 配置网站nginx在centos6.4安装问题 [打印本页]

作者: eremiter    时间: 2014-01-24 13:12
标题: 配置网站nginx在centos6.4安装问题
下载了一份mysql5+php+nginx的配置老是出问题,几个问题不明白,下载的东西,要上传哪个目录合理,我是上传到根目录tmp下,即与boot同一级。
第二安装的东西,会跑到哪个目录上

还有编译时候,有好多行命令看不懂,即红色部份,是一行一行输入,还是一次复制,粘贴到命令行,我是使用一次复制,请指点,谢谢

安装 nginx
tar -zxvf nginx-1.4.3.tar.gz
cd nginx-1.4.3
./configure --sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-http_ssl_module \
--with-pcre=/usr/local/src/pcre \
--with-zlib=/usr/local/src/zlib \
--with-openssl=/usr/local/src/openssl


make
make install
  1. [root@webserver tmp]# ls
  2. libmcrypt-2.5.8                           nginx-1.5.9         php-5.3.28.tar.gz
  3. libmcrypt-2.5.8.tar.gz                    nginx-1.5.9.tar.gz
  4. MySQL-5.5.35-1.el6.x86_64.rpm-bundle.tar  php-5.3.28
  5. [root@webserver tmp]# cd nginx-1.5.9
  6. [root@webserver nginx-1.5.9]# ./configure --sbin-path=/usr/local/nginx/nginx \
  7. > --conf-path=/usr/local/nginx/nginx.conf \
  8. > --pid-path=/usr/local/nginx/nginx.pid \
  9. > --with-http_ssl_module \
  10. > --with-pcre=/usr/local/src/pcre \
  11. > --with-zlib=/usr/local/src/zlib \
  12. > --with-openssl=/usr/local/src/openssl
  13. checking for OS
  14. + Linux 2.6.32-358.6.2.el6.x86_64 x86_64
  15. checking for C compiler ... found
  16. + using GNU C compiler
  17. + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
  18. checking for gcc -pipe switch ... found
  19. checking for gcc builtin atomic operations ... found
  20. checking for C99 variadic macros ... found
  21. checking for gcc variadic macros ... found
  22. checking for unistd.h ... found
  23. checking for inttypes.h ... found
  24. checking for limits.h ... found
  25. checking for sys/filio.h ... not found
  26. checking for sys/param.h ... found
  27. checking for sys/mount.h ... found
  28. checking for sys/statvfs.h ... found
  29. checking for crypt.h ... found
  30. checking for Linux specific features
  31. checking for epoll ... found
  32. checking for EPOLLRDHUP ... found
  33. checking for O_PATH ... not found
  34. checking for sendfile() ... found
  35. checking for sendfile64() ... found
  36. checking for sys/prctl.h ... found
  37. checking for prctl(PR_SET_DUMPABLE) ... found
  38. checking for sched_setaffinity() ... found
  39. checking for crypt_r() ... found
  40. checking for sys/vfs.h ... found
  41. checking for nobody group ... found
  42. checking for poll() ... found
  43. checking for /dev/poll ... not found
  44. checking for kqueue ... not found
  45. checking for crypt() ... not found
  46. checking for crypt() in libcrypt ... found
  47. checking for F_READAHEAD ... not found
  48. checking for posix_fadvise() ... found
  49. checking for O_DIRECT ... found
  50. checking for F_NOCACHE ... not found
  51. checking for directio() ... not found
  52. checking for statfs() ... found
  53. checking for statvfs() ... found
  54. checking for dlopen() ... not found
  55. checking for dlopen() in libdl ... found
  56. checking for sched_yield() ... found
  57. checking for SO_SETFIB ... not found
  58. checking for SO_ACCEPTFILTER ... not found
  59. checking for TCP_DEFER_ACCEPT ... found
  60. checking for TCP_KEEPIDLE ... found
  61. checking for TCP_FASTOPEN ... not found
  62. checking for TCP_INFO ... found
  63. checking for accept4() ... found
  64. checking for int size ... 4 bytes
  65. checking for long size ... 8 bytes
  66. checking for long long size ... 8 bytes
  67. checking for void * size ... 8 bytes
  68. checking for uint64_t ... found
  69. checking for sig_atomic_t ... found
  70. checking for sig_atomic_t size ... 4 bytes
  71. checking for socklen_t ... found
  72. checking for in_addr_t ... found
  73. checking for in_port_t ... found
  74. checking for rlim_t ... found
  75. checking for uintptr_t ... uintptr_t found
  76. checking for system byte ordering ... little endian
  77. checking for size_t size ... 8 bytes
  78. checking for off_t size ... 8 bytes
  79. checking for time_t size ... 8 bytes
  80. checking for setproctitle() ... not found
  81. checking for pread() ... found
  82. checking for pwrite() ... found
  83. checking for sys_nerr ... found
  84. checking for localtime_r() ... found
  85. checking for posix_memalign() ... found
  86. checking for memalign() ... found
  87. checking for mmap(MAP_ANON|MAP_SHARED) ... found
  88. checking for mmap("/dev/zero", MAP_SHARED) ... found
  89. checking for System V shared memory ... found
  90. checking for POSIX semaphores ... not found
  91. checking for POSIX semaphores in libpthread ... found
  92. checking for struct msghdr.msg_control ... found
  93. checking for ioctl(FIONBIO) ... found
  94. checking for struct tm.tm_gmtoff ... found
  95. checking for struct dirent.d_namlen ... not found
  96. checking for struct dirent.d_type ... found
  97. checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
  98. checking for openat(), fstatat() ... found
  99. checking for getaddrinfo() ... found
  100. creating objs/Makefile

  101. Configuration summary
  102.   + using PCRE library: /usr/local/src/pcre
  103.   + using OpenSSL library: /usr/local/src/openssl
  104.   + md5: using OpenSSL library
  105.   + sha1: using OpenSSL library
  106.   + using zlib library: /usr/local/src/zlib

  107.   nginx path prefix: "/usr/local/nginx"
  108.   nginx binary file: "/usr/local/nginx/nginx"
  109.   nginx configuration prefix: "/usr/local/nginx"
  110.   nginx configuration file: "/usr/local/nginx/nginx.conf"
  111.   nginx pid file: "/usr/local/nginx/nginx.pid"
  112.   nginx error log file: "/usr/local/nginx/logs/error.log"
  113.   nginx http access log file: "/usr/local/nginx/logs/access.log"
  114.   nginx http client request body temporary files: "client_body_temp"
  115.   nginx http proxy temporary files: "proxy_temp"
  116.   nginx http fastcgi temporary files: "fastcgi_temp"
  117.   nginx http uwsgi temporary files: "uwsgi_temp"
  118.   nginx http scgi temporary files: "scgi_temp"

  119. [root@webserver nginx-1.5.9]# make
  120. make -f objs/Makefile
  121. make[1]: Entering directory `/tmp/nginx-1.5.9'
  122. cd /usr/local/src/pcre \
  123.         && if [ -f Makefile ]; then make distclean; fi \
  124.         && CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
  125.         ./configure --disable-shared
  126. /bin/sh: line 0: cd: /usr/local/src/pcre: No such file or directory
  127. make[1]: *** [/usr/local/src/pcre/Makefile] Error 1
  128. make[1]: Leaving directory `/tmp/nginx-1.5.9'
  129. make: *** [build] Error 2
  130. [root@webserver nginx-1.5.9]# make install
  131. make -f objs/Makefile install
  132. make[1]: Entering directory `/tmp/nginx-1.5.9'
  133. cd /usr/local/src/pcre \
  134.         && if [ -f Makefile ]; then make distclean; fi \
  135.         && CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
  136.         ./configure --disable-shared
  137. /bin/sh: line 0: cd: /usr/local/src/pcre: No such file or directory
  138. make[1]: *** [/usr/local/src/pcre/Makefile] Error 1
  139. make[1]: Leaving directory `/tmp/nginx-1.5.9'
  140. make: *** [install] Error 2
  141. [root@webserver nginx-1.5.9]#
复制代码

作者: amarant    时间: 2014-01-24 14:00
/bin/sh: line 0: cd: /usr/local/src/pcre: No such file or directory
从出错信息想想是为什么
作者: eremiter    时间: 2014-01-25 11:05
我到src下建立相应的目录,还是出错,真是奇怪,如果使用yum安装即可以,但不是想要的版本
  1. [root@webserver nginx-1.5.9]# make
  2. make -f objs/Makefile
  3. make[1]: Entering directory `/tmp/nginx-1.5.9'
  4. cd /usr/local/src/pcre \
  5.         && if [ -f Makefile ]; then make distclean; fi \
  6.         && CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
  7.         ./configure --disable-shared
  8. /bin/sh: line 2: ./configure: No such file or directory
  9. make[1]: *** [/usr/local/src/pcre/Makefile] Error 127
  10. make[1]: Leaving directory `/tmp/nginx-1.5.9'
  11. make: *** [build] Error 2
  12. [root@webserver nginx-1.5.9]# make install
  13. make -f objs/Makefile install
  14. make[1]: Entering directory `/tmp/nginx-1.5.9'
  15. cd /usr/local/src/pcre \
  16.         && if [ -f Makefile ]; then make distclean; fi \
  17.         && CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
  18.         ./configure --disable-shared
  19. /bin/sh: line 2: ./configure: No such file or directory
  20. make[1]: *** [/usr/local/src/pcre/Makefile] Error 127
  21. make[1]: Leaving directory `/tmp/nginx-1.5.9'
  22. make: *** [install] Error 2
  23. [root@webserver nginx-1.5.9]
复制代码

作者: chenyx    时间: 2014-01-26 09:28
你的pcre的库是安装到/usr/local/src/pcre下面的吗?如果不是,将--with-pcre=/usr/local/src/pcre \这个参数=到\之间的参数=/usr/local/src/pcre去掉,看看configure能不能找到你系统安装的pcre
作者: eremiter    时间: 2014-01-26 13:02
最后搞得没办法,使用.configure安装,其它的选项都不加,到时安装成功了,看了linux还真不好搞
作者: humjb_1983    时间: 2014-01-26 14:46
需要慢慢琢磨才行~~




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2