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)05/31 Report--
This article mainly explains "how to install Nginx with YUM under the CentOS7 system". The content of 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 "how to install Nginx with YUM under the CentOS7 system".
Brief introduction
Nginx was developed by igor sysoev for the second most visited rambler.ru site in Russia, and the first public version 0.1.0 was released on October 4, 2004. It distributes the source code as a bsd-like license and is known for its stability, rich feature set, sample configuration files, and low consumption of system resources.
Centos 7 condition
The steps in the tutorial require root privileges.
Add nginx to the yum source
Add the centos 7 nginx yum repository, open the terminal, and use the following command:
Sudo rpm-uvh http://nginx.org/packages/centos/7/noarch/rpms/nginx-release-centos-7-0.el7.ngx.noarch.rpm
Second, install nginx
Use the yum command from your centos 7 server to get it from the nginx source server to install nginx:
Sudo yum install-y nginx
Nginx will be installed on your centos 7 server.
3. Start nginx
The newly installed nginx will not start on its own. Run nginx:
Sudo systemctl start nginx.service
If all goes well, now you can visit your web page through your domain name or ip to preview the default page of nginx
If you see this page, then your centos 7 web server has been installed correctly.
Power on centos 7 and start nginx
Sudo systemctl enable nginx.service
Nginx configuration Information
The default directory for storing website files
/ usr/share/nginx/html
Site default site configuration
/ etc/nginx/conf.d/default.conf
Customize the nginx site configuration file storage directory
/ etc/nginx/conf.d/
Nginx global configuration
/ etc/nginx/nginx.conf
Here you can change the settings for the user to run the nginx daemon process, and the number of worker processes to get the nginx running, and so on.
Linux views public network ip
You can run the following command to display the public ip address of your server:
Ip addr show eth0 | grep inet | awk'{print $2;}'| sed's /\ /. * $/ / Thank you for reading. The above is the content of "how to install Nginx with YUM under CentOS7 system". After the study of this article, I believe you have a deeper understanding of how to install Nginx with YUM under the CentOS7 system, and the specific use 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.