In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
entOS-6.8 Install Nginx
Nginx Environment Preparation:
To install Nginx, you need to complete the following dependencies
1. gcc install: yum install gcc-c++
2. PCRE pcre-devel installation: yum install -y pcre pcre-devel
3. zlib install: yum install -y zlib zlib-devel
4. OpenSSL installation:yum install -y openssl openssl-devel
install Nginx
1. Download Nginx
wget -chttps://nginx.org/download/nginx-1.10.1.tar.gz
2. Decompress:
tar -zxvf nginx-1.10.1.tar.gz
3. Configuration:
cd nginx-1.10.1 Enter nginx decompression directory
./ configure
4. Compilation and installation:
make
make install
5. Find the installation path:
whereis nginx
Start, stop Nginx:
1. Find nginx installation path: whereis nginx
2. Go to nginx installation path: cd /usr/local/nginx/sbin
3. Start:
1. ./ nginx
2. /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
Either way.
4. Stop:
Stop calmly: kill -QUIT 19795 (Note: 19795 is the process number of Nginx)
Quick stop: kill -TERM 46968 (Note: 46968 is the process number of Nginx)
kill -INT 46975 (Note: 46975 is the process number of Nginx)
Force Stop: pkill -9 nginx
./ nginx -s stop: This method is equivalent to first finding out the nginx process id and then using the kill command to forcibly kill the process.
./ nginx -s quit: This method stops when the nginx process finishes processing tasks.
Stop and start: ./ nginx -s quit; ./ nginx
5. Restart:
1. Verify that the nginx configuration file is correct:
1. cd /usr/local/nginx/sbin Enter the nginx installation directory and execute./ nginx -t
If correct, the following information will appear:
[root@localhost sbin]# ./ nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
2. /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
If correct, the following information will appear:
[root@localhost sbin]# /usr/local/nginx/sbin/nginx
-t -c /usr/local/nginx/conf/nginx.conf
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
2. If the configuration file is correct, you can restart:
1. ./ nginx -s reload (need to enter nginx executable file directory in advance: cd /usr/local/nginx/sbin)
2. kill -HUP 46991 (46991 is nginx process number)
6. Reload configuration file:
When nginx's configuration file nginx.conf is modified, you need to restart nginx for the configuration to take effect.
Use-s reload to put configuration information into effect in nginx without stopping nginx and then starting nginx
For example: ./ nginx -s reload
Set up Nginx boot:
That is to say, add the startup code to rc.local.
View nginx progress:
1. ps -ef |grep nginx
2.ps aux|grep nginx
Either way.
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.