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 mainly introduces "LNMP compilation and installation of nginx how to install configuration", in the daily operation, I believe that many people have doubts about how to install and configure LNMP compilation and installation of nginx. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to install and configure nginx of LNMP compilation and installation". Next, please follow the editor to study!
1. Preface
The source code installation is used for this installation. The main resource packages are downloaded from the official website, while the secondary dependencies are installed using yum. This article only deals with the installation of nginx, not the configuration of nginx. This article does not cover how nginx accesses php.
2. Installation steps
Nginx
2.1.download nginx
Wget http://nginx.org/download/nginx-1.12.0.tar.gz
Download the pcre installation package
Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
This package does not need to be installed, it is just a medium
2.3.Unpack nginx and pcre
Tar zxvf nginx-1.12.0.tar.gz
Tar zxvf pcre-8.39.tar.gz
2.4. Install dependency packages
Yum install-y gcc gcc-c++ zlib-devel
2.5.Generate makefile file
Cd nginx-1.12.0
. / configure-- prefix=/usr/local/nginx (installation directory)-- with-pcre=../pcre-8.39/ (pcre relative directory)
The results are as follows:
2.6. Compile and install
Make & & make install
The results are as follows:
At this point, the nginx installation is complete.
3. Start nginx
/ usr/local/nginx/sbin/nginx
Check the running status via ps aux | grep nginx
At this point, the nginx starts normally.
4. Open 80 ports for external access
If you only run without opening the port, the browser is inaccessible.
Firewall-cmd-zone=public-add-port=80/tcp-permanent
Successful opening of port 80
To open the play port, you need to restart the firewall.
Systemctl restart firewalld.service
At this point, you can reopen the browser and access it.
When you visit the browser, the interface above indicates that nginx has been installed.
At this point, the study on "how to install the configuration of nginx for LNMP compilation and installation" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.