soyou盘启动-(soyou盘启动bios设置)

常见问题 次浏览手机阅读
(soyou盘启动bios设置)

zabbix5.0版和4.0还是有很大区别的,今天就更新一下zabbix5.0施工过程。

一、准备

主机

IP

配置

系统

zabbix-server

10.30.59.242

2vcpu/4G内存/40G硬盘

centos7-1511

二、安装步骤

安装声明: 本安装为安装rpm包、web使用nginx

1.关闭防火墙

[root@localhost ~]# systemctl stop firewalld[root@localhost ~]# systemctl disable 电脑firewalldRemoved symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.[root@localhost ~]# setenforce 0[root@localhost ~]# vi /etc/selinux/config[root@localhost ~]# iptables -F[root@localhost ~]# iptables -X[root@localhost ~]# iptables -Z[root@localhost ~]# iptables-save# Generated by iptables-save v1.4.21 on Tue Jun 22 01:32:04 2021*filter:INPUT ACCEPT[18:1204]:FORWARD ACCEPT[0:0]:OUTPUT ACCEPT[10:1048]COMMIT# Completed on Tue Jun 22 01:32:04 2021


2、下载zabbix

rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm


官网的yum源是国外的,这里改为国内,以提高速度。

[root@localhost ~]# sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' 电脑 /etc/yum.repos.d/zabbix.repo[root@localhost ~]# yum clean all# 下载zabbix-server zabbix-agent[root@localhost ~]# yum install zabbix-server-mysql zabbix-agent -y


3、安装Software Collections。

SCL您可以在不影响整个系统安装包的情况下,在同一操作系统上安装和使用多个版本的软件,软件包将安装在/opt/rh目录下。

[root@localhost ~]# yum install -y centos-release-scl


4、安装web环境

# 修改yum源,开启frontend[root@localhost ~]# vi /etc/yum.repos.d/zabbix.repo[zabbix-frontend]name=Zabbix Official Repository frontend - $basearchbaseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/$basearch/frontendenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591[root@localhost ~]# yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl -y


5、MySQL配置

# 安装MySQL[root@localhost ~]# yum install -y mariadb-server# 启动服务[root@localhost ~]# systemctl start mariadb# 初始化[root@localhost ~]# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none):OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.Set root password?[Y/n]y # 修改用户密码New password: 000000 # 输入新的用户密码Re-enter new password:000000 # 重新输入Password updated successfully!Reloading privilege tables... Success!By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users?[Y/n]y # 删除匿名用户... Success!Normally, root should only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely?[Y/n]n 远程登录是否关闭... skipping.By default, MariaDB comes with a database named 'test' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.Remove test database and access to it?[Y/n]y # 删除test数据库- Dropping test database... Success![Y/n]y # 删除test数据库- Dropping test database... Success!- Removing privileges on test database... Success!Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now?[Y/n]y # 授权表是否刷新... Success!Cleaning up...All done! If you've completed all of the above steps, your MariaDBinstallation should now be secure.Thanks for using MariaDB![root@localhost ~]# mysql -uroot -p000000Welcome to the MariaDB monitor. Commands end with ; or \\g.Your MariaDB connection id is 9Server version: 5.5.68-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.MariaDB[(none)]> create database zabbix character set utf8 collate utf8_bin;Query OK, 1 row affected (0.00 sec) # 创建zabbix数据库 指定字符编码utf8MariaDB[(none)]> create user zabbix@localhost identified by '000000';Query OK, 0 rows affected (0.00 sec) # 创建本地用户zabbix 密码000000MariaDB[(none)]> grant all privileges on zabbix.* to zabbix@localhost;Query OK, 0 rows affected (0.00 sec) # 让zabbix用户有zabbix数据库的所有权。MariaDB[(none)]> flush privileges; # 刷新权限QueryOK



电脑


电脑
喜欢 ()