root@zabbix:~# cat /etc/default/zabbix-server
# defaults file for zabbix-server-mysql
# Start the Zabbix server from the init.d script?
# (Possible values: "yes" or "no")
#
# This is by default set to "no" because a MySQL database needs to be prepared
# and configured before you can start the Zabbix server for the first time.
#
# Instructions on how to set up the database can be found in
# /usr/share/doc/zabbix-server-mysql/README.Debian
START=no
# Absolute path to the configuration file
CONFIG_FILE="/etc/zabbix/zabbix_server.conf"
需要把 START=no 改为yes
root@zabbix:~# vi /etc/default/zabbix-server
root@zabbix:~#
根据文档创建数据库
root@sonicwall-virtual-machine:/home/sonicwall# cat /usr/share/doc/zabbix-server-mysql/README.Debian
Installing the database
-----------------------
The Zabbix server needs an SQL database to run. As you chose to install
this zabbix-server-mysql package you apparently want to use a MySQL server
as a storage backend.
Set up a MySQL database server on any system - you are not forced to run it
on the same computer as the Zabbix server:
-> apt-get install mysql-server
Create a new database (let's call it "zabbix"):
-> mysql -p -e "create database zabbix character set utf8"
Create a MySQL user that has access rights to the database
(please use another password than 'SECRETPASSWORD'):
-> mysql -p -e "grant all on zabbix.* to 'zabbix'@'localhost' identified by 'SECRETPASSWORD'"
Create the database schema:
-> zcat /usr/share/zabbix-server-mysql/{schema,images,data}.sql.gz \
| mysql -uzabbix -pSECRETPASSWORD zabbix
Now enter the database access credentials into your
/etc/zabbix/zabbix_server.conf, enable the startup in the
/etc/default/zabbix-server-mysql file and start the Zabbix server.
See also:
http://www.zabbix.com/documentation/2.0/manual/appendix/install/db_scripts
root@zabbix:~# mysql -uroot -psonicwall
登陆数据库 操作以上步骤
/etc/init.d/apache2 restart
* Restarting web server apache2 AH00557: apache2: apr_sockaddr_info_get() failed for zabbix
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[ OK ]
root@zabbix:/var/www/html# /etc/init.d/apache2 status
* apache2 is running
这个错误显示系统的用户名有问题,我之前改的hostname 文件没有同步 直接vim /etc/hosts 修改 127.0.0.1 localhost 127.0.0.1 zabbix 即可 还需要修改 vim /etc/apache2/apache2.conf 添加最后一行 ServerName localhost:80
root@zabbix:/var/www/html# /etc/init.d/apache2 restart
* Restarting web server apache2 [ OK ]
这次显示正常开启Apache2
通过http://10.190.202.180 发现不能正常访问 网页不能加载下来 查看了下/etc/apache2/apache2.conf 文件的网页目录文件 是放在/var/www/html 里面 没有问题
http://wiki.ubuntu.org.cn/index.php?title=Zabbix&variant=zh-cn 是在是没办法 我就参考了这个ubuntu论坛的wiki 然后就正常显示了
http://ip/zabbix user admin password zabbix 然后下一步 安装即可