Redhat安装icinga2
所需rpm包下载网址:http://packages.icinga.org/epel/
http://mirrors.hypo.cn/icinga/fedora/21/release/noarch (icingaweb2包)
php-intl、php-pecl-imagick需要单独下
需要的包:libboost_system1、libboost_thread1、libboost_regex1、libedit、boost-license、icinga2、icinga2-bin、icinga2-common、icingaweb2、icingaweb2-common、icingaweb2-vendor-*(6个)、php-icinga、icingacli
安装httpd:
# yuminstall httpd
# yuminstall php php-gd
# rpm –ilibboost* boost-license (需先下载好)
# rpm –iicinga2* (需先下载好)
# cp –rv/etc/icinga2/icinga2.conf /etc/httpd/conf.d/
# cp –rv/etc/icinga2/constants.conf /etc/httpd/
# cp –rv/etc/icinga2/zones.conf /etc/httpd/
安装mysql:
# yuminstall mysql-server
# mysql–u root
use mysql;
update user set password=password(’xxxx’) where user=’root’;
flush privileges;
quit
# mysql –uroot –p’xxxx’
create database icinga2;
grant all on icinga2.* to icinga2@localhost identified by ‘xxxxxx’;
flush privileges;
quit
# mysql –uroot –p’xxxx’ icinga2 </usr/share/icinga2-ido-mysql/schema/mysql.sql
# rpm –iicingaweb2-*
#service httpd restart
页面访问:http://ip/icingaweb2
暂时还不能登录,点击账号上面的web-basedsetup-wizard
然后照着提示在命令行里操作:
#icingacli setup config directory --group icingaweb2
#icingacli setup token create
# su -c"mkdir -m 2770 /etc/icingaweb2;chgrp icingaweb2 /etc/icingaweb2;head -c 12/dev/urandom | base64 | tee /etc/icingaweb2/setup.token;chmod 0660/etc/icingaweb2/setup.token;"
然后将乱码贴到页面上
模块部分全勾,然后会提示the phpconfig ‘date.timezone‘ is not defined
# vi/etc/php5/apache2/php.ini
date.timezone= Asia/Shanghai (默认是注释掉的)
:wq
#service apache2 restart
再点击refresh即可(其它黄色提示可忽略)——Database——将数据库、用户名等补上,勾上Skip Validation——设置管理账号及密码
本文出自 “linux” 博客,请务必保留此出处http://yangzhiming.blog.51cto.com/4849999/1729991
原文:http://yangzhiming.blog.51cto.com/4849999/1729991