Centos 7 nginx-1.12.0 compilation installation, centosnginx-1.12.0

Source: Internet
Author: User

Centos 7 nginx-1.12.0 compilation installation, centosnginx-1.12.0
Please refer to the following link for more information: http://www.nginx.cn/installand I do not know that my system license is dependent on this package. How can I try it? If there is no such thing, I can install it. If there is no such thing, I can always learn something. get nginx package http://nginx.org/en/download.htmlconfigure -- sbin-path =/user/local/nginx -- conf-path =/usr/local/nginx. conf -- pid-path =/usr/local/nginx. pid error. /configure: error: the HTTP rewrite module requires the PCRE library. you can either disable the module by using -- without-http_rewrite_moduleoption, or install the PCRE library into the system, or build the PCRE librarystatically from the source with nginx by using -- with-pcre = <path> option to get the pcre package fuse/usr/local/srcwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gztar-zxvf pcre-8.37.tar.gzcd pcre-8.34. /configure -- prefix =/usr/local/pcremakemake install error configure: error: You need a C ++ compiler for C ++ support. install gccyum install gcc-c ++ and install pcre again. /configure -- sbin-path =/user/local/nginx -- conf-path =/usr/local/nginx. conf -- pid-path =/usr/local/nginx. pid error. /configure: error: the HTTP gzip module requires the zlib library. you can either disable the module by using -- without-http_gzip_moduleoption, or install the zlib library into the system, or build the zlib librarystatically from the source with nginx by using -- with-zlib = <path> option. install zlib to get zlib package http://zlib.net/?root@bogon src] # tar-zxvf zlib-1.2.11.tar.gzcd zlib-1.2.11. /configure -- prefix =/usr/local/zlibmake & make install to reinstall nginx. /configure -- sbin-path =/user/local/nginx -- conf-path =/usr/local/nginx. conf -- pid-path =/usr/local/nginx. pid make & make install start [root @ bogon nginx] # systemctl start nginxFailed to start nginx. service: Unit nginx. service failed to load: No such file or directory. it indicates that the installation failed. Isn't ssl installed? I found that the system has been installed. If you don't want to worry, install it again .. /config -- prefix =/usr/local -- openssldir =/usr/local/sslmake & make install. /config shared -- prefix =/usr/local -- openssldir =/usr/local/sslmake cleanmake & make install it seems that it is only possible to delete zlib pcre and run make uninstall in the corresponding directory according to the installation instructions. install the pcrecd/usr/local/srcwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gztar-zxvf pcre-8.37.tar.gzcd pcre-8.34. /configure -- prefix =/usr/local/pcremakemake install zlib get zlib package http://zlib.net/?root@bogon src] # tar-zxvf zlib-1.2.11.tar.gzcd. /configure -- prefix =/usr/local/zlibmake & make install to reinstall nginx./Configure -- sbin-path =/usr/local/nginx \-- Conf-path =/usr/local/nginx. conf \-- Pid-path =/usr/local/nginx. pid \With-http_ssl_module \-- With-pcre =/usr/local/src/pcre-8.40 \-- With-zlib =/usr/local/src/zlib-1.2.11 \-- With-openssl =/usr/local/src/openssl-1.0.2l[Root @ bogon nginx-1.12.0] #. /configure -- sbin-path =/usr/local/nginx \> -- conf-path =/usr/local/nginx. conf \> -- pid-path =/usr/local/nginx. pid \ local/src/openssl-1.0.2l> -- with-http_ssl_module \> -- with-pcre =/usr/local/src/pcre-8.40 \> -- with-zlib =/usr/local/src/zlib-1.2.11 \> -- with-openssl =/usr/local/src/openssl-1.0.2l [root @ bogon nginx-1.12.0] # make & make install Modify/etc/local/ng Restart/nginx. conf change lisent product 80 to 8080 start service:/etc/local/nginx access: http: // 192.168.158.128: 8080 Welcome to nginx! If you see this page, the nginx web server is successfully installed and working. further configuration is required. for online documentation and support please refer to nginx.org. specified cial support is available at nginx.com. thank you for using nginx. method 1:/usr/local/nginx method 2 (-c nginx configuration file address ): /usr/local/nginx-c/usr/local/nginx. conf stop nginx service method 1: Stop viewing processes with ease [root @ bogon nginx] # Ps-ef | grep nginxroot 62024 1 0 07:01? 00:00:00 nginx: master process/usr/local/nginx/nginxnobody 62025 62024 0? 00:00:00 nginx: worker processroot 62308 18453 0 00:00:00 pts/1 grep -- color = auto nginx kill process [root @ bogon nginx] # kill-QUIT 62024 Method 2: quickly stop viewing the process [root @ bogon nginx] # ps-ef | grep nginxroot 62358 1 0? 00:00:00 nginx: master process/usr/local/nginx-c/usr/local/nginx. confnobody 62359 62358 0? 00:00:00 nginx: worker processroot 62463 18453 0 00:00:00 pts/1 grep -- color = auto nginx kill the process [root @ bogon nginx] # kill-TERM 62358 or [root @ bogon nginx] #/usr/ local/nginx-c/usr/local/nginx. conf [root @ bogon nginx] # ps-ef | grep nginxroot 62473 1 0? 00:00:00 nginx: master process/usr/local/nginx-c/usr/local/nginx. confnobody 62474 62473 0? 00:00:00 nginx: worker processroot 62476 18453 0 00:00:00 pts/1 grep -- color = auto nginx [root @ bogon nginx] # kill-INT 62473 method 3: force stop [root @ bogon nginx] # pkill-9 does nginx feel like this is the best thing to remember? Here is the simple installation today. Learn about the configuration tomorrow.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.