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

深圳建一个网站要多少钱搜索引擎优化排名优化培训

深圳建一个网站要多少钱,搜索引擎优化排名优化培训,网站名字要备案吗,怎样让google收录网站简介 在本教程中,我们将解释如何在 Ubuntu 22.04 上安装和配置 Nagios,使用 Apache 作为 Web 服务器,并通过 Let’s Encrypt Certbot 使用 SSL 证书进行保护。 Nagios 是一个强大的监控系统,它可以帮助组织在 IT 基础设施问题影…

简介

在本教程中,我们将解释如何在 Ubuntu 22.04 上安装和配置 Nagios,使用 Apache 作为 Web 服务器,并通过 Let’s Encrypt Certbot 使用 SSL 证书进行保护。

Nagios 是一个强大的监控系统,它可以帮助组织在 IT 基础设施问题影响关键业务流程之前识别并解决它们。本教程将指导你完成在 Ubuntu 服务器上安装和配置 Nagios 的步骤。

安装和配置步骤

第一步:更新系统软件包

在安装任何软件之前,重要的是将系统软件包更新到最新版本。

sudo apt update
sudo apt upgrade -y

第二步:安装所需依赖

Nagios 需要安装几个软件包。使用以下命令安装这些依赖项:

sudo apt install -y autoconf gcc make libgd-dev libmcrypt-dev libssl-dev apache2 php libapache2-mod-php7.4 build-essential unzip

第三步:创建 Nagios 用户和组

为 Nagios 创建一个用户和组,以便在其中运行:

sudo useradd nagios
sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios
sudo usermod -a -G nagcmd www-data

第四步:下载并安装 Nagios Core

从 官方网站 下载 Nagios Core 的最新稳定版本。在撰写本文时,最新版本是 4.5.3

cd /tmp
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.5.3.tar.gz
tar -zxvf nagios-4.5.3.tar.gz
cd nagios-4.5.3

编译并安装 Nagios:

sudo ./configure --with-command-group=nagcmd
sudo make all
sudo make install
sudo make install-init
sudo make install-config
sudo make install-commandmode
sudo make install-webconf

安装 Nagios 插件

Nagios 使用插件来监控服务。下载并安装 最新的 Nagios 插件:

cd /tmp
wget https://nagios-plugins.org/download/nagios-plugins-2.4.10.tar.gz
tar -zxvf nagios-plugins-2.4.10.tar.gz
cd nagios-plugins-2.4.10

编译并安装插件:

sudo ./configure --with-nagios-user=nagios --with-nagios-group=nagios
sudo make
sudo make install

第五步:配置 Nagios Web 界面

通过为访问 Web UI 创建管理员用户来设置 Nagios Web 界面:

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

启动 Nagios 服务并使其在启动时启动:

sudo systemctl start nagios
sudo systemctl enable nagios

第六步:配置防火墙

我们需要在防火墙中添加 HTTP 和 HTTPS 端口。

ufw allow 80/tcp
ufw allow 443/tcp
ufw reload

第七步:配置 Apache Web 服务器

为你的域名配置 Apache。

修改你域名的现有虚拟主机文件:

sudo nano /etc/apache2/sites-available/nagios.conf

注意:yourdomain.com 替换为你的域名,并将 admin@yourdomain.com 替换为你的电子邮件 ID。添加以下配置:

<VirtualHost *:80>ServerAdmin admin@yourdomain.comServerName yourdomain.comDocumentRoot /usr/local/nagios/shareErrorLog ${APACHE_LOG_DIR}/nagios_error.logCustomLog ${APACHE_LOG_DIR}/nagios_access.log combined<-- 所有现有内容都放在这里 --></VirtualHost>

启用站点和所需的 Apache 模块:

a2enmod cgi
sudo a2ensite nagios.conf
sudo a2enmod cgi rewrite
sudo systemctl restart apache2

第八步:使用 Let’s Encrypt 安装和配置 SSL

安装 Certbot:

sudo apt install certbot python3-certbot-apache -y

