# mysqladmin-uroot password admin
# mysql -uroot-padmin
mysql> createdatabase zabbix character set utf8;
mysql> grantall privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> flushprivileges;
五、配置zabbix_server.conf 1. 配置zabbix_server.conf
vi/etc/zabbix/zabbix_server.conf
### Option: DBHost
# Database host name.
# If set to localhost, socket is used for MySQL.
# If set to empty string, socket is used for PostgreSQL.
#
# Mandatory: no
# Default:
DBHost=localhost #可修改
### Option: DBName
# Database name.
# For SQLite3 path to database file must be provided. DBUser andDBPassword are ignored.
#
# Mandatory: yes
# Default:
# DBName=
DBName=zabbix #默认
### Option: DBSchema
# Schema name. Used for IBM DB2 and PostgreSQL.
#
# Mandatory: no
# Default:
# DBSchema=
### Option: DBUser
# Database user. Ignored for SQLite.
#
# Mandatory: no
# Default:
# DBUser=
DBUser=zabbix #默认
### Option: DBPassword
# Database password. Ignored for SQLite.
# Comment this line if no password is used.
#
# Mandatory: no
# Default:
DBPassword=zabbix #需修改
### Option: DBSocket
# Path to MySQL socket.
#
# Mandatory: no
# Default:
# DBSocket=/tmp/mysql.sock
DBSocket=/var/lib/mysql/mysql.sock
### Option: DBPort
# Database port when not using local socket. Ignored for SQLite.
以上参数只需关注黑体字部分,这部分为性能参数,需根据实际情况进行调整。默认只需修改DBPassword=zabbix即可。
# mkdir/etc/zabbix/alertscripts /etc/zabbix/externalscripts
启动zabbix-server服务
# service zabbix-server start
#service httpd start
# chkconfig zabbix-server on
# chkconfig httpd on
配置时区参数
vi /etc/httpd/conf.d/zabbix.conf
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all