1. Install MySQL
1.1. Install MySQL
RPM-IVH http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
Yum-y Install Mysql-server
1.2. Modify the MySQL configuration file
Vim/etc/my.cnf
Default-storage-engine = InnoDB
Innodb_file_per_table
Collation-server = Utf8_general_ci
Init-connect = ' SET NAMES UTF8 '
Character-set-server = UTF8
1.3. Set MySQL to start automatically and start MySQL
Chkconfig mysqld on
Service mysqld Start
1.4. Set MySQL security options
Mysql_secure_installation
Note:running all PARTS of this SCRIPT are RECOMMENDED for all MySQL
SERVERS in PRODUCTION use! Please READ each STEP carefully!
In order to log into MySQL to secure it, we'll need the current
Password for the root user. If you ' ve just installed MySQL, and
You haven ' t set the root password yet, the password would be blank,
So, should just press ENTER here.
Enter current password to root (enter for none):
OK, successfully used password, moving on ...
Setting The root password ensures that nobody can log into the MySQL
Root user without the proper authorisation.
Set root Password? [y/n] Y
New Password:
Re-enter new password:
Password Updated successfully!
Reloading privilege tables.
... success!
By default, a MySQL installation have an anonymous user, allowing anyone
To log into MySQL without has to has a user account created for
them. This was intended only for testing, and the installation
Go a bit smoother. You should remove them before moving into a
Production environment.
Remove anonymous users? [y/n] Y
... success!
Normally, Root should only is allowed to connect from ' localhost '. This
Ensures that someone cannot guess at the root of password from the network.
Disallow Root login remotely? [y/n] Y
... success!
By default, MySQL comes with a database named ' test ' that anyone can
Access. This was also intended only for testing, and should be removed
Before moving into a production environment.
Remove test database and access to it? [y/n] Y
-Dropping test database ...
ERROR 1008 (HY000) at line 1:can ' t drop database ' test '; Database doesn ' t exist
... failed! Not critical, keep moving ...
-Removing privileges on test database ...
... success!
Reloading the privilege tables would ensure that all changes made so far
would take effect immediately.
Reload privilege tables now? [y/n] Y
... success!
All done! If you've completed all of the above steps, your MySQL
Installation should now is secure.
Thanks for using mysql!
Cleaning up ...
1.5. Create a Zabbix database
Mysql-uroot-proot123
Mysql> CREATE database Zabbix character set UTF8 collate utf8_bin;
Query OK, 1 row affected (0.04 sec)
Mysql> Grant all privileges the zabbix.* to [e-mail protected] identified by ' Zabbix ';
Query OK, 0 rows affected (0.01 sec)
mysql> FLUSH privileges;
Query OK, 0 rows Affected (0.00 sec)
Mysql> quit
Bye
2. Install PHP
2.1. Install PHP
RPM-IVH http://repo.webtatic.com/yum/el6/latest.rpm
Yum install-y httpd libxml2-devel net-snmp-devel libcurl-devel php56w php56w-gd php56w-mysql php56w-bcmath Php56w-mbstri ng Php56w-xml Php56w-ldap
2.2. Modify the PHP configuration file
Vim/etc/php.ini
post_max_size=16m
max_execution_time=300
max_input_time=300
Date.timezone=asia/shanghai
Always_populate_raw_post_data=-1
2.3. Set HTTP auto-start and start HTTP
Chkconfig httpd on
Service httpd Start
3, Installation Zabbix
3.1, download the relevant software package
wget http://repo.zabbix.com/zabbix/3.2/rhel/6/i386/deprecated/zabbix-server-mysql-3.2.2-1.el6.i686.rpm
wget HTTP://REPO.ZABBIX.COM/ZABBIX/3.2/RHEL/6/I386/DEPRECATED/ZABBIX-WEB-3.2.2-1.EL6.NOARCH.RPMW
wget http://repo.zabbix.com/zabbix/3.2/rhel/6/i386/deprecated/zabbix-web-mysql-3.2.2-1.el6.noarch.rpm
3.2, Installation Zabbix
Yum-y Localinstall zabbix-web-3.2.2-1.el6.noarch.rpm zabbix-web-mysql-3.2.2-1.el6.noarch.rpm zabbix-server-mysql-3.2.2-1.el6.i686.rpm
3.3. Import Zabbix related data to MySQL
zcat/usr/share/doc/zabbix-server-mysql-3.2.2/create.sql.gz | Mysql-uroot-proot123 Zabbix
3.4, modify the Zabbix server configuration
Vim/etc/zabbix/zabbix_server.conf
Dbhost=localhost
Dbname=zabbix
Dbuser=zabbix
Dbpassword=zabbix
3.5. Copy Zabbix related files to related catalogue
Cp-r/usr/share/zabbix/*/var/www/html/zabbix/
Chown-r Apache:apache/var/www/html/zabbix
3.6, set up Zabbix service end automatically start and start Zabbix server
Chkconfig Zabbix-server on
Service Zabbix-server Start
4. Browser Configuration Zabbix
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/8B/62/wKioL1hMLfHxLiG0AAD266CNopU364.png-wh_500x0-wm_3 -wmp_4-s_4205366564.png "style=" Float:none; "title=" 1.png "alt=" Wkiol1hmlfhxlig0aad266cnopu364.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8B/66/wKiom1hMLfSQKGzKAAE5tDoHLm8983.png-wh_500x0-wm_3 -wmp_4-s_1831431956.png "style=" Float:none; "title=" 2.png "alt=" Wkiom1hmlfsqkgzkaae5tdohlm8983.png-wh_50 "/>
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8B/66/wKiom1hMLfniGXdtAAEOCDmF0LE424.png-wh_500x0-wm_3 -wmp_4-s_1989028617.png "style=" Float:none; "title=" 3.png "alt=" Wkiom1hmlfnigxdtaaeocdmf0le424.png-wh_50 "/>
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8B/62/wKioL1hMLfzAPLweAAD2tHFlJN8070.png-wh_500x0-wm_3 -wmp_4-s_2048415962.png "style=" Float:none; "title=" 4.png "alt=" Wkiol1hmlfzaplweaad2thfljn8070.png-wh_50 "/>
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8B/66/wKiom1hMLgCShbVMAAEnIoti7E4079.png-wh_500x0-wm_3 -wmp_4-s_2288675907.png "style=" Float:none; "title=" 5.png "alt=" Wkiom1hmlgcshbvmaaenioti7e4079.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8B/66/wKiom1hMLgfBSl42AAD60o3QXXs271.png-wh_500x0-wm_3 -wmp_4-s_3741709973.png "style=" Float:none; "title=" 6.png "alt=" Wkiom1hmlgfbsl42aad60o3qxxs271.png-wh_50 "/>
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8B/62/wKioL1hMLgjAO3Q8AADPXk_Z_6Q534.png-wh_500x0-wm_3 -wmp_4-s_2121573620.png "style=" Float:none; "title=" 7.png "alt=" Wkiol1hmlgjao3q8aadpxk_z_6q534.png-wh_50 "/>
Default account is: Admin default password is: Zabbix
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8B/66/wKiom1hMLguSbLHMAAGtGYUx3q0035.png-wh_500x0-wm_3 -wmp_4-s_1585660251.png "style=" Float:none; "title=" 8.png "alt=" Wkiom1hmlgusblhmaagtgyux3q0035.png-wh_50 "/>
This article is from the "Open Source Hall" blog, please be sure to keep this source http://kaiyuandiantang.blog.51cto.com/10699754/1881583
1. CentOS6.5 install Zabbix3.2.2 in yum mode