Chinaunix首页 | 论坛 | 博客
  • 博客访问: 353857
  • 博文数量: 49
  • 博客积分: 817
  • 博客等级: 军士长
  • 技术积分: 496
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-16 19:05
文章分类

全部博文(49)

文章存档

2014年(6)

2013年(7)

2012年(8)

2011年(28)

分类: LINUX

2014-09-25 17:20:58


http://documentation.centreon.com/docs/centreon/en/latest/installation/from_sources.html

version: 2.5.1
========================================================
sudo 权限
## BEGIN: CENTREON SUDO
#Add by CENTREON installation script
User_Alias      CENTREON=apache,centreon
Defaults:CENTREON !requiretty
# Monitoring engine Restart
CENTREON   ALL = NOPASSWD: /etc/init.d/nagios* restart
CENTREON   ALL = NOPASSWD: /etc/init.d/nagios restart
# Monitoring engine reload
CENTREON   ALL = NOPASSWD: /etc/init.d/nagios* reload
CENTREON   ALL = NOPASSWD: /etc/init.d/nagios reload
# Monitoring engine force-reload
CENTREON   ALL = NOPASSWD: /etc/init.d/nagios* force-reload
CENTREON   ALL = NOPASSWD: /etc/init.d/nagios force-reload
# Monitoring engine test config
CENTREON   ALL = NOPASSWD: /usr/local/nagios/bin/nagios* -v *
CENTREON   ALL = NOPASSWD: /usr/local/nagios/bin/nagios -v *
# Monitoring engine test for optim config
CENTREON   ALL = NOPASSWD: /usr/local/nagios/bin/nagios* -s *
CENTREON   ALL = NOPASSWD: /usr/local/nagios/bin/nagios -s *
# Snmptrapd Restart
CENTREON   ALL = NOPASSWD: /etc/init.d/snmptrapd restart
# Centreontrapd restart
CENTREON   ALL = NOPASSWD: /etc/init.d/centreontrapd restart
# Centreontrapd reload
CENTREON   ALL = NOPASSWD: /etc/init.d/centreontrapd reload
# CentStorage Restart
CENTREON   ALL = NOPASSWD: /etc/init.d/centstorage restart
# CentStorage stop
CENTREON   ALL = NOPASSWD: /etc/init.d/centstorage stop
# CentStorage start
CENTREON   ALL = NOPASSWD: /etc/init.d/centstorage start
# Broker engine Restart
CENTREON   ALL = NOPASSWD: /etc/init.d/ndo2db* restart
CENTREON   ALL = NOPASSWD: /etc/init.d/ndo2db restart
# Broker engine reload
CENTREON   ALL = NOPASSWD: /etc/init.d/ndo2db* reload
CENTREON   ALL = NOPASSWD: /etc/init.d/ndo2db reload
## END: CENTREON SUDO

或者简化成如下:
User_Alias CENTREON=apache,centreon
Defaults:CENTREON !requiretty
CENTREON ALL=NOPASSWD:ALL
========================================================
$ yum install -y httpd gd fontconfig-devel libjpeg-devel libpng-devel gd-devel perl-GD \
    openssl-devel perl-DBD-MySQL mysql-server mysql-devel php php-mysql php-gd php-ldap php-xml php-mbstring \
    perl-Config-IniFiles perl-DBI perl-DBD-MySQL rrdtool rrdtool-perl perl-Crypt-DES perl-Digest-SHA1 \
    perl-Digest-HMAC net-snmp-utils perl-Socket6 perl-IO-Socket-INET6 net-snmp net-snmp-libs php-snmp \
    dmidecode lm_sensors perl-Net-SNMP net-snmp-perl fping cpp gcc gcc-c++ libstdc++ glib2-devel \
    php-pear

$ usermod -U apache
$ pear channel-update pear.php.net
$ pear upgrade-all
######## 如果不能联外网,需要使用yum来更新 pear 库##########

