Statement:
Program: ICINGA2
Pages: ICINGAWEB2
First, set SELinux
[Email protected] ~]# Setenforce 0
[[email protected] ~]# echo ' setenforce 0 ' >>/etc/rc.local
Second, set iptables
[Email protected] ~]# Vi/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT
[Email protected] ~]# service iptables restart
[Email protected] ~]# chkconfig iptables on
Third, set NTP
[email protected] ~]# Yum install ntp-y
[Email protected] ~]# CRONTAB-E
*/20 * * * */usr/sbin/ntpdate 202.120.2.101 >/dev/null &
Iv. installation of development tools
[email protected] ~]# Yum groupinstall development tools
V. Installing software dependency Packages
[email protected] ~]# Yum install php-cli php-pear php-xmlrpc php-xsl php-pdo php-soap php-gd php-ldap
[Email protected]_139_76_centos ~]# yum install php php-mysql-y
[Email protected]_139_76_centos ~]# Yum Update
Vi. acquisition of ICINGA2 Epel
[Email protected] ~]# rpm--import Http://packages.icinga.org/icinga.key
[Email protected] ~]# wget Http://packages.icinga.org/epel/ICINGA-release.repo-O/etc/yum.repos.d/ Icinga-release.repo
[email protected] ~]# Yum Makecache
Vii. installation of ICINGA2
[email protected] ~]# Yum install ICINGA2
[email protected] ~]# Yum install Boost-regex boost-system boost-test boost-thread Icinga2-common libboost_regex-mt L IBBOOST_SYSTEM-MT LIBBOOST_THREAD-MT
Eight, install MySQL
[email protected] ~]# Yum install mysql-server mysql-y
[[Email protected] ~]# service mysqld start
[Email protected] ~]#/usr/bin/mysqladmin-u root password ' Delln4020 '
[Email protected] ~]# chkconfig mysqld on
Ix. installation of ICINGAWEB2
[Email protected]_139_76_centos ~]# Yum Install httpd-y
[[Email Protected]_139_76_centos ~]# git clone git://git.icinga.org/icingaweb2.git
[Email protected]_139_76_centos ~]# MV Icingaweb2/usr/share/icingaweb
[[Email protected]_139_76_centos ~]#/usr/share/icingaweb/bin/icingacli Setup config webserver Apache--document-root/ Usr/share/icingaweb/public
Alias/icingaweb "/usr/share/icingaweb/public"
<directory "/usr/share/icingaweb/public" >
Options SymLinksIfOwnerMatch
AllowOverride None
# Apache 2.4
Require all granted
# Apache 2.2
Order Allow,deny
Allow from all
SETENV Icingaweb_configdir "/etc/icingaweb"
Enablesendfile OFF
Rewriteengine on
rewritebase/icingaweb/
Rewritecond%{request_filename}-S [OR]
Rewritecond%{request_filename}-l [OR]
Rewritecond%{request_filename}-D
Rewriterule ^.*$-[nc,l]
Rewriterule ^.*$ index.php [nc,l]
DirectoryIndex error_norewrite.html
ErrorDocument 404/error_norewrite.html
</Directory>
[Email Protected]_139_76_centos ~]# vi/etc/httpd/conf.d/icingaweb.conf
#写入以上生成的配置文件
[Email protected]_139_76_centos ~]# chown apache.apache/usr/share/icingaweb/public/*-R
[[Email protected]_139_76_centos ~]# service httpd start
[Email protected]_139_76_centos ~]# chkconfig iptables on
X. Creating a Icinga Database
[Email protected] ~]# mysql-u root-p
mysql> CREATE DATABASE Icinga;
Mysql> Grant SELECT, INSERT, UPDATE, delete, drop, create view, Index, execute on icinga.* to ' icinga ' @ ' localhost ' iden Tified by ' Icinga ';
Mysql> Grant execute on icinga.* to ' icinga ' @ ' localhost ';
mysql> flush Privileges;
Mysql> quit
Xi. Creating a ICINGAWEB2 database
[Email protected] ~]# mysql-u root-p
mysql> CREATE DATABASE icingaweb2;
Mysql> Grant SELECT, INSERT, UPDATE, delete, drop, create view, Index, execute on icingaweb2.* to ' ICINGAWEB2 ' Localho St ' identified by '
‘;
mysql> flush Privileges;
Mysql> quit
12. Install DB DBO
[email protected] ~]# Yum install icinga2-ido-mysql icinga-idoutils-libdbi-mysql
13. Import the Database
[Email protected] ~]# mysql-u root-p Icinga </usr/share/icinga2-ido-mysql/schema/mysql.sql
[[Email Protected]_139_76_centos ~]# mysql-u root-p icingaweb2 </usr/share/icingaweb/etc/schema/mysql.schema.sql
14, install the plug-in
[email protected] ~]# Yum install Nagios-plugins-all
XV, start Icinga2 and Ido
[[Email protected] ~]# service ICINGA2 start
[Email protected] ~]# chkconfig ICINGA2 on
[[Email protected] ~]# service ido2db start
[Email protected] ~]# chkconfig ido2db on
16. Visit ICINGA2
[Email protected] conf]# service httpd restart
[Email protected] conf]# chkconfig httpd on
Http://server-ip/icingaweb
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/57/28/wKioL1STifLikR67AALBd8ArSuM626.jpg "title=" 28a3c856-099f-4404-80ac-0c2ccd9430b6.png "alt=" Wkiol1stiflikr67aalbd8arsum626.jpg "/>
[[Email protected]_139_76_centos ~]#/usr/share/icingaweb/bin/icingacli Setup config createdirectory Apache
[[Email protected]_139_76_centos ~]#/USR/SHARE/ICINGAWEB/BIN/ICINGACLI Setup token create
The newly generated setup token IS:3D10D82C93F20CB3
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/28/wKioL1STiomAxMbgAAV3vC0xGAQ203.jpg "title=" 3.png " alt= "Wkiol1stiomaxmbgaav3vc0xgaq203.jpg"/>650) this.width=650; src= http://s3.51cto.com/wyfs02/M00/57/2B/ Wkiom1stijdadttgaaitsspgbku968.jpg "title=" 4.png "alt=" Wkiom1stijdadttgaaitsspgbku968.jpg "/>
[Email Protected]_139_76_centos ~]# Vi/etc/php.ini
;d Ate.timezone =
Change to:
Date.timezone = Asia/shanghai
[Email protected]_139_76_centos ~]# Yum Install Php-intl
[Email protected]_139_76_centos ~]# Yum Install Php-pecl-imagick
[Email protected]_139_76_centos ~]# Yum Install Php-pgsql
[Email protected]_139_76_centos ~]# service httpd restart
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/2B/wKiom1STio3DRPLSAAhruluuZN4330.jpg "title=" 5.png " alt= "Wkiom1stio3drplsaahruluuzn4330.jpg"/>650) this.width=650; src= http://s3.51cto.com/wyfs02/M00/57/2B/ Wkiom1stisqx5bchaajliimrze0427.jpg "title=" 6.png "alt=" wkiom1stisqx5bchaajliimrze0427.jpg "/>650) this.width= 650; "Src=" http://s3.51cto.com/wyfs02/M01/57/28/wKioL1STi3yidfy9AAI5BcXJ_5g083.jpg "title=" 7.png "alt=" Wkiol1sti3yidfy9aai5bcxj_5g083.jpg "/>650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M02/57/28/ Wkiol1sti6rjfxcoaanb2fdpn9s593.jpg "title=" 8.png "alt=" wkiol1sti6rjfxcoaanb2fdpn9s593.jpg "/>650) this.width= 650; "Src=" http://s3.51cto.com/wyfs02/M00/57/28/wKioL1STjBGD2y75AAJqKAWYAc0314.jpg "title=" 9.png "alt=" Wkiol1stjbgd2y75aajqkawyac0314.jpg "/>650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M01/57/28/ Wkiol1stjc3dksadaaktxbgxyy4349.jpg "title=" 10.png "alt=" wkiol1stjc3dksadaaktxbgxyy4349.jpg "/>650) this.width= 650; "Src=" http://s3.51Cto.com/wyfs02/m02/57/2b/wkiom1sti9ba2gqxaakimyzn7ae896.jpg "title=" 11.png "alt=" Wkiom1sti9ba2gqxaakimyzn7ae896.jpg "/>650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M01/57/28/ Wkiol1stjjdw1e3xaalkhsln0ge701.jpg "title=" 12.png "alt=" wkiol1stjjdw1e3xaalkhsln0ge701.jpg "/>650) this.width= 650; "Src=" http://s3.51cto.com/wyfs02/M02/57/2B/wKiom1STjEbwFIz3AAQShkJLRYQ548.jpg "title=" 13.png "alt=" Wkiom1stjebwfiz3aaqshkjlryq548.jpg "/>650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M00/57/2B/ Wkiom1stjfdhvc7saan6owyeb48645.jpg "title=" 14.png "alt=" wkiom1stjfdhvc7saan6owyeb48645.jpg "/>650) this.width= 650; "Src=" http://s3.51cto.com/wyfs02/M01/57/29/wKioL1STjSvABAwHAAQdABb9zWs295.jpg "title=" 15.png "alt=" Wkiol1stjsvabawhaaqdabb9zws295.jpg "/>650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M01/57/2B/ Wkiom1stji_ce-0eaaopieeaffw072.jpg "title=" 16.png "alt=" wkiom1stji_ce-0eaaopieeaffw072.jpg "/>650) this.width= 650; "Src=" http://s3.51cto.com/wyfs02/M02/57/29/wKioL1STjWhztiqpaan7l7lefag898.jpg "title=" 17.png "alt=" wkiol1stjwhztiqpaan7l7lefag898.jpg "/>650" this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/29/wKioL1STjWnC0RQAAAUe-g0PvAE550.jpg "title=" 18.png "alt=" Wkiol1stjwnc0rqaaaue-g0pvae550.jpg "/>650) this.width=650;" Src= "http://s3.51cto.com/wyfs02/M01/57/2B/ Wkiom1stjnzybgwqaasg4owvhy8200.jpg "title=" 19.png "alt=" Wkiom1stjnzybgwqaasg4owvhy8200.jpg "/>
This article from "linjianying110" blog, declined reprint!
Installation Configuration Icinga2