{"id":2503,"date":"2023-07-01T12:43:12","date_gmt":"2023-07-01T10:43:12","guid":{"rendered":"https:\/\/itsimple.info\/?p=2503"},"modified":"2023-07-01T18:46:41","modified_gmt":"2023-07-01T16:46:41","slug":"how-to-install-zabbix-6-on-centos-9","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=2503","title":{"rendered":"How To Install Zabbix 6 On CentOS 9"},"content":{"rendered":"\n<p>Zabbix 6 is the new version supplied by zabbix , another GUI changes and new abilities. To install it on CentOS stream 9 you need to Disable Zabbix packages provided by EPEL, if you have it installed. Edit file \/etc\/yum.repos.d\/epel.repo and add the following statement<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[epel]\n...\nexcludepkgs=zabbix*<\/pre>\n\n\n\n<p> <\/p>\n\n\n\n<p>Then you Proceed with installing zabbix repository.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># rpm -Uvh https:\/\/repo.zabbix.com\/zabbix\/6.4\/rhel\/9\/x86_64\/zabbix-release-6.4-1.el9.noarch.rpm\n# dnf clean all<\/pre>\n\n\n\n<p>Now you can install all the software part :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent<\/pre>\n\n\n\n<p>Depend on your Linux installation, some time you will need to install MySQL separately <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#yum install mariadb-server\n#mysql -V\n#systemctl enable mariadb\n#systemctl start mariadb\n#systemctl status mariadb<\/pre>\n\n\n\n<p>Next Create the database after you make sure it is up and running ! If you are planning to monitor large environment I recommend splinting the database to table per files (instead of one large file), edit the file <strong>\/etc\/my.cnf<\/strong> : <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mysqld]\ninnodb_file_per_table<\/pre>\n\n\n\n<p>Now lets create the database :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql_secure_installation\n\nmysql -u root -p\ncreate database zabbix_db character set utf8 collate utf8_bin;\ngrant all privileges on zabbix_db.* to zabbix_user@localhost identified by 'zabbix' ;\nflush privileges;\nshow create database zabbix_db;     -&gt;to make sure db is created O.K\nexit<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Temporary disable strict mode (ZBX-16465) to avoid MySQL error \u201cERROR 1118 (42000) at line 1284: Row size too large (&gt; 8126)\u201d :<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">#mysql -uroot -p'your_password you set for mysql' zabbix_db -e \"set global innodb_strict_mode='OFF';\"<\/pre>\n\n\n\n<p>Now you can safley build the database :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#zcat \/usr\/share\/zabbix-sql-scripts\/mysql\/server.sql.gz | mysql zabbix_db -uzabbix_user -pzabbix<\/pre>\n\n\n\n<p>Re-Enable the sql strict mode:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#mysql -uroot -p'your_password you set for mysql' zabbix_db -e \"set global innodb_strict_mode='ON';\"<\/pre>\n\n\n\n<p>And continue to configure the database for Zabbix server, Edit file \/etc\/zabbix\/zabbix_server.conf :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#nano \/etc\/zabbix\/zabbix_server.conf\nDBname=zabbix_db\nDBuser=zabbix_user\nDBPassword=zabbix\n<\/pre>\n\n\n\n<p>Start Zabbix server and agent processes and enable it to start with the server:<\/p>\n\n\n\n<p><code># systemctl restart zabbix-server zabbix-agent httpd php-fpm<br># systemctl enable zabbix-server zabbix-agent httpd php-fpm<\/code><\/p>\n\n\n\n<p>Add the firewall rules :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#firewall-cmd --add-service={http,https} --permanent\n#firewall-cmd --add-port={10051\/tcp,10050\/tcp} --permanent\n#firewall-cmd --reload<\/pre>\n\n\n\n<p>Now lets start configure the web front-end :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#nano \/etc\/php-fpm.d\/zabbix.conf\nphp_value date.timezone Asia\/Jerusalem<\/pre>\n\n\n\n<p>Restart the services :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#systemctl restart httpd php-fpm\n#systemctl enable httpd php-fpm<\/pre>\n\n\n\n<p>Thats it ! Now open a browser and surf to :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/your_zabbix_server_IP\/zabbix<\/pre>\n\n\n\n<p>Enter this variables :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Database name : zabbix_db\nuser : zabbix_user\nPassword : zabbix\n<\/pre>\n\n\n\n<p>Start using zabbix, you can find the quick start guide<strong> <a rel=\"noreferrer noopener\" href=\"https:\/\/www.zabbix.com\/documentation\/6.4\/en\/manual\/quickstart\/login\" target=\"_blank\">here<\/a><\/strong>  (the default user is Admin and the password is zabbix): <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><a rel=\"noreferrer noopener\" href=\"https:\/\/www.zabbix.com\/documentation\/6.4\/en\/manual\/quickstart\/login\" target=\"_blank\"><strong>https:\/\/www.zabbix.com\/documentation\/6.4\/en\/manual\/quickstart\/login<\/strong><\/a><\/pre>\n\n\n\n<figure class=\"wp-block-pullquote has-vivid-green-cyan-color has-text-color has-large-font-size\"><blockquote><p>Good Luck<\/p><\/blockquote><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix 6 is the new version supplied by zabbix , another GUI changes and new abilities. To install it on CentOS stream 9 you need to Disable Zabbix packages provided by EPEL, if you have it installed. Edit file \/etc\/yum.repos.d\/epel.repo and add the following statement [epel] &#8230; excludepkgs=zabbix* Then you Proceed with installing zabbix repository. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,13,21,12],"tags":[],"class_list":["post-2503","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-operating-systems","category-tutorials"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2503"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/2503\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}