In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
            
                    
                
2025-11-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to install and configure Nginx in Linux". 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 how to install and configure Nginx in Linux.
Simple installation
This tutorial-Centos 6.3 as an example, the software package can be downloaded from the official website, compilation and installation, we need to use YUM to install the required software dependency package in advance.
The installation commands are as follows:
[root@centos6 ~] # wget http://nginx.org/download/nginx-1.4.0.tar.gz[root@centos6 ~] # tar-xzf nginx-1.4.0.tar.gz-C / usr/src [root@centos6 ~] # yum-y install gcc pcre pcre-devel openssl\ > openssl-devel gd gd-devel perl perl-ExtUtils-Embed [root@centos6 ~] # cd / usr/src/nginx-1.4.0/ [root@centos6 nginx-1.4.0] #. / configure-- prefix=/usr/local/nginx\ >-- with-ipv6 >-- with-http_ssl_module\ >-- with-http_realip_module\ >-- with-http_addition_module\ >-- with-http_dav_module\ >-- with-http_flv_module\ >-- with-http_mp4_module\ >-- with-http_gzip_static_module\ >-- with-http_perl_module\ >-- with-mail\ > -- with_main_ssl_ module [root @ centos6 nginx-1.4.0] # make & & make install
After the Nginx Web server software is installed, the contents of the home directory of the program located in / usr/local/nginx/, are cong, html, logs, and sbin, respectively. The following are common process management instructions for Nginx:
[root@centos6 ~] # / usr/local/nginx/sbin/nginx # start the main program [root@centos6 ~] # / usr/local/nginx/sbin/nginx-c\ # specify the configuration file to start the main program [root@centos6 ~] # / usr/local/nginx/sbin/nginx-s stop # close the main program [root@centos6 ~] # / usr/local/nginx/sbin/nginx-s reload # reload configuration file resolution
The default configuration file of Nginx is / usr/local/nginx/conf/nginx.conf, which includes global, event, http, and server settings. Event is mainly used to define the working mode of Nginx, http provides Web function, server is used to set up virtual hosts, server must be located inside http, and there can be multiple server in a configuration file.
Thank you for your reading, the above is the content of "how to install and configure Nginx in Linux". After the study of this article, I believe you have a deeper understanding of how to install and configure Nginx in Linux. 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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





            
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.