php-pear-Date-1.4.7-2.el5
php-pear-DB-DataObject-FormBuilder-1.0.0-1.el5
php-pear-Mail-1.1.14-5.el5.1
php-pear-HTML-Table-1.7.5-1.el5
php-pear-Net-Traceroute-0.21.3-1.el5
php-pear-Log-1.12.7-1.el5
php-pear-1.4.9-8.el5
php-pear-MDB2-2.4.1-2.el5
php-pear-HTML-QuickForm-3.2.12-1.el5
php-pear-Auth-SASL-1.0.4-1.el5
php-pear-Net-Ping-2.4.5-1.el5
php-pear-Net-URL-1.0.15-1.el5
php-pear-DB-1.7.13-1.el5
php-pear-DB-DataObject-1.8.12-1.el5
php-pear-HTML-QuickForm-ElementGrid-0.1.1-1.el5
php-pear-Net-Socket-1.0.10-1.el5
php-pear-Mail-Mime-1.4.0-2.el5
php-pear-HTTP-Request-1.4.4-1.el5
php-pear-HTML-Common-1.2.5-1.el5
php-pear-Net-SMTP-1.4.4-1.el5
php-pear-SOAP-0.11.0-2.el5
php-pear-Validate-0.8.3-1.el5
php-pear-HTML-QuickForm-advmultiselect-1.4.1-1.el5
php-pear-Net-DIME-1.0.1-1.el5

##### Archive_Zip 不在 yum 源里,下载后手动安装

pear install /tmp/Archive_Zip-0.1.2.tgz

========================================================
[root@cndaldmz01vl centreon-2.5.1]#./install.sh -i
###############################################################################
#                                                                             #
#                         Centreon ()                         #
#                          Thanks for using Centreon                          #
#                                                                             #
#                                    v2.5.0                                   #
#                                                                             #
#                               infos@centreon.com                            #
#                                                                             #
#                   Make sure you have installed and configured               #
#                   sudo - sed - php - apache - rrdtool - mysql               #
#                                                                             #
###############################################################################
------------------------------------------------------------------------
        Checking all needed binaries
------------------------------------------------------------------------
rm                                                         OK
cp                                                         OK
mv                                                         OK
/bin/chmod                                                 OK
/bin/chown                                                 OK
echo                                                       OK
more                                                       OK
mkdir                                                      OK
find                                                       OK
/bin/grep                                                  OK
/bin/cat                                                   OK
/bin/sed                                                   OK

You will now read Centreon Licence.
        Press enter to continue.
                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

...................
...................
...................

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

Do you accept GPL license ?
[y/n], default to [n]:
> y
------------------------------------------------------------------------
        Please choose what you want to install
------------------------------------------------------------------------

Do you want to install : Centreon Web Front
[y/n], default to [n]:
> y

Do you want to install : Centreon CentCore
[y/n], default to [n]:
> y

Do you want to install : Centreon Nagios Plugins
[y/n], default to [n]:
> y

Do you want to install : Centreon Snmp Traps process
[y/n], default to [n]:
> y

------------------------------------------------------------------------
        Start CentWeb Installation
------------------------------------------------------------------------

Where is your Centreon directory?
default to [/usr/local/centreon]
>    

Do you want me to create this directory ? [/usr/local/centreon]
[y/n], default to [n]:
> y
Path /usr/local/centreon                                   OK

Where is your Centreon log directory
default to [/usr/local/centreon/log]
>

Do you want me to create this directory ? [/usr/local/centreon/log]
[y/n], default to [n]:
> y
Path /usr/local/centreon/log                               OK

Where is your Centreon etc directory
default to [/etc/centreon]
>

Do you want me to create this directory ? [/etc/centreon]
[y/n], default to [n]:
> y
Path /etc/centreon                                         OK

Where is your Centreon binaries directory
default to [/usr/local/centreon/bin]
>

Do you want me to create this directory ? [/usr/local/centreon/bin]
[y/n], default to [n]:
> y
Path /usr/local/centreon/bin                               OK

Where is your Centreon data informations directory
default to [/usr/local/centreon/data]
>

Do you want me to create this directory ? [/usr/local/centreon/data]
[y/n], default to [n]:
> y
Path /usr/local/centreon/data                              OK

Where is your Centreon variable library directory?
default to [/var/lib/centreon]
>

Do you want me to create this directory ? [/var/lib/centreon]
[y/n], default to [n]:
> y
Path /var/lib/centreon                                     OK
/usr/bin/rrdtool                                           OK
/bin/mail                                                  OK
/usr/bin/php                                               OK

Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]
> /usr/share/pear/PEAR.php
Path /usr/share/pear                                       OK
/usr/bin/perl                                              OK
Finding Apache user :                                      apache
Finding Apache group :                                     apache

