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--
Nginx installation
Ensure that virtual machines surf the Internet:
1. Root user login
2. View nginx installation information: yum info nginx
3. If the nginx information is not found, execute as follows:
Rpm-ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
4. Check the installation information of nginx
5. If you have the information, install the nginx command: yum install nginx
6. Check http://192.168.1.7. If the nginx page appears, you will ok it.
Nginx.conf profile details
User nginx;worker_processes 1 errorists log / var/log/nginx/error.log warn;pid / var/run/nginx.pid;events {worker_connections 1024;} http {include / etc/nginx/mime.types; default_type application/octet-stream Log_format main'$remote_addr-$remote_user [$time_local] "$request"'$status $body_bytes_sent "$http_referer"'"$http_user_agent"$http_x_forwarded_for"; log_format liuhao'$remote_ addr ^ A $MSC ^ A $http_ host A $request_uri'; access_log / var/log/nginx/access.log main; sendfile on; # tcp_nopush on; keepalive_timeout 65; # gzip on # include / etc/nginx/conf.d/*.conf;server {listen 80; server_name localhost; # access_log / var/log/nginx/host.access.log main;location ~ .jpg {root / data/www/web; index index.html index.htm; access_log / var/log/nginx/gp1918.log liuhao;} location ~ / {root / usr/share/nginx/html; index index.html index.htm Access_log / var/log/nginx/access.log main;}
The nginx.conf under / etc/nginx is a custom configuration file that directly configures the above
The default profile under nginx/conf.d does not need to be modified
Restart the NGINX service service nginx restart after replacement
Open two windows for monitoring
Tail-f / var/log/nginx/access.logtail-f / var/log/nigx/gp1918.log
Gp1918.log.log needs to create its own.
Mkdir / data/www/web/test.jpg; needs to be created by yourself.
Create a jpg file in this directory or put a picture directly
Enter your own ip/test.jpg on the web page
Finally, look at the monitoring.
Another monitoring is only available when you visit ip.
Summary
The above is the problem of nginx monitoring under linux introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message, and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
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.