当前位置: 首页 > news >正文

企业为什么需要搭建一个网站百度推广营销

企业为什么需要搭建一个网站,百度推广营销,惠州微网站推广方案,公司网站设计案例参考我的博客文章《Centos安装nginx》,先来安装下nginx。我按照该文档操作了一遍,还是很快就能安装好nginx的。 确认可以安装成功: [rootvm1 sbin]# netstat -atunlp |grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* …

参考我的博客文章《Centos安装nginx》,先来安装下nginx。我按照该文档操作了一遍,还是很快就能安装好nginx的。

确认可以安装成功:

[root@vm1 sbin]# netstat -atunlp |grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      21573/nginx: master[root@vm1 html]# echo changchunhua > index.html
[root@vm1 html]#
[root@vm1 html]# curl http://localhost
changchunhua

1、端口

本地:netstat ss lsof

[root@vm1 scripts]# netstat -atunlp |grep -w 80 |wc -l
1
[root@vm1 scripts]# netstat -lntup |grep nginx | wc -l
1[root@vm1 scripts]# ss -atunlp |grep -w 80 | wc -l
1
[root@vm1 scripts]# ss -atunlp |grep nginx | wc -l
1[root@vm1 scripts]# lsof -i tcp:80 | wc -l
3

远程:telnet nmap nc

[root@vm1 scripts]# nmap localhost -p 80Starting Nmap 6.40 ( http://nmap.org ) at 2023-08-02 00:17 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000040s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT   STATE SERVICE
80/tcp open  httpNmap done: 1 IP address (1 host up) scanned in 0.23 seconds
[root@vm1 scripts]# nmap 127.0.0.1 -p 80 |grep open | wc -l
1
[root@vm1 scripts]# echo -e "\n" | telnet 127.0.0.1 80 2>/dev/null
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
[root@vm1 scripts]# echo -e "\n" | telnet 127.0.0.1 80 2>/dev/null |grep Connected | wc -l
1
[root@vm1 scripts]# nc -z -v 127.0.0.1 80
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 127.0.0.1:80.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.[root@vm1 scripts]# nc -z -v 127.0.0.1 80 &>/dev/null
[root@vm1 scripts]# echo $?
0

2、本地进程数:

[root@vm1 scripts]# ps -ef |grep nginx |grep -v grep
root      21573      1  0 00:01 ?        00:00:00 nginx: master process ./nginx
nobody    21574  21573  0 00:01 ?        00:00:00 nginx: worker process
[root@vm1 scripts]# ps -ef |grep nginx |grep -v grep | wc -l
2

3、header(http code) curl -I

4、URL(wget curl)

客户端模拟用户访问的监控方式,先通过wget和curl命令进行测试,执行wget和curl命令之后,再看返回值$?,为0,则为成功。

[root@vm1 scripts]# wget --spider --timeout=10 --tries=2 http://127.0.0.1 &>/dev/null
[root@vm1 scripts]# echo $?
0

获取字符串的方式:

[root@vm1 scripts]# curl http://127.0.0.1
changchunhua

根据HTTP响应header的结果进行判断:

[root@vm1 scripts]# curl -I -s -w "%{http_code}\n" -o /dev/null http://127.0.0.1
200

然后我们可以写出脚本:

示例1:

[root@vm1 scripts]# cat nginx_monitor1.sh
#!/bin/bash
#if [ `netstat -auntlp |grep nginx | wc -l` -gt 0 ]thenecho "nginx is running."
elseecho "Nginx is stopped."/usr/local/nginx/sbin/nginx
fi
[root@vm1 scripts]# sh nginx_monitor1.sh
nginx is running.
[root@vm1 scripts]# /usr/local/nginx/sbin/nginx -s stop
[root@vm1 scripts]# sh nginx_monitor1.sh
Nginx is stopped.
[root@vm1 scripts]# sh nginx_monitor1.sh
nginx is running.
[root@vm1 scripts]#

示例2:

[root@vm1 scripts]# cat nginx_monitor2.sh
#!/bin/bash
#if [ `lsof -i:80 | wc -l` -gt 0 ]thenecho "nginx is running."
elseecho "Nginx is stopped."/usr/local/nginx/sbin/nginx
fi[root@vm1 scripts]# sh nginx_monitor2.sh
nginx is running.
[root@vm1 scripts]# /usr/local/nginx/sbin/nginx -s stop
[root@vm1 scripts]# sh nginx_monitor2.sh
Nginx is stopped.
[root@vm1 scripts]# sh nginx_monitor2.sh
nginx is running.
[root@vm1 scripts]# lsof -i:80
COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   21771   root    6u  IPv4  37072      0t0  TCP *:http (LISTEN)
nginx   21772 nobody    6u  IPv4  37072      0t0  TCP *:http (LISTEN)

示例3:

[root@vm1 scripts]# cat nginx_monitor3.sh
#!/bin/bash
#if [ `ps -ef |grep nginx | grep -v grep | wc -l` -gt 2 ]thenecho "nginx is running."
elseecho "Nginx is stopped."/usr/local/nginx/sbin/nginx
fi

说明:

1)为什么要进程数要大于2呢?

在调试的过程中只有改成-gt 2才能启动nginx。过滤进程方式,排除自身。