What is the Centreon group ? [centreon]
default to [centreon]
>

Do you want me to create this group ? [centreon]
[y/n], default to [n]:
> y

What is the Centreon user ? [centreon]
default to [centreon]
>

Do you want me to create this user ? [centreon]
[y/n], default to [n]:
> y

What is the Monitoring engine user ?
> nagios

What is the Broker user ? (optional)
> nagios

What is the Monitoring engine log directory ?
> /var/log/nagios

Where is your monitoring plugins (libexec) directory ?
default to [/usr/lib/nagios/plugins]
>
Path /usr/lib/nagios/plugins                               OK
Add group centreon to user apache                          OK
Add group centreon to user nagios                          OK
Add group nagios to user apache                            OK
Add group nagios to user centreon                          OK

------------------------------------------------------------------------
        Configure Sudo
------------------------------------------------------------------------

Where is sudo configuration file
default to [/etc/sudoers]
>
/etc/sudoers                                               OK

What is the Monitoring engine init.d script ?
>
/tmp/centreon-2.5.1/libinstall/functions: line 1669: =not_define: command not found
 is not executable.                                        CRITICAL

What is the Monitoring engine init.d script ?
> /etc/init.d/nagios

What is the Monitoring engine binary ?
> /usr/local/nagios/bin/nagios

What is the Monitoring engine configuration directory ?
> /usr/local/nagios/etc   

Where is the configuration directory for broker module ?
> /usr/local/nagios/etc

Where is the init script for broker module daemon ?
> /etc/init.d/ndo2db
Your sudo is not configured

Do you want me to configure your sudo ? (WARNING)
[y/n], default to [n]:
> y
Configuring Sudo                                           OK

------------------------------------------------------------------------
        Configure Apache server
------------------------------------------------------------------------

Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
Create '/etc/httpd/conf.d/centreon.conf'                   OK
Configuring Apache                                         OK

Do you want to reload your Apache ?
[y/n], default to [n]:
> y
Reloading Apache service                                   OK
Preparing Centreon temporary files
Change right on /usr/local/centreon/log                    OK
Change right on /etc/centreon                              OK
Change macros for insertBaseConf.sql                       OK
Change macros for sql update files                         OK
Change macros for php files                                OK
Change macros for perl binary                              OK
Change right on /usr/local/nagios/etc                      OK
Add group nagios to user apache                            OK
Add group nagios to user nagios                            OK
Add group centreon to user nagios                          OK
Copy CentWeb in system directory
Install CentWeb (web front of centreon)                    OK
Change right for install directory
Change right for install directory                         OK
Install libraries                                          OK
Write right to Smarty Cache                                OK
Copying libinstall                                         OK
Change macros for centreon.cron                            OK
Install Centreon cron.d file                               OK
Change macros for centAcl.php                              OK
Change macros for downtimeManager.php                      OK
Install cron directory                                     OK
Change right for eventReportBuilder                        OK
Change right for dashboardBuilder                          OK
Change macros for centreon.logrotate                       OK
Install Centreon logrotate.d file                          OK
Prepare centFillTrapDB                                     OK
Install centFillTrapDB                                     OK
Prepare centreon_trap_send                                 OK
Install centreon_trap_send                                 OK
Prepare centreon_check_perfdata                            OK
Install centreon_check_perfdata                            OK
Prepare centreonSyncPlugins                                OK
Install centreonSyncPlugins                                OK
Prepare centreonSyncArchives                               OK
Install centreonSyncArchives                               OK
Install generateSqlLite                                    OK
Install changeRrdDsName.pl                                 OK
Prepare export-mysql-indexes                               OK
Install export-mysql-indexes                               OK
Prepare import-mysql-indexes                               OK
Install import-mysql-indexes                               OK
Centreon Web Perl lib installed                            OK

