首页
归档
时光轴
推荐
Cloud
图床
导航
Search
1
Deploy OpenStack offline based on Kolla
737 阅读
2
openstact 基础环境安装 (手动版)
686 阅读
3
Mariadb 主从复制&读写分离
642 阅读
4
Typecho 1.2.0 部署
639 阅读
5
FusionCompute8.0 体验
573 阅读
Python
Linux
随笔
mysql
openstack
Search
标签搜索
linux
Pike
python
爬虫
openstack
mysql
Essay
Ansible
docker
Zabbix
kolla
Internet
Redis
1+X
Hyper-V
jenkins
Kickstart
自动化
sh
pxe
Acha
累计撰写
77
篇文章
累计收到
1
条评论
首页
栏目
Python
Linux
随笔
mysql
openstack
页面
归档
时光轴
推荐
Cloud
图床
导航
搜索到
2
篇与
的结果
2021-10-07
CentOS7 Zabbix5.0 分布安装
zabbix5.0 分布安装 环境规划 主机名 IP 环境 zabbix-server 10.35.172.76 zabbix-server、zabbix-agent zabbix-web 10.35.172.77 nginx、php7.2 zabbix-db 10.35.172.78 mysql5.7 zabbix-db # 安装 MySQL5.7 Yum 源 rpm -ivh http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm # 检查 Yum 源 ls /etc/yum.repos.d/ yum repolist enabled | grep mysql # 安装 & 启动 MySQL yum install mysql-community-server -y systemctl start mysqld && systemctl enable mysqld # 修改root密码, 创建zabbix数据库及用户并授权,刷新权限 grep 'temporary password' /var/log/mysqld.log mysql -uroot -pds,GLkvre7fG mysql> ALTER USER root@localhost IDENTIFIED BY 'P@ssw0rd'; mysql> create database zabbix character set utf8 collate utf8_bin; mysql> create user 'zabbix'@'%' identified by 'P@ssw0rd'; mysql> grant all privileges on zabbix.* to 'zabbix'@'%'; mysql> flush privileges; # 导入数据(create.sql.gz由zabbix-server主机拷贝) zcat create.sql.gz | mysql -uzabbix -pP@ssw0rd zabbix zabbix-web # 安装 PHP7 Yum 源 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm # 安装 php7.2 及相关插件 yum install php72w-fpm php72w-gd.x86_64 php72w-bcmath.x86_64 php72w-xml.x86_64 php72w-mbstring.x86_64 php72w-ldap.x86_64 php72w-mysqlnd.x86_64 -y # 检查 php版本 php-fpm -v # 安装 Nginx yum install nginx -y # 生成 Nginx 模板文件 grep -Ev "#|^$" /etc/nginx/nginx.conf.default > /etc/nginx/nginx.conf # cp php 相关片段 vim /etc/nginx/nginx.conf.default #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # 修改配置文件 vim /etc/nginx/nginx.conf # 修改 root 目录 index # 删除 error 模块 # 添加 php相关片段 # 创建 Nginx 网页目录 mkdir /html # 检查 Nginx 语法 nginx -t # 启动 Nginx & php systemctl start nginx && systemctl enable nginx systemctl start php-fpm && systemctl enable php-fpm # 下载 Zabbix 软件包 wget https://cdn.zabbix.com/zabbix/sources/stable/5.0/zabbix-5.0.16.tar.gz # 解压 & cp 前端文件 到 网页目录 tar xf zabbix-5.0.16.tar.gz cp -a /root/zabbix-5.0.16/ui/* /html # 目录授权 chown -R nginx:nginx /html # 创建 session 目录,并授权 mkdir /var/lib/php/session chown -R nginx:nginx /var/lib/php/session # 修改 php.ini 配置文件 vim /etc/php.ini # max_execution_time = 300 # max_input_time = 300 # post_max_size = 16M # date.timezone = Asia/Shanghai # 重启生效配置文件 systemctl restart php-fpm # 上传字体文件,并替换 cd /html/assets/fonts mv simhei.ttf DejaVuSans.ttf zabbix-server # 安装 Zabbix Yum源 rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm # 替换 Yum仓库 sed -i 's#http://repo.zabbix.com#https://mirrors.tuna.tsinghua.edu.cn/zabbix#g' /etc/yum.repos.d/zabbix.repo # 安装 zabbix-server yum install zabbix-server-mysql -y # 将 create.sql.gz 拷贝至 zabbix-db scp /usr/share/doc/zabbix-server-mysql-5.0.16/create.sql.gz 10.35.172.78:/root # 配置 zabbix-server 中的 DB vim /etc/zabbix/zabbix_server.conf # DBHost=localhost # DBName=zabbix # DBUser=zabbix # DBPassword=123456 # 启动 Zabbix-server systemctl start zabbix-server && systemctl enable zabbix-server # 安装 net-tools,检查 服务端口 yum install -y net-tools netstat -lntp # 安装 & 启动 zabbix-agent yum install -y zabbix-agent systemctl start zabbix-agent && systemctl enable zabbix-agent 访问 10.35.172.77 配置使用 zabix
2021年10月07日
208 阅读
0 评论
0 点赞
2021-10-06
CentOS7 安装 Zabbix4.0
CentOS7 安装 Zabbix4.0 准备 Yum 源 # 备份 Yum 源 mkdir /etc/yum.repos.d/bak mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak # CentOS7 Zabbix4.0 Yum源 echo "[zabbix] name=Zabbix Official Repository - $basearch baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 [zabbix-debuginfo] name=Zabbix Official Repository debuginfo - $basearch baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/$basearch/debuginfo/ enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 gpgcheck=1 [zabbix-non-supported] name=Zabbix Official Repository non-supported - $basearch baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/non-supported/rhel/7/$basearch/ enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX gpgcheck=1" > /etc/yum.repos.d/zabbix.repo # epel & CentOS7.5(1804) Yum源 echo "[epel] name=epel baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/ gpgcheck=0 enabled=1 [centos] name=centos baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.5.1804/os/x86_64/ gpgcheck=0 enabled=1" > /etc/yum.repos.d/repo.repo # 清除缓存,查看 Yum 列表 yum clean all yum repolist 下载 服务端程序 yum install -y zabbix-server-mysql zabbix-web-mysql yum install -y mariadb-server 配置 数据库 systemctl start mariadb && systemctl enable mariadb mysql_secure_installation #回车 第一个N 其他Y mysql MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'%' identified by 'zabbix'; cd /usr/share/doc/zabbix-server-mysql-4.0.34/ zcat create.sql.gz | mysql -uzabbix -pzabbix zabbix 配置 服务端 vim /etc/zabbix/zabbix_server.conf # 修改 连接数据库相关配置 # DBHost=localhost < 数据库 IP > # DBName=zabbix < 数据库名> # DBUser=zabbix < 数据库用户> # DBPassword=zabbix < 数据库密码> vim /etc/httpd/conf.d/zabbix.conf # 修改时区 (去除注释) # php_value date.timezone Asia/Shanghai systemctl start zabbix-server && systemctl enable zabbix-server systemctl start httpd && systemctl enable httpd yum install -y net-tools netstat -lntp # 检查 是否有 Zabbix-server (10051) 端口 # 登录 zabbix 网页设置 添加 监控主机 yum install -y zabbix-agent vi /etc/zabbix/zabbix_agentd.conf # 修改服务端 IP # Server=127.0.0.1 systemctl start zabbix-agent && systemctl enable zabbix-agent # 网页添加 监控主机
2021年10月06日
238 阅读
0 评论
0 点赞