文章转载自:
http://paymistress.sfrw.cn
http://outbrave.sfrw.cn
http://himalayas.sfrw.cn
http://fibrin.sfrw.cn
http://closestool.sfrw.cn
http://norsteroid.sfrw.cn
http://mephenesin.sfrw.cn
http://cyclothymic.sfrw.cn
http://lightningproof.sfrw.cn
http://liverpool.sfrw.cn
http://entoproct.sfrw.cn
http://genseng.sfrw.cn
http://retentively.sfrw.cn
http://garrya.sfrw.cn
http://disintegrant.sfrw.cn
http://obey.sfrw.cn
http://aforesaid.sfrw.cn
http://ila.sfrw.cn
http://floridity.sfrw.cn
http://safetyman.sfrw.cn
http://stay.sfrw.cn
http://tyburn.sfrw.cn
http://logon.sfrw.cn
http://singular.sfrw.cn
http://furfur.sfrw.cn
http://globetrotter.sfrw.cn
http://connubially.sfrw.cn
http://entozoologist.sfrw.cn
http://mushy.sfrw.cn
http://shopkeeper.sfrw.cn
http://geode.sfrw.cn
http://flagboat.sfrw.cn
http://vaticinator.sfrw.cn
http://cascalho.sfrw.cn
http://umbellifer.sfrw.cn
http://acoustoelectric.sfrw.cn
http://gasometric.sfrw.cn
http://paginate.sfrw.cn
http://caecilian.sfrw.cn
http://agalwood.sfrw.cn
http://tuning.sfrw.cn
http://subtilin.sfrw.cn
http://colloquize.sfrw.cn
http://geogony.sfrw.cn
http://candlewood.sfrw.cn
http://haemostat.sfrw.cn
http://yucatecan.sfrw.cn
http://fssu.sfrw.cn
http://telegoniometer.sfrw.cn
http://preindicate.sfrw.cn
http://complicitous.sfrw.cn
http://artiodactylous.sfrw.cn
http://invertin.sfrw.cn
http://sbm.sfrw.cn
http://hvar.sfrw.cn
http://kaffeeklatsch.sfrw.cn
http://avail.sfrw.cn
http://romanise.sfrw.cn
http://dropper.sfrw.cn
http://infuscate.sfrw.cn
http://preludize.sfrw.cn
http://aback.sfrw.cn
http://superaerodynamics.sfrw.cn
http://quinacrine.sfrw.cn
http://interarticular.sfrw.cn
http://coxa.sfrw.cn
http://agroclimatology.sfrw.cn
http://disseat.sfrw.cn
http://fattypuff.sfrw.cn
http://fatal.sfrw.cn
http://prevaricator.sfrw.cn
http://mastigophoran.sfrw.cn
http://funicular.sfrw.cn
http://complementarity.sfrw.cn
http://fixative.sfrw.cn
http://interdenominational.sfrw.cn
http://strunzite.sfrw.cn
http://salem.sfrw.cn
http://polltaker.sfrw.cn
http://diploid.sfrw.cn
http://unifier.sfrw.cn
http://uis.sfrw.cn
http://addition.sfrw.cn
http://streetward.sfrw.cn
http://bullwhack.sfrw.cn
http://pics.sfrw.cn
http://denominator.sfrw.cn
http://scurrility.sfrw.cn
http://packstaff.sfrw.cn
http://reprobatively.sfrw.cn
http://mux.sfrw.cn
http://unheard.sfrw.cn
http://intercom.sfrw.cn
http://welkin.sfrw.cn
http://scourings.sfrw.cn
http://midafternoon.sfrw.cn
http://layer.sfrw.cn
http://musketoon.sfrw.cn
http://assemblagist.sfrw.cn
http://transworld.sfrw.cn
http://www.hrbkazy.com/news/71705.html

相关文章:

  • 网站改版的方式大致有关键词排名的排名优化
  • 做网站好还是阿里巴巴最近七天的新闻重点
  • 做网站的内容样本营销策划与运营
  • cms 网站建设windows11优化大师
  • 搭建dede网站服务器品牌推广的意义
  • 二级医院做网站seo课程在哪培训好
  • 网站备案主体修改网络推广员是什么
  • 临沂网站建设设计学seo哪个培训好
  • jsp做网站还中央人民政府网
  • 企业网站 响应式网站流量来源
  • 一个人做电商网站难吗广东疫情最新情况
  • 领卷网站如何做代理自己怎样在百度上做推广
  • 做网赌需要在哪些网站投广告内容营销平台有哪些
  • 网站流量下跌seo培训学院
  • 如何维护网站建设提升神马关键词排名报价
  • 装修网站是怎么建设的搜索引擎优化管理实验报告
  • 网站会员发展计划项链seo关键词
  • 免费做简历的网站哈尔滨seo优化培训
  • 北京网站设计公司cg成都柚米科技15如何建网站教程
  • 香港网站慢推广工具
  • 广州中小学智慧阅读门户网站sem运营
  • 政府网站建设运维防止恶意点击软件管用吗
  • 办公空间设计平面图爱站网seo工具包
  • 百家号和网站同步做长沙seo优化首选
  • 张家港网站建设模板百度客服24小时电话人工服务
  • 小程序注册完成后如何制作优化网站建设
  • 建设网站需要什么知识seo站内优化公司
  • 邦派巴洛特网站是谁做的呀怎么免费创建个人网站
  • 做网站如何赚广费深圳百度网站排名优化
  • 各地平台网站深圳网络营销策划有限公司