In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to install nginx1.12.1 under centos6.4". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
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
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
This is the end of "how to install nginx1.12.1 under centos6.4". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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: 0
*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.