------------------------------------------------------------------------
Pear Modules
------------------------------------------------------------------------
Check PEAR modules
PEAR                            1.4.9       1.4.9          OK
DB                              1.7.6                      NOK
DB_DataObject                   1.8.4                      NOK
DB_DataObject_FormBuilder       1.0.0RC4                   NOK
MDB2                            2.0.0                      NOK
Date                            1.4.6                      NOK
HTML_Common                     1.2.2                      NOK
HTML_QuickForm                  3.2.5                      NOK
HTML_QuickForm_advmultiselect   1.1.0                      NOK
HTML_Table                      1.6.1                      NOK
Archive_Tar                     1.1         1.3.1          OK
Auth_SASL                       1.0.1                      NOK
Console_Getopt                  1.2         1.2            OK
Net_SMTP                        1.2.8                      NOK
Net_Socket                      1.0.1                      NOK
Net_Traceroute                  0.21                       NOK
Net_Ping                        2.4.1                      NOK
Validate                        0.6.2                      NOK
XML_RPC                         1.4.5       1.5.0          OK
SOAP                            0.10.1                     NOK
Log                             1.9.11                     NOK
Archive_Zip                     0.1.2                      NOK

Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]:
> y
Upgrading PEAR modules
Installing PEAR modules
DB                              1.7.6                      NOK
DB_DataObject                   1.8.4                      NOK
DB_DataObject_FormBuilder       1.0.0RC4                   NOK
MDB2                            2.0.0                      NOK
Date                            1.4.6                      NOK
HTML_Common                     1.2.2                      NOK
HTML_QuickForm                  3.2.5                      NOK
HTML_QuickForm_advmultiselect   1.1.0                      NOK
HTML_Table                      1.6.1                      NOK
Auth_SASL                       1.0.1                      NOK
Net_SMTP                        1.2.8                      NOK
Net_Socket                      1.0.1                      NOK
Net_Traceroute                  0.21                       NOK
Net_Ping                        2.4.1                      NOK
Validate                        0.6.2                      NOK
SOAP                            0.10.1                     NOK
Log                             1.9.11                     NOK
Archive_Zip                     0.1.2                      NOK
Check PEAR modules
PEAR                            1.4.9       1.4.9          OK
DB                              1.7.6                      NOK
DB_DataObject                   1.8.4                      NOK
DB_DataObject_FormBuilder       1.0.0RC4                   NOK
MDB2                            2.0.0                      NOK
Date                            1.4.6                      NOK
HTML_Common                     1.2.2                      NOK
HTML_QuickForm                  3.2.5                      NOK
HTML_QuickForm_advmultiselect   1.1.0                      NOK
HTML_Table                      1.6.1                      NOK
Archive_Tar                     1.1         1.3.1          OK
Auth_SASL                       1.0.1                      NOK
Console_Getopt                  1.2         1.2            OK
Net_SMTP                        1.2.8                      NOK
Net_Socket                      1.0.1                      NOK
Net_Traceroute                  0.21                       NOK
Net_Ping                        2.4.1                      NOK
Validate                        0.6.2                      NOK
XML_RPC                         1.4.5       1.5.0          OK
SOAP                            0.10.1                     NOK
Log                             1.9.11                     NOK
Archive_Zip                     0.1.2                      NOK
Unable to upgrade PEAR modules. You seem to have a connection problem.

Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]:
> n

------------------------------------------------------------------------
                Centreon Post Install
------------------------------------------------------------------------
Create /usr/local/centreon/www/install/install.conf.php    OK
Create /etc/centreon/instCentWeb.conf                      OK

------------------------------------------------------------------------
        Start CentStorage Installation
------------------------------------------------------------------------

Where is your Centreon Run Dir directory?
default to [/var/run/centreon]
>

Do you want me to create this directory ? [/var/run/centreon]
[y/n], default to [n]:
> y
Path /var/run/centreon                                     OK

Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]
>
Path /usr/local/centreon/bin                               OK

Where is your CentStorage RRD directory
default to [/var/lib/centreon]
>
Path /var/lib/centreon                                     OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
install www/install/createTablesCentstorage.sql            OK
Creating Centreon Directory '/var/lib/centreon/status'     OK
Creating Centreon Directory '/var/lib/centreon/metrics'    OK
Install CentStorage binary                                 OK
Change right : /var/run/centreon                           OK
Change macros for centstorage init script                  OK
Replace CentStorage sysconfig script Macro                 OK

