In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "steps to install Nginx under centos7". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the steps to install Nginx under centos7".
1. Install make
Yum install gcc automake autoconf libtool make
two。 Install gcc
Yum install gcc gcc-c++
3. Install the pcrelibrary
Download address: https://pan.baidu.com/s/13Kojg2Xcnp06qiw023uHoQ
Upload the downloaded pcre-8.35.tar.gz to the / usr/local/src directory of centos7 via ftp
Cd / usr/local/src# create a new pcre directory mkdir / usr/local/pcre# extract pcre-8.35.tar.gztar zxf pcre-8.35.tar.gzcd pcre-8.35# configuration pcre, specify to install to / usr/local/pcre directory. / configure-- prefix=/usr/local/pcre# compiler installs make & & make install
4. Install the zlib library
Download address: https://pan.baidu.com/s/16f9XnHbz_7EWmQOws1zqMQ
Upload the downloaded zlib-1.2.8.tar.gz to the / usr/local/src directory of centos7 via ftp
Cd / usr/local/src# create a new zlib directory mkdir / usr/local/zlib# extract zlib-1.2.8.tar.gztar zxf zlib-1.2.8.tar.gzcd zlib-1.2.8# configuration zlib, specify to install to / usr/local/zlib directory. / configure-- prefix=/usr/local/zlib# compiler installs make & & make install
5. Install openssl
Download address: https://pan.baidu.com/s/1tsGQGb5fVR9vs1CGPSa37Q
Upload the downloaded openssl-1.0.1h.tar.gz to the / usr/local/src directory of centos7 via ftp
Cd / usr/local/src# create a new openssl directory mkdir / usr/local/openssl# extract openssl-1.0.1h.tar.gztar zxf openssl-1.0.1h.tar.gzcd openssl-1.0.1h# configuration openssl, specify to install to / usr/local/openssl directory. / config-- prefix=/usr/local/openssl# compiler installs make & & make install
Add openssl to the environment variable and open the file / etc/profile
Vim / etc/profile
Add the following text to the last line
Export PATH=$PATH:/usr/local/openssl/bin
Exit save! Execute the following command to make / etc/profile effective immediately
Source / etc/profile
6. Install Nginx
Download nginx, download address: http://nginx.org/download/, there are various versions of nginx here, download nginx-1.9.9.tar.gz for this article
Cd / usr/local/src# download wget http://nginx.org/download/nginx-1.9.9.tar.gz# decompress tar zxf nginx-1.9.9.tar.gz# into nginx-1.9.9 source cd nginx-1.9.9# configuration, specify nginx installation directory / usr/local/nginx Open the corresponding module #-- with-openssl=/usr/local/src/openssl-1.0.1h refers to the source path of openssl-1.0.1h #-- with-zlib=/usr/local/src/zlib-1.2.8 refers to the source path of zlib-1.2.8 #-- with-pcre=/usr/local/src/pcre-8.35 refers to the source path of pcre-8.35. / configure-- prefix=/usr/ Local/nginx-- without-http_memcached_module-- with-http_stub_status_module-- with-http_ssl_module-- with-http_gzip_static_module-- with-openssl=/usr/local/src/openssl-1.0.1h-- with-zlib=/usr/local/src/zlib-1.2.8-- with-pcre=/usr/local/src/pcre-8.35# compile and install make & & make install
7. Start the test Nginx
# Startup / usr/local/nginx/sbin/nginx# shutdown killall nginx# smooth restart / usr/nginx/sbin/nginx-s reload Thank you for reading. The above is the content of "steps to install Nginx under centos7". After the study of this article, I believe you have a deeper understanding of the steps to install Nginx under centos7, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.