Zabbix安装实验报告

Zabbix安装实验报告(centos7 zabbix-4.0)
一、Zabbix 主机的初始配置
配置IP地址、主机名,关闭 kdump 与 SELinux
配置IP地址
TYPE=“Ethernet”
BOOTPROTO=“static”
DEFROUTE=“yes”
PEERDNS=“yes”
PEERROUTES=“yes”
IPV4_FAILURE_FATAL=“no”
IPV6INIT=“yes”
IPV6_AUTOCONF=“yes”
IPV6_DEFROUTE=“yes”
IPV6_PEERDNS=“yes”
IPV6_PEERROUTES=“yes”
IPV6_FAILURE_FATAL=“no”
IPV6_ADDR_GEN_MODE=“stable-privacy”
NAME=“ens33”
UUID=“c6ccf3d4-1631-4ad8-b106-767335dfd119”
DEVICE=“ens33”
ONBOOT=“yes”
IPADDR=“192.168.22.39”
GATEWAY=“192.168.22.254”
NETMASK=“255.255.255.0”
DNS1=“114.114.114.114”
DNS2=“8.8.8.8”

设置主机名
[root@localhost ~]# vim /etc/sysconfig/network

Created by anaconda

HOSTNAME=gzt.linux.org
[root@localhost ~]# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.22.39 gzt gzt.linux.org

关闭 kdump 与 SELinux
[root@localhost ~]# vim /etc/selinux/config

This file controls the state of SELinux on the system.

SELINUX= can take one of these three values:

enforcing - SELinux security policy is enforced.

permissive - SELinux prints warnings instead of enforcing.

disabled - No SELinux policy is loaded.

SELINUX=disabled

SELINUXTYPE= can take one of three two values:

targeted - Targeted processes are protected,

minimum - Modification of targeted policy. Only selected processes are protected.

mls - Multi Level Security protection.

SELINUXTYPE=targeted

[root@localhost ~]# systemctl disable kdump
[root@localhost ~]# systemctl stop kdump
[root@localhost ~]# reboot

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
二、部署 LAMP
安装Apache 和 Mariadb
[root@localhost ~]# yum -y install httpd
[root@localhost ~]# yum install mariadb-server -y
[root@gzt ~]# systemctl start httpd.service
[root@gzt ~]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@gzt ~]# systemctl start mariadb.service
[root@gzt ~]# systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

安装php包
[root@localhost ~]# yum -y install php
安装PHP组件,使PHP支持 MariaDB
[root@localhost ~]# yum -y install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash

重启MariaDB、 Apache
[root@gzt ~]# systemctl restart mariadb.service
[root@gzt ~]# systemctl restart httpd.service

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值