基于CentO S 7搭建zabbix服务器租用 海外不限流量搭建服务器
需要服务器咨询以下联系方式
联系人:銳輝(香港)科技 敏敏
扣扣:3007425289/2853898501
电话:18316411879
稳定24小时售后 不限流量CN2带宽
第二台机器半价 先到先得 新机柜 上完截止 没有抢到等新的机柜
佛山高防服务器 BGP高防服务器 福州棋-牌游戏服务器 开80挂站端口 网站服务器 视频节点服务器 锐辉高防 精品高防服务器。锐辉网络 亚太地区 菲律宾 台湾 香港
韩国 cn2线路直连大陆线路 稳定 业务不限。
一、 先确保主机能上网:ping www.baidu.com
二、 配置主机映射:
Vi /etc/hosts
三、 使用centos默认yum源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
四、 下载安装LAMP以及所需要的依赖包数据库、PHP等软件。(这里我安装了所有用到的依赖包以及插件)
yum -y install net-snmp net-snmp-devel libxml2 libxml2-devel libcurl-devel libevent libevent libevent-devel curl curl-devel mysql-devel perl-DBI php-xml php-bcmath php-mbstring php-ldap php-xmlrpc httpd php php-mysql php-common php-gd php-odbc php-pear gcc* net-snmp libssh2 libssh2-devel mariadb-server mariadb mariadb-devel ntpdate。
如果出现安装过的软件或插件直接跳过就好。
五、 1.调整与阿里云服务器同步时间。
ntpdate ntp1.aliyun.com
2.添加阿里云域名:
echo “ntpdate ntp1.aliyun.com” >>/etc/rc.local
3.给etc下rc.local文件执行权限,并启动mariadb、httpd服务。
六.1.下载zabbix软件包
wget -O zabbix-3.4.2.tar.gz http://sourceforge.net/projects/ ... 4.2.tar.gz/download
2.解压下载的软件包:
tar zxvf zabbix-3.4.2.tar.gz
3.进入解压后的文件:
[root@www ~]# cd zabbix-3.4.2
4.指定安装目录为 :
5.开始安装:
make &&make install
七.设置数据库root用户登陆密码后进入数据库创建保存监控模板的数据库,并导入数据模板,以及授权zabbix用户连接数据库;
1.进入数据库
2.往下输:
create database if not exists zabbix default character set utf8 collate utf8_general_ci;
use zabbix;
source /root/zabbix-3.4.2/database/mysql/schema.sql;
source /root/zabbix-3.4.2/database/mysql/images.sql;
source /root/zabbix-3.4.2/database/mysql/data.sql;
grant all on zabbix.* to zabbix@‘192.168.1.105’ identified by ‘zabbix’;(这是密码)
flush privileges;
show grants for zabbix@‘192.168.1.105’;
exit
3.退出数据库后创建相应用户以及目录和赋予权限
[root@www ~]# groupadd zabbix
[root@www ~]# useradd -r -g zabbix zabbix
[root@www ~]# mkdir /usr/local/zabbix/logs
[root@www ~]# chown zabbix:zabbix /usr/local/zabbix/ -R
4.修改zaabix服务的主配置文件(在文件底部添加相应配置):
[root@www~]#vi /usr/local/zabbix/etc/zabbix_server.conf
LogFile=/usr/local/zabbix/logs/zabbix_server.log
PidFile=/tmp/zabbix_server.pid
DBHost=192.168.1.105
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock
Include=/usr/local/zabbix/etc/zabbix_server.conf.d/*.conf
5.修改zabbix的代理服务,添加如下配置:
[root@www ~]# vi /usr/local/zabbix/etc/zabbix_agentd.conf
PidFile=/tmp/zabbix_agentd.pid
Server=127.0.0.1,192.168.1.105
ServerActive=192.168.1.105
Hostname=www.gyq28.com
LogFile=/usr/local/zabbix/logs/zabbix_agentd.log
Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/.conf
解释:
PidFile=/tmp/zabbix_agentd.pid ##运行的PID文件
Server=127.0.0.1,192.168.1.105 ##输入zabbix_server主机的ip地址
ServerActive=192.168.1.105 ##输入agent主机采集到数据发送到的server端
Hostname=www.gyq28.com ##输入本机的主机名
LogFile=/usr/local/zabbix/logs/zabbix_agentd.log ##指定日志文件
Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/.conf ##开启附加配置文件目录
6启动zabbix_server和zabbix_agentd
7.移动PHP文件到zabbix下,并赋予权限。
7-2 在vi /etc/php.ini
修改php.ini文件,添加如下配置
date.timezone = Asia/Shanghai
max_execution_time = 300
max_input_time = 300
post_max_size = 32M
memory_limit = 128M
extension=bcmath.so
45.195.145.1
45.195.145.2
45.195.145.3
45.195.145.4
45.195.145.5
45.195.145.6
45.195.145.7
45.195.145.8
45.195.145.9
45.195.145.10
45.195.145.11
45.195.145.12
45.195.145.13
45.195.145.14
45.195.145.15
45.195.145.16
45.195.145.17
45.195.145.18
45.195.145.19
45.195.145.20
45.195.145.21
45.195.145.22
45.195.145.23
45.195.145.24
45.195.145.25
45.195.145.26
45.195.145.27
45.195.145.28
45.195.145.29
45.195.145.30
45.195.145.31
45.195.145.32
45.195.145.33
45.195.145.34
45.195.145.35
45.195.145.36
45.195.145.37
45.195.145.38
45.195.145.39
45.195.145.40
45.195.145.41
45.195.145.42
45.195.145.43
45.195.145.44
45.195.145.45
45.195.145.46
45.195.145.47
45.195.145.48
45.195.145.49
45.195.145.50
45.195.145.51
45.195.145.52
45.195.145.53
45.195.145.54
45.195.145.55
45.195.145.56
45.195.145.57
45.195.145.58
45.195.145.59
45.195.145.60
45.195.145.61
45.195.145.62
45.195.145.63
45.195.145.64
45.195.145.65
45.195.145.66
45.195.145.67
45.195.145.68
45.195.145.69
45.195.145.70
45.195.145.71
45.195.145.72
45.195.145.73
45.195.145.74
45.195.145.75
45.195.145.76
45.195.145.77
45.195.145.78
45.195.145.79
45.195.145.80
45.195.145.81
45.195.145.82
45.195.145.83
45.195.145.84
45.195.145.85
45.195.145.86
45.195.145.87
45.195.145.88
45.195.145.89
45.195.145.90
45.195.145.91
45.195.145.92
45.195.145.93
45.195.145.94
45.195.145.95
45.195.145.96
45.195.145.97
45.195.145.98
45.195.145.99
45.195.145.100
45.195.145.101
45.195.145.102
45.195.145.103
45.195.145.104
45.195.145.105
45.195.145.106
45.195.145.107
45.195.145.108
45.195.145.109
45.195.145.110
45.195.145.111
45.195.145.112
45.195.145.113
45.195.145.114
45.195.145.115
45.195.145.116
45.195.145.117
45.195.145.118
45.195.145.119
45.195.145.120
45.195.145.121
45.195.145.122
45.195.145.123
45.195.145.124
45.195.145.125
45.195.145.126
45.195.145.127
45.195.145.128
45.195.145.129
45.195.145.130
45.195.145.131
45.195.145.132
45.195.145.133
45.195.145.134
45.195.145.135
45.195.145.136
45.195.145.137
45.195.145.138
45.195.145.139
45.195.145.140
45.195.145.141
45.195.145.142
45.195.145.143
45.195.145.144
45.195.145.145
45.195.145.146
45.195.145.147
45.195.145.148
45.195.145.149
45.195.145.150
45.195.145.151
45.195.145.152
45.195.145.153
45.195.145.154
45.195.145.155
45.195.145.156
45.195.145.157
45.195.145.158
45.195.145.159
45.195.145.160
45.195.145.161
45.195.145.162
45.195.145.163
45.195.145.164
45.195.145.165
45.195.145.166
45.195.145.167
45.195.145.168
45.195.145.169
45.195.145.170
45.195.145.171
45.195.145.172
45.195.145.173
45.195.145.174
45.195.145.175
45.195.145.176
45.195.145.177
45.195.145.178
45.195.145.179
45.195.145.180
45.195.145.181
45.195.145.182
45.195.145.183
45.195.145.184
45.195.145.185
45.195.145.186
45.195.145.187
45.195.145.188
45.195.145.189
45.195.145.190
45.195.145.191
45.195.145.192
45.195.145.193
45.195.145.194
45.195.145.195
45.195.145.196
45.195.145.197
45.195.145.198
45.195.145.199
45.195.145.200
45.195.145.201
45.195.145.202
45.195.145.203
45.195.145.204
45.195.145.205
45.195.145.206
45.195.145.207
45.195.145.208
45.195.145.209
45.195.145.210
45.195.145.211
45.195.145.212
45.195.145.213
45.195.145.214
45.195.145.215
45.195.145.216
45.195.145.217
45.195.145.218
45.195.145.219
45.195.145.220
45.195.145.221
45.195.145.222
45.195.145.223
45.195.145.224
45.195.145.225
45.195.145.226
45.195.145.227
45.195.145.228
45.195.145.229
45.195.145.230
45.195.145.231
45.195.145.232
45.195.145.233
45.195.145.234
45.195.145.235
45.195.145.236
45.195.145.237
45.195.145.238
45.195.145.239
45.195.145.240
45.195.145.241
45.195.145.242
45.195.145.243
45.195.145.244
45.195.145.245
45.195.145.246
45.195.145.247
45.195.145.248
45.195.145.249
45.195.145.250
45.195.145.251
45.195.145.252
45.195.145.253
45.195.145.254
45.195.145.255
|