• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Xin chào ! Nếu đây là lần đầu tiên bạn đến với diễn đàn, xin vui lòng danh ra một phút bấm vào đây để đăng kí và tham gia thảo luận cùng VnPro.

Announcement

Collapse
No announcement yet.

Help, Zabbix is running = NO

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help, Zabbix is running = NO

    Xin chào các bạn
    Mình có câu hỏi xin nhờ giúp đỡ. Mình cài zabbix-1.8.2 trên CentOS 5.3 đã làm theo hưỡng dẫn trang chủ, đọc rất nhiều tài liệu nhưng vẫn bế tắc. Zabbix Server is running = NO. Kiểm tra zabbix_server.log thì nó báo lỗi như sau:

    Failed to connect to database: Error: Unknown MySQL server host 'server6.zabbix.com.vn' (2) [2005]
    Kính mong các bạn giúp đỡ, chân thành cảm ơn.

    Log File && Config
    Last edited by JGK; 26-05-2010, 06:07 PM.

  • #2
    làm theo cái này đi, chắc chắc là cài đặt ok đấy, cứ làm theo từng bước 1..mình cũng đang làm về cái này nhưng vẫn chưa biết cách Monitoring server chạy windows đã cài giao thức SNMP, muốn dùng thằng Zabbix này sử dụng chính SNMP để monitoring server windows đó..Nếu anh em nào biết về phần này mong được chỉ giáo...thân.

    1. ##########
    2. zabbix.log
    3. ##########
    4. Wed Jul 21 14:36:04 CEST 2010
    5. Author: TBA
    6. installing prereq's for zabbix:
    7. sudo apt-get install build-essential mysql-server libmysqlclient15-dev php5 php5-gd php5-mysql snmp libsnmp-dev snmpd libcurl4-openssl-dev fping
    8. configuring mysql:
    9. - New password for the MySQL "root" user: root123
    10. creating zabbix user with password: zabbix123
    11. ubuntu@ubuntu-desktop:~$ sudo adduser zabbix
    12. Adding user `zabbix' ...
    13. Adding new group `zabbix' (1001) ...
    14. Adding new user `zabbix' (1001) with group `zabbix' ...
    15. Creating home directory `/home/zabbix' ...
    16. Copying files from `/etc/skel' ...
    17. Enter new UNIX password:
    18. Retype new UNIX password:
    19. passwd: password updated successfully
    20. Changing the user information for zabbix
    21. Enter the new value, or press ENTER for the default
    22. Full Name []: Zabbix Monitoring
    23. Room Number []:
    24. Work Phone []:
    25. Home Phone []:
    26. Other []:
    27. Is the information correct? [Y/n] Y
    28. adding user to group admin:
    29. ubuntu@ubuntu-desktop:~$ sudo adduser zabbix admin
    30. Adding user `zabbix' to group `admin' ...
    31. Adding user zabbix to group admin
    32. Done.
    33. login to user zabbix:
    34. ubuntu@ubuntu-desktop:~$ su - zabbix
    35. Password:
    36. To run a command as administrator (user "root"), use "sudo <command>".
    37. See "man sudo_root" for details.
    38. zabbix@ubuntu-desktop:~$ id
    39. uid=1001(zabbix) gid=1001(zabbix) groups=115(admin),1001(zabbix)
    40. zabbix@ubuntu-desktop:~$ pwd
    41. /home/zabbix
    42. downloading last stable release:
    43. wget http://downloads.sourceforge.net/pro...&ts=1279715912
    44. extract the tarball and gunzip it: zabbix@ubuntu-desktop:~$ tar xvzpf zabbix-1.8.2.tar.gz
    45. configuring the mysql database:
    46. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo mysql -p -e"create database zabbix;"
    47. Enter password:
    48. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo mysql -p -e"grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix123';"
    49. Enter password:
    50. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ mysql -D zabbix -uzabbix -pzabbix123 < /home/zabbix/zabbix-1.8.2/create/schema/mysql.sql
    51. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ mysql -D zabbix -uzabbix -pzabbix123 < /home/zabbix/zabbix-1.8.2/create/data/data.sql
    52. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ mysql -D zabbix -uzabbix -pzabbix123 < /home/zabbix/zabbix-1.8.2/create/data/images_mysql.sql
    53. configuring zabbix:
    54. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ ./configure --prefix=/usr --with-mysql --with-net-snmp \
    55. > --with-libcurl --enable-server --enable-agent &&
    56. > make
    57. ............
    58. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo make install
    59. configuring the rest:
    60. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo vi /etc/services
    61. and add:
    62. #added new services:
    63. zabbix_agent 10050/tcp # Zabbix ports
    64. zabbix_trap 10051/tcp
    65. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo mkdir /etc/zabbix
    66. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo chown -R zabbix.zabbix /etc/zabbix/
    67. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ cp misc/conf/zabbix_* /etc/zabbix/
    68. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ vi /etc/zabbix/zabbix_server.conf
    69. and change:
    70. DBUser=zabbix #changed Nexos
    71. DBPassword=zabbix123 #changed Nexos
    72. copy the init scripts:
    73. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo cp misc/init.d/debian/zabbix-server /etc/init.d
    74. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo cp misc/init.d/debian/zabbix-agent /etc/init.d
    75. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo vi /etc/init.d/zabbix-server
    76. DAEMON=/usr/sbin/${NAME} #changed Nexos
    77. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo vi /etc/init.d/zabbix-agent
    78. DAEMON=/usr/sbin/${NAME} #changed Nexos
    79. setting the right permissions:
    80. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo chmod 755 /etc/init.d/zabbix-server
    81. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo update-rc.d zabbix-server defaults
    82. update-rc.d: warning: /etc/init.d/zabbix-server missing LSB information
    83. update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
    84. Adding system startup for /etc/init.d/zabbix-server ...
    85. /etc/rc0.d/K20zabbix-server -> ../init.d/zabbix-server
    86. /etc/rc1.d/K20zabbix-server -> ../init.d/zabbix-server
    87. /etc/rc6.d/K20zabbix-server -> ../init.d/zabbix-server
    88. /etc/rc2.d/S20zabbix-server -> ../init.d/zabbix-server
    89. /etc/rc3.d/S20zabbix-server -> ../init.d/zabbix-server
    90. /etc/rc4.d/S20zabbix-server -> ../init.d/zabbix-server
    91. /etc/rc5.d/S20zabbix-server -> ../init.d/zabbix-server
    92. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo chmod 755 /etc/init.d/zabbix-agent
    93. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo update-rc.d zabbix-agent defaults
    94. update-rc.d: warning: /etc/init.d/zabbix-agent missing LSB information
    95. update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
    96. Adding system startup for /etc/init.d/zabbix-agent ...
    97. /etc/rc0.d/K20zabbix-agent -> ../init.d/zabbix-agent
    98. /etc/rc1.d/K20zabbix-agent -> ../init.d/zabbix-agent
    99. /etc/rc6.d/K20zabbix-agent -> ../init.d/zabbix-agent
    100. /etc/rc2.d/S20zabbix-agent -> ../init.d/zabbix-agent
    101. /etc/rc3.d/S20zabbix-agent -> ../init.d/zabbix-agent
    102. /etc/rc4.d/S20zabbix-agent -> ../init.d/zabbix-agent
    103. /etc/rc5.d/S20zabbix-agent -> ../init.d/zabbix-agent
    104. starting the server:
    105. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo /etc/init.d/zabbix-server start
    106. Starting Zabbix server daemon: zabbix_server
    107. starting agent:
    108. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo /etc/init.d/zabbix-agent start
    109. Starting Zabbix agent daemon: zabbix_agentd
    110. configuring the web interface:
    111. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ mkdir /home/zabbix/public_html
    112. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ cp -R frontends/php/* /home/zabbix/public_html/
    113. edit apache config:
    114. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo vi /etc/apache2/sites-enabled/000-default
    115. # adding Nexos
    116. Alias /zabbix /home/zabbix/public_html/
    117. <Directory /home/zabbix/public_html>
    118. AllowOverride FileInfo AuthConfig Limit Indexes
    119. Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    120. <Limit GET POST OPTIONS PROPFIND>
    121. Order allow,deny
    122. Allow from all
    123. </Limit>
    124. <LimitExcept GET POST OPTIONS PROPFIND>
    125. Order deny,allow
    126. Deny from all
    127. </LimitExcept>
    128. </Directory>
    129. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo vi /etc/php5/apache2/php.ini
    130. max_execution_time = 300 ; changed Nexos
    131. date.timezone = Europe/Zurich ; changed Nexos
    132. restarting apache webserver:
    133. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo /etc/init.d/apache2 restart
    134. * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    135. ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    136. [ OK ]
    137. connecting to: http://localhost/zabbix/
    138. click Next - accepting the license agreement
    139. checking for Prerequisites:
    140. change:
    141. - PHP memory limit
    142. - PHP post max size
    143. - PHP max input time
    144. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo vi /etc/php5/apache2/php.ini
    145. memory_limit = 256M ; changed Nexos
    146. post_max_size = 32M ; changed Nexos
    147. max_input_time = 600 ; changed Nexos
    148. restarting apache webserver:
    149. zabbix@ubuntu-desktop:~/zabbix-1.8.2$ sudo /etc/init.d/apache2 restart
    150. * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    151. ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    152. click Next on Zabbix web-configuration
    153. configuring the Mysql zabbix:
    154. Type: MySQL
    155. Host: localhost
    156. Port: 0 (Default)
    157. Name: zabbix
    158. User: zabbix
    159. Pass: zabbix123
    160. Try Connection and click Next
    161. Entering Host and Port of Zabbix Server:
    162. Host: localhost
    163. Port: 10051
    164. Press "Save configuration file" button, download configuration file and save it as
    165. "/home/zabbix/public_html/conf/zabbix.conf.php"
    166. ubuntu@ubuntu-desktop:~/Downloads$ sudo cp zabbix.conf.php /home/zabbix/public_html/conf
    167. [sudo] password for ubuntu:
    168. zabbix@ubuntu-desktop:~/public_html/conf$ sudo chown zabbix:zabbix zabbix.conf.php
    169. [sudo] password for zabbix:
    170. Configuration file: Ok
    171. When done, press the "Next" button
    172. *
    173. Congratulations on successful instalation of Zabbix frontend.
    174. Press "Finish" button to complete installation

    Comment

    Working...
    X