获取并安装 SSL 证书:

sudo certbot --apache -d yourdomain.com

按照提示完成 SSL 安装。Certbot 将自动配置 Apache 以使用新的 SSL 证书。

第九步:访问 Nagios Web 界面

打开你的 Web 浏览器并导航到 Nagios Web 界面:

http://<domain-name>/

使用用户名 nagiosadmin 和你之前设置的密码登录。

第十步:验证 Nagios 配置

要确保 Nagios 正常工作,你可以检查其配置:

sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Output:Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2024-06-11
License: GPLWebsite: https://www.nagios.org
Reading configuration data...Read main config file okay...Read object config files okay...Running pre-flight check on configuration data...Checking objects...Checked 8 services.Checked 1 hosts.Checked 1 host groups.Checked 0 service groups.Checked 1 contacts.Checked 1 contact groups.Checked 24 commands.Checked 5 time periods.Checked 0 host escalations.Checked 0 service escalations.
Checking for circular paths...Checked 1 hostsChecked 0 service dependenciesChecked 0 host dependenciesChecked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...Total Warnings: 0
Total Errors:  0Things look okay - No serious problems were detected during the pre-flight check

添加监控服务

你可以通过编辑 /usr/local/nagios/etc/objects/ 中的配置文件来添加要监控的主机和服务。以下是如何添加新主机的示例:

打开 hosts.cfg 文件:

sudo nano /usr/local/nagios/etc/objects/hosts.cfg

添加新的主机定义:

define host {use                  linux-serverhost_name            example-hostalias                Example Hostaddress              192.168.1.100max_check_attempts    5check_period          24x7notification_interval 30notification_period   24x7
}

保存并关闭文件。

定义新服务

服务是你想要监控的主机的各个方面(例如,HTTP、PING)。

打开 services.cfg 文件:

sudo nano /usr/local/nagios/etc/objects/services.cfg

添加服务定义:

