Server address: 192.168.7.221
1, install the corresponding package
Install Mysql-dev gcc net-snmp-devel curl-devel perl-dbi php-gd php-mysql php-bcmath php-mbstring yum php-xml-5.3.3 php-5. 3.3
Note: Some packages will fail to install, such as PHP without version number, Php-bcmath and php-mbstring also failed to install (the ISO image does not have these two packages, download:
http://download.csdn.net/download/u010587433/9022179 and http://download.csdn.net/download/u010587433/9022199)
2, create groups, users
Groupadd Zabbix
useradd-g Zabbix Zabbix
3, decompression installation
<pre name= "code" class= "SQL" >TAR-ZXVF zabbix-2.2.2.tar.gz
cd zabbix-2.2.2/database/mysql
. /configure--prefix=/usr/local/zabbix--with-mysql--with-net-snmp--with-libcurl--enable-server-- Enable-proxy make make
install
cp/usr/local/zabbix/sbin/zabbix_agentd/etc/init.d
cp/usr/local/ Zabbix/sbin/zabbix_server/etc/init.d
4, import data (MySQL first to install and initialize, can refer to http://blog.csdn.net/u010587433/article/details/46800227)
Create database Zabbix character set UTF8;
Grant all privileges on zabbix.* to zabbix_user@ '% ' identified by ' 123456 ';
Grant all privileges on zabbix.* to zabbix_user@localhost identified by ' 123456 ';
mysql-uzabbix_user-p123456 Zabbix < Schema.sql
mysql-uzabbix_user-p123456 Zabbix < Images.sql
5, the configuration of related documents
vi/usr/local/zabbix/etc/zabbix_server.conf #zabbix服务端配置文件
logfile=/var/log/zabbix_server.log
# Dbhost=localhost
Dbname=zabbix
dbuser=zabbix_user
dbpassword=123456
vi/usr/local/zabbix/etc/ zabbix_agentd.conf #客户端配置文件,
logfile=/var/log/zabbix_agentd.log
enableremotecommands=0
Server =127.0.0.1,192.168.7.221
startagents=4
serveractive=192.168.7.221,192.168.7.254
Timeout=30
INCLUDE=/USR/LOCAL/ZABBIX/ETC/ZABBIX_AGENTD.CONF.D
Unsafeuserparameters=1
vi/etc/php.ini #php配置文件
max_execution_time = +
Max_input_time = 300
memory_limit = 128M
post_max_size = 32M
date.timezone = Asia/shanghai
mbstring.func_overload=2
6. Configure HTTP Service
Mkdir/var/www/html/zabbix
cp-a frontends/php/*/var/www/html/zabbix/
chown-r apache:apache/var/www/html/ zabbix/
vi/etc/httpd/conf/httpd.conf
ServerName 192.168.7.221
<virtualhost
*:80> DocumentRoot "/var/www/html"
ServerName 192.168.7.221
</VirtualHost>
7, start
Service httpd start
service zabbix_server start
Start Zabbix Server error:
Service Zabbix_server Restart
/etc/init.d/zabbix_server:/usr/lib64/libmysqlclient.so.18:no version information Available (required by/etc/init.d/zabbix_server)
resolution (/HOME/MYSQL/PRODUCT/5.6/MYSQL-1 for MySQL installation directory):
ln-s/ home/mysql/product/5.6/mysql-1/lib/libmysqlclient.so.18/usr/lib64/
8. Web Login Configuration Installation
Browser input: Http://192.168.7.221/zabbix
Not very smooth, error:
1 does not have permission to access
"You don ' t have permission to access/zabbix/on this server.
" apache/2.2.15 Server at <192.168.7.221> Port 80 "
Refer to the following netizens, solve: modify/etc/selinux/config as follows
Note: selinux=enforcing
selinuxtype=targeted
add: selinux=disable
It is also best to close the firewall (service iptables stop), if you do not close the need to add port filtering
Vi/etc/services
zabbix-agent 10050/tcp # Zabbix agent
zabbix-agent 10050/udp # Zabbix Agent
zabbix-trapper 10051/tcp # Zabbix trapper
zabbix-trapper 10051/udp # Zabbix Trapper
vi/etc/sysconfig/iptables
iptables-a input-p tcp --dport 10050-j ACCEPT
iptables-a Input-p TCP --dport 10051-j ACCEPT
Reference: http://www.iyunv.com/forum.php?mod=viewthread&tid=10720
But my situation is that the firewall has been closed and the/etc/selinux/config file has been modified, but the error is still there. But after the restart to resolve, depressed.
2 The contents of the display are problematic
Upon enquiry, it is because PHP did not install successfully. Install Yum install-y php-5.3.3 without the addition of version number, installation failed
Finally see the installation configuration interface, and then easier:
Note: These two packages are the first to say, no band in the ISO, you can download and install the RPM, installation depends on Php-common, but I have installed Php-common or error, so use
RPM-IVH *.rpm--force--nodeps #强制安装后, after retry resolved.
If the socket file is not in the error directory, you can create a soft link:
Ln-s/home/mysql/run/mysql.sock/var/lib/mysql/
Host option to fill in localhost and IP can be, the main is to pay attention to the MySQL Zabbix_user user's authorization.
You can continue.
Default User name password: Admin/zabbix
Finally, the configuration is completed.