重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
一、安装环境介绍
创新互联专注于企业成都全网营销、网站重做改版、沁县网站定制设计、自适应品牌网站建设、H5场景定制、商城网站制作、集团公司官网建设、外贸网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为沁县等各大城市提供网站开发制作服务。
操作系统:CentOS6.5
MySQL: 5.1
php: 官方要求5.4以上,php7暂不支持,本文选择使用php5.6
Apache: httpd2.2
zabbix: 3.0
二、安装httpd
yum -y install httpd httpd-devel
三、安装php
a.添加repo源(二选一)
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
b.安装php及相关组件
yum install php56w php56w-cli php56w-common php56w-devel php56w-pear php56w-gd php56w-mbstring php56w-mysql php56w-xml php56w-bcmath
四、安装mysql
yum -y install mysql-server mysql
启动数据库并设置密码
service mysqld start
/usr/bin/mysqladmin -u root password '123456'
五、安装zabbix
a.添加repo源
vi /etc/yum.repo.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/3.0/rhel/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/6/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
b.安装相关组件
yum install OpenIPMI libssh3 fping libcurl libiksemel net-snmp
c.安装zabbix
yum install -y zabbix-release.noarch
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway
d.创建初始化数据库
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '
zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix
e.修改zabbix配置文件
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=
六、启动zabbix-server
service zabbix-server start
七、添加httpd的zabbix.conf文件
cp /usr/share/doc/zabbix-web-3.0.7/httpd22-example.conf /etc/httpd/conf.d/zabbix.conf
修改文件里的date.timezone Asia/ShangHai
重启httpd服务
service httpd restart
访问
http://172.0.0.1/zabbix