{"id":2887,"date":"2020-11-30T11:35:12","date_gmt":"2020-11-30T03:35:12","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=2887"},"modified":"2020-12-18T09:33:44","modified_gmt":"2020-12-18T01:33:44","slug":"centos7-6%e5%ae%89%e8%a3%85zabbix4-0-lts%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=2887","title":{"rendered":"Centos7.6\u5b89\u88c5zabbix4.0 LTS\u7248\u672c"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>\u5173\u95ed\u9632\u706b\u5899\u53caselinux\nsystemctl stop firewalld.service\nsystemctl disable firewalld.service\nsed -i 's\/SELINUX=enforcing\/SELINUX=disabled\/' \/etc\/selinux\/config\ngrep SELINUX=disabled \/etc\/selinux\/config\nsetenforce 0\n\n\n\u4e0b\u8f7d\u5b89\u88c5zabbix\u6700\u65b0rpm\u5305\nrpm -Uvh https:\/\/repo.zabbix.com\/zabbix\/4.0\/rhel\/7\/x86_64\/zabbix-release-4.0-1.el7.noarch.rpm\nyum install zabbix-server-mysql zabbix-web-mysql zabbix-agent\n\n\u5b89\u88c5DB\nyum install mariadb-server\nsystemctl start mariadb.service\nsystemctl enable mariadb.service\n\n\u521b\u5efaDB\ncreate database zabbix character set utf8 collate utf8_bin;\ngrant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';\n\n\u5bfc\u5165\u6570\u636e\u5e93\ntar -xf \/usr\/share\/doc\/zabbix-server-mysql*\/create.sql.gz\n\u8fdbmysql, source create.sql\n\u6216\u8005\nzcat \/usr\/share\/doc\/zabbix-server-mysql*\/create.sql.gz | mysql -uzabbix -p zabbix\n\n\n\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff1a\nvim  \/etc\/zabbix\/zabbix_server.conf\nDBPassword=XXXXXXXXXX\n \nvim \/etc\/httpd\/conf.d\/zabbix.conf\nphp_value date.timezone Asia\/Shanghai\n\n\u67e5\u627ezabbix.conf.php\u5e76\u67e5\u770b\u662f\u5426\u8bbe\u7f6e\u6b63\u786e\n\/etc\/zabbix\/web\/zabbix.conf.php\n\n\u5f00\u542fZabbix server and agent \u8fdb\u7a0b\nsystemctl restart zabbix-server zabbix-agent httpd\nsystemctl enable zabbix-server zabbix-agent httpd\n\n\u5b89\u88c5zabbix web\nhttp:\/\/xxxx\/zabbix<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2887"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2887"}],"version-history":[{"count":3,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2887\/revisions"}],"predecessor-version":[{"id":2902,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2887\/revisions\/2902"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}