{"id":6742,"date":"2017-06-03T17:18:24","date_gmt":"2017-06-03T09:18:24","guid":{"rendered":"http:\/\/rmohan.com\/?p=6742"},"modified":"2017-06-03T17:18:24","modified_gmt":"2017-06-03T09:18:24","slug":"centos-6-9-compile-and-install-nginx1-4-7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6742","title":{"rendered":"CentOS 6.9 compile and install Nginx1.4.7"},"content":{"rendered":"<p><strong>CentOS 6.9 compile and install Nginx1.4.7<\/strong><\/p>\n<p>[root@rmohan.com ~]# yum install -y openssl<br \/>\n[root@rmohan.com ~]# service iptables stop<br \/>\niptables: Setting chains to policy ACCEPT: filter          [  OK  ]<br \/>\niptables: Flushing firewall rules:                         [  OK  ]<br \/>\niptables: Unloading modules:<br \/>\n2. Download nginx source package to a local<\/p>\n<p>[root@rmohan.com ~]# ll nginx-1.4.7.tar.gz<br \/>\n-rw-r&#8211;r&#8211;. 1 root root 769153 Jun  1  2017 nginx-1.4.7.tar.gz<br \/>\n3. Extract nginx source package<\/p>\n<p>[root@rmohan.com ~]# tar -xf nginx-1.4.7.tar.gz<br \/>\n4. Go to the extracted directory<\/p>\n<p>[root@rmohan.com ~]# cd nginx-1.4.7<br \/>\n5. Start compilation to generate the makefile<\/p>\n<p>[root@rmohan.com nginx-1.4.7]# .\/configure &#8211;prefix=\/usr\\ &#8211;sbin-path=\/usr\/sbin\/nginx &#8211;conf-path=\/etc\/nginx\/nginx.conf\\ &#8211;error-log-path=\/var\/log\/nginx\/error.log\\ &#8211;http-log-path=\/var\/log\/nginx\/access.log\\ &#8211;pid-path=\/var\/run\/nginx\/nginx.pid &#8211;lock-path=\/var\/lock\/nginx.lock\\ &#8211;user=nginx &#8211;group=nginx &#8211;with-http_flv_module\\ &#8211;with-http_stub_status_module &#8211;with-http_gzip_static_module\\ &#8211;http-client-body-temp-path=\/var\/tmp\/nginx\/client\\ &#8211;http-proxy-temp-path=\/var\/tmp\/nginx\/proxy\\ &#8211;http-fastcgi-temp-path=\/var\/tmp\/nginx\/fcgi\/\\ &#8211;http-uwsgi-temp-path=\/var\/tmp\/nginx\/uwsgi\\ &#8211;http-scgi-temp-path=\/var\/tmp\/nginx\/scgi &#8211;with-pcre\\ &#8211;with-http_ssl_module\\<br \/>\n&#8230;..<br \/>\nchecking for socklen_t &#8230; found<br \/>\nchecking for in_addr_t &#8230; found<br \/>\nchecking for in_port_t &#8230; found<br \/>\nchecking for rlim_t &#8230; found<br \/>\nchecking for uintptr_t &#8230; uintptr_t found<br \/>\nchecking for system byte ordering &#8230; little endian<br \/>\nchecking for size_t size &#8230; 8 bytes<br \/>\nchecking for off_t size &#8230; 8 bytes<br \/>\nchecking for time_t size &#8230; 8 bytes<br \/>\nchecking for setproctitle() &#8230; not found<br \/>\nchecking for pread() &#8230; found<br \/>\nchecking for pwrite() &#8230; found<br \/>\nchecking for sys_nerr &#8230; found<br \/>\nchecking for localtime_r() &#8230; found<br \/>\nchecking for posix_memalign() &#8230; found<br \/>\nchecking for memalign() &#8230; found<br \/>\nchecking for mmap(MAP_ANON|MAP_SHARED) &#8230; found<br \/>\nchecking for mmap(&#8220;\/dev\/zero&#8221;, MAP_SHARED) &#8230; found<br \/>\nchecking for System V shared memory &#8230; found<br \/>\nchecking for POSIX semaphores &#8230; not found<br \/>\nchecking for POSIX semaphores in libpthread &#8230; found<br \/>\nchecking for struct msghdr.msg_control &#8230; found<br \/>\nchecking for ioctl(FIONBIO) &#8230; found<br \/>\nchecking for struct tm.tm_gmtoff &#8230; found<br \/>\nchecking for struct dirent.d_namlen &#8230; not found<br \/>\nchecking for struct dirent.d_type &#8230; found<br \/>\nchecking for sysconf(_SC_NPROCESSORS_ONLN) &#8230; found<br \/>\nchecking for openat(), fstatat() &#8230; found<br \/>\nchecking for getaddrinfo() &#8230; found<br \/>\nchecking for PCRE library &#8230; found<br \/>\nchecking for PCRE JIT support &#8230; not found<br \/>\nchecking for OpenSSL library &#8230; found<br \/>\nchecking for zlib library &#8230; found<br \/>\ncreating objs\/Makefile<\/p>\n<p>Configuration summary<br \/>\n  + using system PCRE library<br \/>\n  + using system OpenSSL library<br \/>\n  + md5: using OpenSSL library<br \/>\n  + sha1: using OpenSSL library<br \/>\n  + using system zlib library<\/p>\n<p>  nginx path prefix: &#8220;\/usr&#8221;<br \/>\n  nginx binary file: &#8220;\/usr\/sbin\/nginx&#8221;<br \/>\n  nginx configuration prefix: &#8220;\/etc\/nginx&#8221;<br \/>\n  nginx configuration file: &#8220;\/etc\/nginx\/nginx.conf&#8221;<br \/>\n  nginx pid file: &#8220;\/var\/run\/nginx\/nginx.pid&#8221;<br \/>\n  nginx error log file: &#8220;\/var\/log\/nginx\/error.log&#8221;<br \/>\n  nginx http access log file: &#8220;\/var\/log\/nginx\/access.log&#8221;<br \/>\n  nginx http client request body temporary files: &#8220;\/var\/tmp\/nginx\/client&#8221;<br \/>\n  nginx http proxy temporary files: &#8220;\/var\/tmp\/nginx\/proxy&#8221;<br \/>\n  nginx http fastcgi temporary files: &#8220;\/var\/tmp\/nginx\/fcgi\/&#8221;<br \/>\n  nginx http uwsgi temporary files: &#8220;\/var\/tmp\/nginx\/uwsgi&#8221;<br \/>\n  nginx http scgi temporary files: &#8220;\/var\/tmp\/nginx\/scgi&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 6.9 compile and install Nginx1.4.7<\/p>\n<p>[root@rmohan.com ~]# yum install -y openssl [root@rmohan.com ~]# service iptables stop iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: 2. Download nginx source package to a local<\/p>\n<p>[root@rmohan.com ~]# ll nginx-1.4.7.tar.gz -rw-r&#8211;r&#8211;. 1 root root 769153 Jun [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6742"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6742"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6742\/revisions"}],"predecessor-version":[{"id":6743,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6742\/revisions\/6743"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}