The fixed IP address of the centos-DVD1 version system is 192.168.159.128, and the centos-mininal version system address is 192.168.1.* or 192.168.2.* network segment
zabbix2.4 installation (centos6.5)
Zabbix has its own yum source, LNMP can go to https://lnmp.org/ to download and install it yourself
The first step is to install the official zabbix source of zabbix, the address is as follows:
rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
The second step uses the yum installation method to automatically install zabbix server and agent related RPM packages
yum install -y mysql mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent
zabbix-get: This command is mainly used to obtain monitoring data. After the installation is successful, you need to create a zabbix database and user in mysql.
Failed to enter the database, check that the mysqld service is not started, just start it!
Start the mysql database service: /etc/init.d/mysqld start
Enter the database: mysql -uroot
Format: grant authority on database name. table name to user@ login host identified by "user password";
GRANT ALL PRIVILEGES ON *.* TO zabbixuser@"%" IDENTIFIED BY "xxx";
FLUSH PRIVILEGES;
Create database and user:
mysql> createdatabase zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhostidentified by 'zabbix';
flush privileges;
show databases;
mysql> quit; or \q
Zabbix monitoring system data is stored in the database, and some tables need to be created.
View the table creation statement and import;
[ root@localhost~]# cd /usr/share/doc/zabbix-server-mysql-2.4.8/create
[ root@localhost create]#ll
Import the database:
[ root@localhost create]# mysql -uroot zabbix< schema.sql
[ root@localhostcreate]# mysql -uroot zabbix < images.sql
[ root@localhostcreate]# mysql -uroot zabbix < data.sql
Modify the zabbix server configuration file: (the # number should be removed if the # number is removed)
[ root@localhost ~]#vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
vim installation
# yum search vim //View vim related software information
# yum install -y vim*//Install vim online
Modify the time zone;
[ root@localhost~]# vim /etc/php.ini//In php.Add the following content at the end of the ini configuration file [shift+g jump to the end of the file]
php_valuemax_execution_time 300
php_valuememory_limit 128M
php_valuepost_max_size 16M
php_valueupload_max_filesize 2M
php_valuemax_input_time 300
Remove the semicolon in front of ";date.timezone =", then write in the top box, and give the equal sign: Asia/Shanghai
After the modification is completed, it will take effect after restarting the system!
View the current time:
[ root@localhost~]# date
When viewing the current time, the time is not synchronized and needs to be synchronized
Install time synchronization command
[ root@localhost~]#yum install ntpdate
Perform synchronization of US time
[ root@localhost~]# ntpdate us.pool.ntp.org
Modify time zone: (ln sf abb points to a) Synchronize time
[ root@localhost~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /usr/localtime
[ root@localhost~]#date
Start the necessary services (restart): (start at boot, if you do not start the system, the service will not start, you can start the service manually)
Manually start the necessary services (without restarting)
When the firewall is enabled, chkconfig httpd on starts the httpd service, the zabbix configuration page cannot be opened
Apache started, but unable to open zabbix through the browser, the solution, turn off the firewall, turn off SELinux
Turn off selinux: sed -i "s/SELINUX=enforcing/SELINUX=disabled/g"/etc/selinux/config
Confirm whether the modification is successful: #grepSELINUX /etc/selinux/config
Stop the firewall: /etc/init.d/iptables stop
I accidentally discovered a phenomenon. When I close iptables and stop the iptables service, there will always be some strange things happening. When I start the system again and check the iptables status, iptables is automatically turned on again, so helpless! After researching that libvirt (the C library of virtualization tools) will drive the startup of iptables when booting, the way to permanently close iptables is through the chkconfig tool, we only need chkconfig iptables off.
[ System environment]
CentOS release 6.7 (Final)
Close iptables
Start httpd: chkconfig httpd on
/etc/init.d/iptables stop
# Close iptables
chkconfig iptables off #Permanently close iptables
chkconfig --list iptables
# check iptables
chkconfig --list httpd //View httpd startup
iptables -L or /etc/init.d/iptables status #View the running status of iptables
cat /etc/redhat-release //View the system version
Modify time zone:
Restart httpd will report an error, edit the httpd.conf file, vi /etc/httpd/conf/httpd.conf, and cancel ServerName www.example.com:80前#!
After restarting the system, another error was reported that the database was not started because the database was not started. Perform boot-up, no error will be reported next time you boot
[ root@localhost ~]# chkconfig mysqld on
After all the installation is complete, you need to perform all booting!
to sum up
The above is the tutorial diagram for installing zabbix2.4 under centos6.5 introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message, and the editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
Recommended Posts