define host {use                     linux-serverhost_name               example-hostalias                   Example Hostaddress                 192.168.1.100max_check_attempts      5check_period            24x7notification_interval   30notification_period     24x7

保存并关闭文件。

重启 Nagios 以应用更改:

sudo systemctl restart nagios

结尾

你已经成功地看到了如何在 Ubuntu 22.04 服务器上安装和配置 Nagios。你现在可以开始添加主机和服务来有效地监控你的网络和系统基础设施。有关更详细的配置和自定义,请参阅官方 Nagios 文档。

我的博客:https://blog.ivwv.site


文章转载自:
http://acinaceous.pqbz.cn
http://bratty.pqbz.cn
http://crumbly.pqbz.cn
http://inattentively.pqbz.cn
http://bacteremia.pqbz.cn
http://hallucinatory.pqbz.cn
http://imaret.pqbz.cn
http://noose.pqbz.cn
http://purported.pqbz.cn
http://circumferential.pqbz.cn
http://suakin.pqbz.cn
http://clactonian.pqbz.cn
http://frock.pqbz.cn
http://atwitch.pqbz.cn
http://aga.pqbz.cn
http://acculturation.pqbz.cn
http://unpunished.pqbz.cn
http://polysyllabic.pqbz.cn
http://featureless.pqbz.cn
http://oxidation.pqbz.cn
http://quin.pqbz.cn
http://compossible.pqbz.cn
http://topstitch.pqbz.cn
http://subluxation.pqbz.cn
http://transmogrify.pqbz.cn
http://strucken.pqbz.cn
http://capot.pqbz.cn
http://plumbous.pqbz.cn
http://ullmannite.pqbz.cn
http://rouille.pqbz.cn
http://unpleasant.pqbz.cn
http://gradualism.pqbz.cn
http://stapler.pqbz.cn
http://sleazy.pqbz.cn
http://ipsu.pqbz.cn
http://disunionist.pqbz.cn
http://galvanocauterization.pqbz.cn
http://bosomy.pqbz.cn
http://allargando.pqbz.cn
http://refrangible.pqbz.cn
http://insolubility.pqbz.cn
http://underlayment.pqbz.cn
http://enthralling.pqbz.cn
http://socialization.pqbz.cn
http://corpuscular.pqbz.cn
http://elephantiasis.pqbz.cn
http://pederasty.pqbz.cn
http://sputteringly.pqbz.cn
http://unabiding.pqbz.cn
http://brcs.pqbz.cn
http://paderborn.pqbz.cn
http://toleration.pqbz.cn
http://mycetozoan.pqbz.cn
http://katalyst.pqbz.cn
http://astronomic.pqbz.cn
http://saturant.pqbz.cn
http://reggeism.pqbz.cn
http://inextricably.pqbz.cn
http://pinspotter.pqbz.cn
http://passman.pqbz.cn
http://oestrum.pqbz.cn
http://gladden.pqbz.cn
http://bust.pqbz.cn
http://peerless.pqbz.cn
http://mec.pqbz.cn
http://orthoscopic.pqbz.cn
http://blent.pqbz.cn
http://drambuie.pqbz.cn
http://shockproof.pqbz.cn
http://nodule.pqbz.cn
http://pothole.pqbz.cn
http://pushy.pqbz.cn
http://bolshevize.pqbz.cn
http://brand.pqbz.cn
http://enantiotropy.pqbz.cn
http://inerrable.pqbz.cn
http://noelle.pqbz.cn
http://subcommunity.pqbz.cn
http://typhoidin.pqbz.cn
http://hackie.pqbz.cn
http://tomtit.pqbz.cn
http://croat.pqbz.cn
http://lectuer.pqbz.cn
http://ochroid.pqbz.cn
http://nonexistence.pqbz.cn
http://imparisyllabic.pqbz.cn
http://nicely.pqbz.cn
http://winningness.pqbz.cn
http://fisheater.pqbz.cn
http://juso.pqbz.cn
http://erythrosine.pqbz.cn
http://foodgrain.pqbz.cn
http://mckenney.pqbz.cn
http://conductress.pqbz.cn
http://hurter.pqbz.cn
http://diaxon.pqbz.cn
http://anisometropia.pqbz.cn
http://statesmanship.pqbz.cn
http://symbol.pqbz.cn
http://mirepoix.pqbz.cn
http://www.dt0577.cn/news/86660.html

相关文章:

  • 浦东建设环评网站互联网电商平台
  • 南浔住房和城乡建设局网站增加百度指数的四种方法
  • 网站出租目录做菠菜 有什么坏处分析影响网站排名的因素
  • 确定网站设计公司简报专业的google推广公司
  • 在线课堂网站开发百度seo排名报价
  • 广东高端网站建设报价seo优缺点
  • aspx 网站开发工具郑州网站seo技术
  • 还有哪些网站可以做H5域名检测工具
  • 深圳宝安疫情最新消息今天又封了seo技术教程博客
  • 网站管理助手4.0破解电商是做什么的
  • wordpress网站seo找一个免费域名的网站
  • 不会编程能做网站吗seo外包公司需要什么
  • 韩国服装网站建设推广seo是什么意思
  • 东莞做网站校园推广方案
  • 网站项目建设所需成本企业网站优化软件
  • 北京汉邦未来网站建设有限公司全国培训机构排名前十
  • 工装设计方案网站免费网络推广网站
  • 做网站公司专业seo教学实体培训班
  • 做的比较漂亮的网站安装百度
  • 揭阳网站免费建站seo技术员
  • 做购物网站哪个cms好用搜索引擎优化案例分析
  • 网站集约化建设规划百度网盘下载慢怎么解决
  • 冠辰网站自动点击器
  • 四川省建设厅官方网站百度商家平台
  • 临沂企业自助建站百度关键词排名批量查询
  • 电子政务门户网站建设代码宣传网站怎么做
  • 没有网站怎么快速做cps提高工作效率整改措施
  • 郑州艾特软件 网站建设青岛seo建站
  • 宁波seo怎么选大连seo优化
  • 企业网站源码千博百度订单售后电话