Do you want me to install CentStorage init script ?
[y/n], default to [n]:
> y
CentStorage init script installed                          OK
CentStorage sysconfig script installed                     OK

Do you want me to install CentStorage run level ?
[y/n], default to [n]:
> y
CentStorage Perl lib installed                             OK
Install logAnalyser                                        OK
Install logAnalyserBroker                                  OK
Install nagiosPerfTrace                                    OK
Change macros for centstorage.cron                         OK
Install CentStorage cron                                   OK
Change macros for centstorage.logrotate                    OK
Install Centreon Storage logrotate.d file                  OK
Create /etc/centreon/instCentStorage.conf                  OK

------------------------------------------------------------------------
        Start CentCore Installation
------------------------------------------------------------------------

Where is your CentCore binary directory
default to [/usr/local/centreon/bin]
>
Path /usr/local/centreon/bin                               OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Copy CentCore in binary directory                          OK
Change right : /var/run/centreon                           OK
Change right : /var/lib/centreon                           OK
Change macros for centcore.logrotate                       OK
Install Centreon Core logrotate.d file                     OK
Replace CentCore init script Macro                         OK
Replace CentCore sysconfig script Macro                    OK

Do you want me to install CentCore init script ?
[y/n], default to [n]:
> y
CentCore init script installed                             OK
CentCore sysconfig script installed                        OK

Do you want me to install CentCore run level ?
[y/n], default to [n]:
> y
CentCore Perl lib installed                                OK
Create /etc/centreon/instCentCore.conf                     OK

------------------------------------------------------------------------
        Start CentPlugins Installation
------------------------------------------------------------------------

Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]
>

Do you want me to create this directory ? [/var/lib/centreon/centplugins]
[y/n], default to [n]:
> y
Path /var/lib/centreon/centplugins                         OK
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPlugins                              OK
Installing the plugins                                     OK
Change right on centreon.conf                              OK
CentPlugins is installed

------------------------------------------------------------------------
        Start CentPlugins Traps Installation
------------------------------------------------------------------------

Where is your SNMP configuration directory
default to [/etc/snmp]
>
/etc/snmp                                                  OK

Where is your CentreonTrapd binaries directory
default to [/usr/local/centreon/bin]
>
/usr/local/centreon/bin                                    OK
Finding Apache user :                                      apache
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for snmptrapd.conf                           OK
Replace CentreonTrapd init script Macro                    OK
Replace CentreonTrapd sysconfig script Macro               OK

Do you want me to install CentreonTrapd init script ?
[y/n], default to [n]:
> y
CentreonTrapd init script installed                        OK
CentreonTrapd sysconfig script installed                   OK

Do you want me to install CentreonTrapd run level ?
[y/n], default to [n]:
> y
trapd Perl lib installed                                   OK
Install : snmptrapd.conf                                   OK
Install : centreontrapdforward                             OK
Install : centreontrapd                                    OK
Create /etc/centreon/instCentPlugins.conf                  OK
###############################################################################
#                                                                             #
#                 Go to the URL : #
#                            to finish the setup                              #
#                                                                             #
#                  Report bugs at #
#                                                                             #
#                         Thanks for using Centreon.                          #
#                          -----------------------                            #
#                        Contact : infos@centreon.com                         #
#                          http://                            #
#                                                                             #
###############################################################################

====================================================================================

%%%Uninstall%%%:
Delete both DBs: – centreon / – CentreStorgae (via Phpmyadmin)
Delete Centreon Files
rm -R /etc/centreon
rm -R /usr/local/centreon
Remove the Schedulled tasks (crontab):
rm /etc/cron.d/centreon

