In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install nginx1.12.1 in centos6.4. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
This article shares the installation tutorial of nginx1.12.1 for your reference. The details are as follows.
Environment required for installation
1. Gcc installation
To install nginx, you need to compile the source code downloaded from the official website. The compilation depends on the gcc environment. If there is no gcc environment, you need to install:
Yum install gcc-c++
2. PCRE pcre-devel installation
PCRE (Perl Compatible Regular Expressions) is a Perl library, including a perl-compatible library of regular expressions. Nginx's http module uses pcre to parse regular expressions, so you need to install the pcre library on linux. Pcre-devel is a secondary development library developed using pcre. This library is also required for nginx. Command:
Yum install-y pcre pcre-devel
3. Zlib installation
The zlib library provides many ways to compress and decompress. Nginx uses zlib to gzip the contents of the http package, so you need to install the zlib library on Centos.
Yum install-y zlib zlib-devel
4. OpenSSL installation
OpenSSL is a powerful secure socket layer cipher library that includes major cryptographic algorithms, commonly used key and certificate encapsulation management functions, and SSL protocols, and provides rich applications for testing or other purposes.
Nginx supports not only the http protocol, but also https (that is, http over the ssl protocol), so you need to install the OpenSSL library on Centos.
Yum install-y openssl openssl-devel
Installation
1.nginx URL
Https://nginx.org/en/download.html
two。 Download using the wget command
# wget-c https://nginx.org/download/nginx-1.12.1.tar.gz
3. Decompression
# tar-zxvf nginx-1.12.1.tar.gz#cd nginx-1.12.1
4. Configuration
#. / configure
5. Installation
# make
# make install
Find the installation path:
# whereis nginx
Start and stop nginx
# cd / usr/local/nginx/sbin/./nginx. / nginx-s stop./nginx-s quit./nginx-s reload
. / nginx-s quit: in this way, the stop step is to stop after the nginx process has finished processing the task.
. / nginx-s stop: this method is equivalent to finding out the nginx process id and then using the kill command to force the killing of the process.
Query the nginx process:
# ps aux | grep nginx
Start nginx and enter localhost in the browser
Thank you for reading! This is the end of the article on "how to install nginx1.12.1 in centos6.4". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 283
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.