Nagios是一款开源的系统和网络监控应用,它可以监视你指定的主机与服务,当出现问题时提醒您以帮助你改善系统。 Nagios最初在Linux下运行,但它大多数其他Unix下运行。 Nagios 功能包括: 监控网络服务( SMTP , POP3 , HTTP , NNTP , PING等) 监控主机
Nagios是一款开源的系统和网络监控应用,它可以监视你指定的主机与服务,当出现问题时提醒您以帮助你改善系统。 Nagios最初在Linux下运行,但它大多数其他Unix下运行。
Nagios 功能包括:
- 监控网络服务( SMTP , POP3 , HTTP , NNTP , PING等)
- 监控主机资源(处理器负载,磁盘使用情况等)
- 简单的插件设计,让用户能够轻松开发自己的服务检查
- 并行化服务检查
- 定义网络主机层次结构使用“父”的主机,使检测和区分主机
- 当服务或主机发生问题是通知你(通过电子邮件,寻呼机或用户定义的方法)
- 定义事件处理程序能力,服务或主机运行过程中主动解决问题
- 日志文件
- 支持执行冗余监控主机
- 可选Web界面查看当前网络状态,通知和问题历史,日志文件等。
在安装之前你最好已经安装了lamp服务器软件,另外你还需要安装一些依赖包,使用下面的命令:
sudo apt-get install wget build-essential php5-gd wget libgd2-xpm libgd2-xpm-dev libapache2-mod-php5 apache2-utils daemon<br>
<span><span>下载Nagios及插件:</span></span>
<span><span>wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz<br>
wget http://nchc.dl.sourceforge.net/project/nagios-cn/sourcecode/zh_CN%203.2.3/nagios-cn-3.2.3.tar.bz2<br>
wget http://nchc.dl.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.3/nagios-3.2.3.tar.gz<br>
</span></span>
添加 Nagios 用户和群组
adduser nagios<br> /usr/sbin/groupadd nagcmd<br> /usr/sbin/usermod -G nagcmd nagios<br> /usr/sbin/usermod -G nagcmd www-data<br>
现在安装 nagios
尽量使用 root 身份登录,运行以下命令
解压缩下载的文件(Nagios的内核和插件)
1、Nagios内核安装:
tar zxvf nagios-3.2.3.tar.gz <br> tar zxvf nagios-plugins-2.0.3.tar.gz <br> cd nagios-3.2.3/<br> apt-get install sendmail<br> ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/sbin/sendmail<br> make all<br> make install<br> make install-init<br> make install-commandmode<br> make install-config<br> make install-webconf<br> cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/<br> chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers<br> /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg<br> /etc/init.d/nagios start
2、插件安装<br> cd ..<br> cd nagios-plugins-2.0.3/<br> ./configure --with-nagios-user=nagios --with-nagios-group=nagios<br> make<br> make install<br> ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios<br> apt-get install libxml2<br> apt-get install libxml2-dev<br> sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server<br> sudo touch /var/www/test.php<br> vim /var/www/test.php<br> sudo apt-get install php5-gd php5-curl php5-xdebug<br> sudo /etc/init.d/nagios restart
3、安装中文插件<br> cd ..<br> tar xvf nagios-cn-3.2.3.tar.bz2 <br> cd nagios-cn-3.2.3/<br> ./configure --with-nagios-user=nagios --with-nagios-group=nagios<br> make all<br> make<br> make install<br> make install-init<br> make install-commandmode<br> make install-config<br> htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin<br>
sudo /etc/init.d/nagios restart <br>
访问nagios地址:http://localhost/nagios
<br>
<br>
<br>

MySQLstringtypesimpactstorageandperformanceasfollows:1)CHARisfixed-length,alwaysusingthesamestoragespace,whichcanbefasterbutlessspace-efficient.2)VARCHARisvariable-length,morespace-efficientbutpotentiallyslower.3)TEXTisforlargetext,storedoutsiderows,

MySQLstringtypesincludeVARCHAR,TEXT,CHAR,ENUM,andSET.1)VARCHARisversatileforvariable-lengthstringsuptoaspecifiedlimit.2)TEXTisidealforlargetextstoragewithoutadefinedlength.3)CHARisfixed-length,suitableforconsistentdatalikecodes.4)ENUMenforcesdatainte

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,2)VARCHARforvariable-lengthtext,3)BINARYandVARBINARYforbinarydata,4)BLOBandTEXTforlargedata,and5)ENUMandSETforcontrolledinput.Eachtypehasspecificusesandperformancecharacteristics,sochoose

TograntpermissionstonewMySQLusers,followthesesteps:1)AccessMySQLasauserwithsufficientprivileges,2)CreateanewuserwiththeCREATEUSERcommand,3)UsetheGRANTcommandtospecifypermissionslikeSELECT,INSERT,UPDATE,orALLPRIVILEGESonspecificdatabasesortables,and4)

ToaddusersinMySQLeffectivelyandsecurely,followthesesteps:1)UsetheCREATEUSERstatementtoaddanewuser,specifyingthehostandastrongpassword.2)GrantnecessaryprivilegesusingtheGRANTstatement,adheringtotheprincipleofleastprivilege.3)Implementsecuritymeasuresl

ToaddanewuserwithcomplexpermissionsinMySQL,followthesesteps:1)CreatetheuserwithCREATEUSER'newuser'@'localhost'IDENTIFIEDBY'password';.2)Grantreadaccesstoalltablesin'mydatabase'withGRANTSELECTONmydatabase.TO'newuser'@'localhost';.3)Grantwriteaccessto'

The string data types in MySQL include CHAR, VARCHAR, BINARY, VARBINARY, BLOB, and TEXT. The collations determine the comparison and sorting of strings. 1.CHAR is suitable for fixed-length strings, VARCHAR is suitable for variable-length strings. 2.BINARY and VARBINARY are used for binary data, and BLOB and TEXT are used for large object data. 3. Sorting rules such as utf8mb4_unicode_ci ignores upper and lower case and is suitable for user names; utf8mb4_bin is case sensitive and is suitable for fields that require precise comparison.

The best MySQLVARCHAR column length selection should be based on data analysis, consider future growth, evaluate performance impacts, and character set requirements. 1) Analyze the data to determine typical lengths; 2) Reserve future expansion space; 3) Pay attention to the impact of large lengths on performance; 4) Consider the impact of character sets on storage. Through these steps, the efficiency and scalability of the database can be optimized.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools
