CentOS 6.8安装Zabbix3.2
2018/07 作者:ihunter 0 次 0
yum install -y vim wgetlrzsz |
setenforce 0 |
mv /etc/yum .repos.d /CentOS-Base .repo /etc/yum .repos.d /CentOS-Base .repo.bak wget http: //mirrors .aliyun.com /repo/epel .repo -O /etc/yum .repos.d /epel .repo wget http: //mirrors .aliyun.com /repo/Centos-6 .repo -O /etc/yum .repos.d /CentOS-Base .repo |
yum list installed | grep mysql |
yum remove mysql* |
rpm -ivh http: //dev .mysql.com /get/mysql-community-release-el6-5 .noarch.rpm |
yum install mysql-server -y |
[mysqld] innodb_file_per_table |
/etc/init .d /mysqld start |
mysql -uroot -p CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbix' ; |
rpm -ivh http: //repo .webtatic.com /yum/el6/latest .rpm |
yum -y install httpd php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap ntpdate net-snmp* |
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 |
servicehttpd start |
iptables -I INPUT -p tcp -m multiport --destination-port 80,10050:10051 -j ACCEPT serviceiptables save |
ntpdate time .windows.com |
groupadd zabbix useradd -g zabbixzabbix |
mkdir /usr/local/zabbix cd /usr/local/zabbix |
wget http: //jaist .dl.sourceforge.net /project/zabbix/ZABBIX %20Latest%20Stable /3 .2.0 /zabbix-3 .2.0. tar .gz |
tar zxvf zabbix-3.2.0. tar .gz |
cd /usr/local/zabbix/zabbix-3 .2.0 /database/mysql mysql -u zabbix -p zabbixzabbix mysql -u zabbix -p zabbixzabbix mysql -u zabbix -p zabbixzabbix |
yum install -y gccmysql-community-devel libxml2-devel unixODBC-devel net-snmp-devellibcurl-devel libssh2-develOpenIPMI-developenssl-developenldap-develfping |
cd /usr/local/zabbix/zabbix-3 .2.0/ . /configure -- enable -server -- enable -agent --with-mysql -- enable -ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl make install |
vim /usr/local/etc/zabbix_server .conf DBName=zabbix DBUser=zabbix DBPassword=zabbix FpingLocation= /usr/sbin/fping |
mkdir /var/www/html/zabbix cd /home/zabbix/downloads/zabbix-3 .2.0 /frontends/php/ cp -a . /var/www/html/zabbix/ |
chcon -Rv -- type =httpd_sys_content_t /var/www/html |
setsebool -P httpd_can_network_connect=1 setsebool -P zabbix_can_network=1 |
chown -R apache:apache /var/www/html/zabbix |
chmod +x /var/www/html/zabbix/conf/ |
cp /usr/local/zabbix/zabbix-3 .2.0 /misc/init .d /fedora/core/zabbix_server /etc/init .d /zabbix_server cp /usr/local/zabbix/zabbix-3 .2.0 /misc/init .d /fedora/core/zabbix_agentd /etc/init .d /zabbix_agentd chkconfig --add /etc/init .d /zabbix_server chkconfig --add /etc/init .d /zabbix_agentd |
chkconfig httpd on chkconfig mysqld on chkconfig zabbix_server on chkconfig zabbix_agentd on |
service zabbix_server start service zabbix_agentd start |
cd /var/www/html/zabbix/fonts/ |
vim /var/www/html/zabbix/include/defines .inc.php define( 'ZBX_FONT_NAME' , 'msyh' ); define( 'ZBX_GRAPH_FONT_NAME' , 'msyh' ); // font file name |
上篇:
LVS+keepalived+nginx+tomcat部署实现
下篇:
CentOS6.5下Zabbix安装部署及汉化