07 2023 档案

摘要:方法一:用sed 流编辑器 #!/bin/bash# # Filename: cutalert.sh# Revision: 1.1# Date: 2023/02/17# Author:xu# Description:截取当天警告日志文件# # Copyright: 2023 xu# License: 阅读全文
posted @ 2023-07-26 21:36 Xuxuxu2022 阅读(99) 评论(0) 推荐(0) 编辑
摘要:客户端需求 客户端需求:1.客户端每天凌晨1点在服务器本地打包备份(/etc目录和/var/log目录) 2.客户端备份的数据必须存放至以 "主机名_ip地址_当前时间" 命名的目录中 3.客户端最后通过rsync推送本地已经打包好的备份文件至backup服务器 4.客户端服务器本地保留最近7天的数 阅读全文
posted @ 2023-07-21 15:41 Xuxuxu2022 阅读(29) 评论(0) 推荐(0) 编辑
摘要:一:安装部分: https://prometheus.io/download/ ###下载源码解压即可 https://grafana.com/grafana/dashboards ###搜索数据源为prometheus的 这里下载了:prometheus、node_exporter、alertma 阅读全文
posted @ 2023-07-21 15:37 Xuxuxu2022 阅读(47) 评论(0) 推荐(0) 编辑
摘要:三台主机rsyslog ,mysql ,loganalyzer 1 rsyslog yum install rsyslog-mysqlscp /usr/share/doc/rsyslog-8.24.0/mysql-createDB.sql 192.168.30.17:vim /etc/rsyslog 阅读全文
posted @ 2023-07-14 19:25 Xuxuxu2022 阅读(19) 评论(0) 推荐(0) 编辑
摘要:环境:centos7.4apr-1.6.3.tar.gz apr-util-1.6.1.tar.gz httpd-2.4.33.tar.bz2 mariadb-10.2.15-linux-x86_64.tar.gz php-7.1.18.tar.bz2wordpress-4.9.4-zh_CN.ta 阅读全文
posted @ 2023-07-14 19:24 Xuxuxu2022 阅读(12) 评论(0) 推荐(0) 编辑
摘要:环境:四台主机manager,master,slave1,slave2 1 准备selinux ,iptables ,time四个主机实现ssh key验证 2 在manager节点yum install mha4mysql-manager-0.56-0.el6.noarch.rpm mha4mys 阅读全文
posted @ 2023-07-14 19:23 Xuxuxu2022 阅读(5) 评论(0) 推荐(0) 编辑
摘要:在主节点实现1 vim /etc/my.cnfserver_id=1log_bininnodb_file_per_table systemctl restart mariadb2 mysql>grant replication slave on *.* to repluser@'192.168.30 阅读全文
posted @ 2023-07-14 19:22 Xuxuxu2022 阅读(4) 评论(0) 推荐(0) 编辑
摘要:前提:log_bin=ON 1 全备份mysqldump -A -F --single-transaction --master-data=2 > /backup/full.sql 2 10:00前修改数据insert students3 10:00 删除表drop table students; 阅读全文
posted @ 2023-07-14 19:21 Xuxuxu2022 阅读(100) 评论(0) 推荐(0) 编辑
摘要:- 备份过程 1 实现LVMmkdir /data/{mysql,binlog}vim /etc/fstabmount /dev/vg0/lv_mysql /data/mysqlmount /dev/vg0/lv_binlog /data/binlog chown -R mysql.mysql /d 阅读全文
posted @ 2023-07-14 19:20 Xuxuxu2022 阅读(74) 评论(0) 推荐(0) 编辑
摘要:1 yum install mariadb-server 2 mkdir /mysqldb/{3306,3307,3308}/{etc,socket,pid,log,data} -pv chown -R mysql.mysql /mysqldb/ 3 mysql_install_db --datad 阅读全文
posted @ 2023-07-14 19:20 Xuxuxu2022 阅读(28) 评论(0) 推荐(0) 编辑
摘要:1 检查环境iptables selinuxmariadb-server 2 下载二进制包 3 useradd -r -d /data/mysqldb -s /sbin/nologin mysql 4 tar xvf mariadb-10.2.15-linux-x86_64.tar.gz -C /u 阅读全文
posted @ 2023-07-14 19:18 Xuxuxu2022 阅读(68) 评论(0) 推荐(0) 编辑
摘要:1 vim /etc/named.confacl beijingnet { 192.168.30.0/24;};acl shanghainet { 172.20.0.0/16; };acl othernet { any;}; options { listen-on port 53 { localho 阅读全文
posted @ 2023-07-14 19:18 Xuxuxu2022 阅读(6) 评论(0) 推荐(0) 编辑
摘要:1 安装包yum install cobbler(EPEL) dhcp systemctl enable cobblerd dhcpd httpd tftpsystemctl start cobblerd httpd tftp 2 cobbler check 3 vim /etc/cobbler/s 阅读全文
posted @ 2023-07-14 19:16 Xuxuxu2022 阅读(14) 评论(0) 推荐(0) 编辑
摘要:0 selinux ,firewall 关闭1 安装包yum install dhcp tftp-server httpd syslinuxsystemctl enable dhcpd httpd tftp.socketsystemctl start httpd 2 准备YUM源 mkdir /va 阅读全文
posted @ 2023-07-14 19:16 Xuxuxu2022 阅读(9) 评论(0) 推荐(0) 编辑
摘要:0 selinux ,firewall 关闭1 安装包yum install dhcp tftp-server httpd syslinuxsystemctl enable dhcpd httpd tftp.socketsystemctl start httpd 2 准备YUM源 mkdir /va 阅读全文
posted @ 2023-07-14 19:15 Xuxuxu2022 阅读(21) 评论(0) 推荐(0) 编辑
摘要:A ssh-keygen ssh-copy-id A scp -rp /root/.ssh B:/root/ scp -rp /root/.ssh C:/root/ [root@centos6 ~]#cat ssh_key.sh <<EOF #!/bin/bash rpm -q expect &> 阅读全文
posted @ 2023-07-14 19:12 Xuxuxu2022 阅读(4) 评论(0) 推荐(0) 编辑
摘要:1 建立Root CA 1)生成私钥 (umask 077;openssl genrsa -out private/cakey.pem 4096 ) 2)自签名证书 openssl req -new -x509 -key private/cakey.pem -out cacert.pem -days 阅读全文
posted @ 2023-07-14 19:09 Xuxuxu2022 阅读(16) 评论(0) 推荐(0) 编辑
摘要:1 修改文件context chcon restorecon semange fcontext -l 2 semanage port -l 3 semanage boolean -l setseboot -P ftpd_anon_write=1 4 vim /etc/selinux/config s 阅读全文
posted @ 2023-07-14 19:07 Xuxuxu2022 阅读(12) 评论(0) 推荐(0) 编辑
摘要:rm -f /boot/* 实验:破坏grub stage1 实验:破坏grub stage1.5 实验:破坏grub stage2 实验:expect 自动在多台主机创建用户test,并设置初始口令 centos6 启动流程 1 post 硬件环境 2 mbr 446 grub stage1 3 阅读全文
posted @ 2023-07-14 19:05 Xuxuxu2022 阅读(30) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示