In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to configure the Nginx server in the CentOS6.5 system, the article is very detailed, has a certain reference value, interested friends must read!
This paper gives an example of how to install and configure Nginx server in CentOS6.5 system. Share with you for your reference, the details are as follows:
Dependent package installation
Before installing nginx, you need to make sure that the system has the glossy +, gcc, openssl-devel, pcre-devel, and zlib-devel software installed. To install the required software:
[root@admin /] # yum install gcc-c++yum-y install zlib zlib-devel openssl openssl--devel pcrepcre-devel
Check the Nginx installed on the system:
[root@admin local] # find-name nginx
Uninstall the original Nginx
[root@admin /] # yum remove nginx
Installation
Upload the installation package file to / usr/local and do the following:
[root@admin local] # cd / usr/local [root@admin local] # tar-zxv-f nginx-1.2.6.tar.gz [root@admin local] # rm-rf nginx-1.2.6.tar.gz [root@admin local] # mv nginx-1.2.6 nginx [root@admin local] # cd / usr/local/nginx [root@admin nginx] #. / configure-prefix=/usr/local/nginx [root@admin nginx] # make [root@admin nginx] # make install
Configuration
# modify firewall configuration: [root@admin nginx-1.2.6] # vi + / etc/sysconfig/iptables# add configuration item-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 80-jACCEPT# restart firewall [root@admin nginx-1.2.6] # service iptables restart
Start
# method 1 [root@admin nginx-1.2.6] # / usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf# method 2 [root@admin nginx-1.2.6] # cd / usr/local/nginx/sbin [root@admin sbin] #. / nginx
Stop it
# query nginx main process number ps-ef | grep nginx# stop process kill-QUIT main process number # Quick stop kill-TERM main process number # Force stop pkill-9 nginx
Restart
[root@admin local] # / usr/local/nginx/sbin/nginx-s reload
test
# Test Port netstat Cna | Test http://ip:80 in grep 8 browser is all the content of this article "how to configure Nginx server in CentOS6.5 system". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.