环境
CentOS-7-x86_64-Everything-1708.iso
CentOS-7-x86_64-Minimal-1708.iso
初始化系统
mount /dev/cdrom /mnt
vim /etc/fstab
/dev/cdrom /mnt iso9660 defaults 0 0
cd /etc/yum.repos.d/
删除不需要的repo
vi CentOS-Media.repo
[CentOS-7-x86_64-Everything-1708]
name=CentOS7-ISO
baseurl=file://mnt/
gpgcheck=0
enabled=1
yum clean all
yum list
yum install vim
cd
cp /usr/share/vim/vim74/vimrc-ex* .vimrc
vi .vimrc
set nobackup
set number
vim /etc/sysconfig/network-scripts/ifcfg-en33
onboot=yes
systemctl restart network
vim /etc/ssh/sshd_config
Port 22
ListenAddress 0.0.0.0
systemctl start sshd
systemctl enable sshd
setenforce 0
vi /etc/selinux/config
SELINUX=disabled
systemctl stop firewalld.service
systemctl disable firewalld.service
Zabbix安装
yum install -y httpd
systemctl enable httpd
systemctl start httpd
yum install -y mariadb mariadb-server
systemctl enable mariadb
systemctl start mariadb
yum install -y php php-mysql
rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
yum install -y zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender
mysql
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
grant all privileges on zabbix.* to zabbix@bogon identified by 'zabbix';
flush privileges;
cd /usr/share/doc/zabbix-server-mysql-
gunzip create.sql.gz
mysql
use zabbix
source create.sql
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock
systemctl start zabbix-server
systemctl enable zabbix-server
systemctl start zabbix-agent
systemctl enable zabbix-agent
vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
systemctl restart httpd
登录zabbix服务器网页
http://zabbix服务器地址/zabbix
用户名:Admin
密码:zabbix
参考文章:
https://www.zabbix.com/documentation/current/manual/installation/install_from_packages/rhel_centos