nginx-1.7.3 インストール

■nginx-1.7.3が、7月8日にリリースがされたので最新版をインストールしてみました。

■ダウンロードしてインストール (/usr/local/src/nginx ←ダウンロード場所)
wget http://nginx.org/download/nginx-1.7.3.tar.gz
tar xvzf nginx-1.7.3.tar.gz
cd nginx-1.7.3

■configure (/usr/local/src/nginx-1.7.3 )
./configure –prefix=/usr/local/nginx-1.7.3 \
–sbin-path=/usr/local/sbin/nginx \
–with-openssl=/usr/local/src/openssl-1.0.1g \
–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=/var/run/nginx.pid \
–lock-path=/var/lock/subsys/nginx \
–user=nginx \
–group=nginx \
–with-file-aio \
–with-ipv6 \
–with-pcre \
–with-http_ssl_module \
–with-http_realip_module \
–with-http_addition_module \
–with-http_sub_module \
–with-http_dav_module \
–with-http_flv_module \
–with-http_mp4_module \
–with-http_gzip_static_module \
–with-http_random_index_module \
–with-http_secure_link_module \
–with-http_degradation_module \
–with-http_stub_status_module \
–with-http_perl_module \
–with-http_xslt_module \
–with-mail \
–with-mail_ssl_module \
–with-http_spdy_module \
–with-cc-opt=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m64 -mtune=generic’ \
–with-ld-opt=’ -Wl,-E’ \
–add-module=/usr/local/src/nginx/ngx_small_light \
–add-module=/usr/local/src/nginx/ngx_cache_purge-2.1 \
–add-module=/usr/local/src/nginx/nginx-rtmp-module-master

■configure の not found を確認
hecking for OS
+ Linux 2.6.32-431.5.1.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-4) (GCC)
checking for gcc -pipe switch … found
checking for –with-ld-opt=” -Wl,-E” … found
checking for gcc builtin atomic operations … found
checking for C99 variadic macros … found
checking for gcc variadic macros … 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 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 sched_setaffinity() … 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 SO_SETFIB … not found
checking for SO_ACCEPTFILTER … not 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 kqueue AIO support … not found
checking for Linux AIO support … 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 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 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
configuring additional modules
adding module in /usr/local/src/nginx/ngx_small_light
checking for ngx_small_light dependencies … found
+ ngx_http_small_light was configured
adding module in /usr/local/src/nginx/ngx_cache_purge-2.1
+ ngx_http_cache_purge_module was configured
adding module in /usr/local/src/nginx/nginx-rtmp-module-master
+ ngx_rtmp_module was configured
checking for PCRE library … found
checking for PCRE JIT support … not found
checking for zlib library … found
checking for libxslt … found
checking for libexslt … found
checking for perl
+ perl version: v5.10.1 (*) built for x86_64-linux-thread-multi
+ perl interpreter multiplicity found
creating objs/Makefile

Configuration summary
+ using system PCRE library
+ using OpenSSL library: /usr/local/src/openssl-1.0.1g
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library

nginx path prefix: “/usr/local/nginx-1.7.3″
nginx binary file: “/usr/local/sbin/nginx”
nginx configuration prefix: “/etc/nginx”
nginx configuration file: “/etc/nginx/nginx.conf”
nginx pid file: “/var/run/nginx.pid”
nginx error log file: “/var/log/nginx/error.log”
nginx http access log file: “/var/log/nginx/access.log”
nginx http client request body temporary files: “/var/lib/nginx/tmp/client_body”
nginx http proxy temporary files: “/var/lib/nginx/tmp/proxy”
nginx http fastcgi temporary files: “/var/lib/nginx/tmp/fastcgi”
nginx http uwsgi temporary files: “/var/lib/nginx/tmp/uwsgi”
nginx http scgi temporary files: “/var/lib/nginx/tmp/scgi”

make
make install

■設定ファイルが問題ないかどうかを確認する。
[root@ecoya nginx-1.5.12]# /usr/local/sbin/nginx -t
ginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

[root@ecoya nginx-1.5.12]# ldd /usr/local/sbin/nginx
linux-vdso.so.1 => (0x00007fff983ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb47f33e000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fb47f106000)
libMagickWand.so.2 => /usr/lib64/libMagickWand.so.2 (0x00007fb47edfb000)
libMagickCore.so.2 => /usr/lib64/libMagickCore.so.2 (0x00007fb47e9c3000)
libImlib2.so.1 => /usr/lib64/libImlib2.so.1 (0x00007fb47e758000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fb47e4bb000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fb47e17e000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fb47df6a000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fb47dd66000)
libm.so.6 => /lib64/libm.so.6 (0x00007fb47dae2000)
libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x00007fb47d8d0000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007fb47d680000)
libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fb47d44a000)
libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00007fb47d223000)
libz.so.1 => /lib64/libz.so.1 (0x00007fb47d00d000)
libgd.so.2 => /usr/lib64/libgd.so.2 (0x00007fb47cdc6000)
libpcre.so.0 => /lib64/libpcre.so.0 (0x00007fb47cb99000)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007fb47c847000)
libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007fb47c60a000)
libexslt.so.0 => /usr/lib64/libexslt.so.0 (0x00007fb47c3f5000)
libperl.so => /usr/lib64/perl5/CORE/libperl.so (0x00007fb47c08a000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fb47be70000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fb47bc56000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007fb47ba53000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb47b6bf000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb47f565000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007fb47b447000)
liblcms.so.1 => /usr/lib64/liblcms.so.1 (0x00007fb47b20e000)
libtiff.so.3 => /usr/lib64/libtiff.so.3 (0x00007fb47afaa000)
libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007fb47ad44000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fb47ab33000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007fb47a926000)
libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007fb47a71c000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007fb47a514000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007fb47a2f8000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fb47a0e1000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fb479ec3000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fb479c9a000)
libgcrypt.so.11 => /lib64/libgcrypt.so.11 (0x00007fb479a25000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007fb479820000)
librt.so.1 => /lib64/librt.so.1 (0x00007fb479618000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fb479413000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fb479210000)

[root@ecoya nginx-1.5.12]# find / -name libpcre.so.1
/usr/local/src/nginx/pcre/pcre-8.34/.libs/libpcre.so.1
/usr/local/lib/libpcre.so.1

[root@ecoya nginx-1.5.12]# cp -p /usr/local/lib/libpcre.so.1 /lib64

エラー内容 nginx: [emerg] mkdir() “/var/lib/nginx/tmp/client_body” failed (2: No such file or directory)
   mkdir /var/lib/nginx
mkdir /var/lib/nginx/tmp
chown -R ngix:nginx /var/lib/nginx
   
–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 \

/usr/local/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

■ビルドが全て終わったらシンボリックリンクを貼っておきます
   ln -s /usr/local/nginx-1.7.3 /usr/local/nginx

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>