Remove the Status (.rrd) files:
rm /var/lib/centreon/status/*.*

Remove Plugins Folder:
rm -R /var/lib/centreon/centplugins/

Leave the folders: /var/lib/centreon/metrics,nagios-perf

====================================================================================
问题集锦:
------------------------------------
1. centcore.log 显示 'No RSA host key is known for 127.0.0.1 and you have requested strict checking.'
solution: 为用户 centreon 创建 ssh key, 把id_rsa.pub 的内容添加到 authorized_keys,并设置文件权限为600。
    [root@cndaldmz01vl log]#ssh-keygen -t rsa

------------------------------------
2. sql-error.log 显示如下 error
2014-07-17 10:27|0|0|DB Error: no such field QUERY : UPDATE nagios_server SET name = 'cn', localhost = '0', ns_ip_address = '127.0.0.1',  ssh_port = '22',  init_script = '/etc/init.d/nagios',  init_script_centreontrapd = NULL, snmp_trapd_path_conf = '/etc/snmp/centreon_traps/',  monitoring_engine = 'NAGIOS',  nagios_bin = '/usr/local/nagios/bin/nagios',  nagiostats_bin = '/usr/local/nagios/bin/nagiostats',  nagios_perfdata = '/var/log/nagios/service-perfdata',  centreonbroker_cfg_path = NULL, centreonbroker_module_path = NULL, centreonconnector_path = NULL, ssh_private_key = NULL, is_default = '0',  ns_activate = '0' WHERE id = '3'
Solution:因为nagios_server 表中某个column不存在或者属性不对,此例中缺少 column---> init_script_centreontrapd
添加column

mysql> use centreon
Database changed
mysql> ALTER TABLE `nagios_server` ADD `init_script_centreontrapd` VARCHAR(255);

-------------------------------------
3. DB privilege

mysql -e "grant all on centreon.* to 'centreon'@localhost identified by 'CentreonDBPassword';"
mysql -e "grant all on centreon_storage.* to 'centreon'@localhost identified by 'CentreonDBPassword'"
mysql -e "grant all on centreon_status.* to 'centreon'@localhost identified by 'CentreonDBPassword';"
需要给远程节点授予访问核心节点数据库的权限
GRANT ALL ON centreon.* TO 'nagios'@'10.169.34.90' IDENTIFIED BY 'nagios';
========
mysql -e "grant all on centreon.* to 'centreon'@'%' identified by '6024562';"
mysql -e "grant all on centreon_storage.* to 'centreon'@'%' identified by '6024562'"
mysql -e "grant all on centreon_status.* to 'centreon'@'%' identified by '6024562';"

-------------------------------------
4. 误删除或者覆盖 contact 后,无法登陆 web 页面
Solution: 在数据库里添加临时用户rescue, 然后修改admin条目。
mysql -u root -p
mysql> use centreon;

###The SQL statement for adding a rescue user is like the following one - on Centreon 2.0.x please remove "contact_crypt" and "MD5" from the lines:

INSERT INTO contact
    ( contact_name,  contact_alias,  contact_passwd,  contact_oreon,  contact_admin,  contact_activate,  contact_auth_type,  contact_crypt)  
VALUES
    ("rescue", "rescue", md5("welcome"), "1", "1", "1", "local", "MD5");

###After using this "rescue" user, take care of deleting, disabling the user or setting a new secure password!
###In case you want to change the password, enable login, activate the contact or give admin right to the user "admin" only:

UPDATE contact SET contact_passwd = MD5("newpassword") WHERE contact_alias = "admin";
UPDATE contact SET contact_oreon = "1" WHERE contact_alias = "admin";
UPDATE contact SET contact_activate = "1" WHERE contact_alias = "admin";
UPDATE contact SET contact_admin = "1" WHERE contact_alias = "admin"
-------------------------------------------
5. sql-error.log 显示如下 error:
2014-07-18 18:31|0|0|DB Error: insufficient permissions QUERY : DELETE FROM centreon_acl WHERE group_id NOT IN (SELECT DISTINCT acl_group_id FROM centreon.acl_res_group_relations)

Solution;centreon_acl 表 BUG
在 nagios 数据库创建表 centreon_acl

CREATE TABLE `centreon_acl` (
  `host_id` int(11) default NULL,
  `host_name` varchar(255) character set latin1 default NULL,
  `service_id` int(11) default NULL,
  `service_description` varchar(255) character set latin1 default NULL,
  `group_id` int(11) default NULL,
  KEY `host_name` (`host_name`),
  KEY `service_description` (`service_description`),
  KEY `group_id_by_name` (`group_id`,`host_name`(70),`service_description`(120)),
  KEY `group_id_by_id` (`group_id`,`host_id`,`service_id`),
  KEY `group_id_for_host` (`group_id`,`host_name`(70))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

阅读(5049) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~