
linux
L白眸
笑看人生百态
展开
-
centos7.9 安装rabbitmq 3.6.15 集群
【代码】centos7.9 安装rabbitmq 3.6.15 集群。原创 2024-02-06 16:02:12 · 1588 阅读 · 0 评论 -
elasticsearch6.8.11备份至minio
【代码】elasticsearch6.8.11备份至minio。原创 2024-01-25 16:55:05 · 705 阅读 · 0 评论 -
elasticsearch6.8.11安装部署开启用户密码访问
【代码】elasticsearch6.8.11安装部署开启用户密码访问。原创 2024-01-25 16:35:17 · 876 阅读 · 0 评论 -
centos7 nginx搭建本地yum仓库
Centos7 nginx 搭建本地yum仓库原创 2023-12-22 17:26:26 · 554 阅读 · 0 评论 -
kafka3.6.0集群部署
kafka3.6.0集群部署原创 2023-11-03 17:25:07 · 1749 阅读 · 0 评论 -
kettle安装
解压安装kettle。原创 2023-10-07 11:31:54 · 253 阅读 · 0 评论 -
centos7.9 openssl升级
centos7.9 openssl升级原创 2023-08-22 10:58:06 · 1171 阅读 · 0 评论 -
centos7.9 cmake 3.27安装
【代码】centos7.9 cmake 3.27安装。原创 2023-08-17 10:23:55 · 682 阅读 · 0 评论 -
centos7.9 gcc 9.4.0 源码安装
centos7.9 gcc 9.4.0源码安装原创 2023-08-17 10:10:37 · 1754 阅读 · 1 评论 -
docker常用命令及配置
docker常用命令及配置原创 2023-02-01 17:09:06 · 177 阅读 · 0 评论 -
zabbix 4.0 钉钉告警
zabbix 4.0 钉钉告警原创 2022-08-15 16:48:28 · 569 阅读 · 0 评论 -
zabbix 4.0 自动发现windows磁盘,并监控磁盘使用率和磁盘剩余容量
zabbix 4.0 自动发现windows磁盘,并监控磁盘使用率和磁盘剩余容量原创 2022-08-15 16:07:04 · 3857 阅读 · 0 评论 -
cwrsync从linux同步文件数据到windows
1.linux端安装rsync:yum -y install rsync2.linux端配置rsync:[root@file_server ~]# cat /etc/rsyncd.conf # /etc/rsyncd: configuration file for rsync daemon mode# See rsyncd.conf man page for more options.# configuration example: uid = nobody gid = no原创 2022-04-09 15:36:52 · 1485 阅读 · 0 评论 -
Routeros花生壳域名解析脚本
操作原因:因routeros出口IP 重拨会更换,为了方便访问routeros,故通过将花生壳域名绑定于routeros的出口IP,我环境的出口是pppoe-1,可根据实际环境修改:gl ipaddr:gl server "http://ddns.oray.com":gl domain "填入你所需绑定域名":gl users "填入花生壳账号":gl paswd "填入花生壳密码":set ipaddr [ /ip address get [find interface...原创 2021-11-16 11:18:46 · 1425 阅读 · 0 评论 -
linux文件乱码文件删除
乱码文件:$ ls -li 1512293 -rw-rw-r-- 1 master master 5548500 Jul 26 11:19 ???͵????̳ǣ????? 268761231 -rw-rw-r-- 1 master master 2603937 Jul 19 09:15 sourcegraph.ctx删除命令:find ./ -inum 1512293 -exec rm -rf {} \;转载 2021-11-03 14:31:46 · 129 阅读 · 0 评论 -
记录工作中Routeros的脚本命令(二)
1.将拨号失败的名字修改到pppoe-out100以后:gl lt 100/interface pppoe-cl:foreach i in [find name~"pppoe-out"] do={:if [get $i running ] do={} else={set $i name=("pppoe-out".$lt):set $lt ($lt+1)}}/2.调整拨号顺序后修正所有拨号的路由和profile:gl array {192.168.10.1;192.168.10.原创 2021-10-25 10:54:36 · 321 阅读 · 0 评论 -
通过crontab达到服务器重启后执行命令或者执行脚本
命令格式:@reboot command (注意:命令的路径要写绝对路径)command:替换为实际环境中需要执行的命令或者脚本[root@zabbix ~]# crontab -l@reboot /usr/bin/systemctl start vsftpd原创 2021-09-29 15:40:23 · 1551 阅读 · 0 评论 -
记find命令的简单使用
1.-name参数,例:查询/root目录下以mysql开头的文件[root@zabbix ~]# find /root/ -name "mysql*"/root/mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar/root/mysql-community-embedded-5.7.28-1.el7.x86_64.rpm/root/mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm/root/mysql-comm原创 2021-09-26 16:42:32 · 130 阅读 · 0 评论 -
lvm给/dev/mapper/centos-root扩容
1.扩容原因: 由于/dev/mapper/centos-root挂载的/目录空间太小需增加空间2.扩容方法: 将从/dev/mapper/centos-home缩小500G重新分配给/dev/mapper/centos-root(注意:该方式需要重新格式化/dev/mapper/centos-home,需备份好数据)3.具体操作: ①查看挂载情况[root@localhost ~]# df -hT文件系统 类型 ...原创 2021-09-23 11:29:56 · 812 阅读 · 1 评论 -
shell:mysql 批量删除符合匹配条件的数据表
#!/bin/bashfor i in `mysql -uloguser -p123456 -e "use Syslog;show tables;" 2>/dev/null | grep "^SystemEvents_2021_02_"`do{ mysql -uloguser -p12346 -e "use Syslog;drop table $i;" 2>/dev/null && echo "$i drop success !"}done原创 2021-09-13 16:14:04 · 352 阅读 · 0 评论 -
shell: mysql删除183天前的table(保留半年的log数据)
#!/bin/bashdt=SystemEvents_`date -d '183 days ago' +%Y_%m_%d`echo "info: Today is `date +%F`"echo "info: the table of 183 days ago is $dt"echo "info: start drop table $dt"mysql -uroot -p123456 -e "use Syslog;drop table $dt;"&&echo "info: .原创 2021-09-13 15:49:54 · 306 阅读 · 0 评论 -
搭建rsyslog日志服务器记录RouterOS路由器日志
1.搭建原因: 需要收集RouterOS路由的日志信息到mysql中,以便于后续查看2.所需环境: RouterOS,centos7.6,mysql5.7.283.RouterOS路由器的日志设置: ①设置需要收集的日志类型 因为我需要收集的是script的日志信息,所以我选择的topic是script action选择remote表示发送到远程日志服务器...原创 2021-09-13 10:43:39 · 2745 阅读 · 0 评论 -
centos7.3 shell安装mysql5.7.28
1.mysql源码包官网下载地址:https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar2.看具体shell如下:#!/bin/bashinstall_mysql(){mkdir /usr/local/mysqltar -xvf /root/mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar -C /usr/local/mysql/...原创 2021-09-10 16:05:51 · 131 阅读 · 0 评论 -
centos7单网卡设置多个IP
#!/bin/bashif [ $# != 3 ];then echo "Usage: $0 ad_name st_num end_num" exit 1fifor i in `seq $2 $3`do ipfile='/etc/sysconfig/network-scripts/ifcfg-'$1 ipfile_2=$ipfile":$i" cp $ipfile $ipfile_2 sed -i "s/^DEVICE.*/DEVICE=$1:$i/g" $i.原创 2021-09-10 15:45:24 · 626 阅读 · 0 评论 -
shell批量统计多个文件中的IP量
1.实现原因: 每天需对生成的IP文件进行统计2.具体shell如下:#!/bin/bashdst_file="`pwd`/ip_center_`date '+%Y_%m_%d'`.txt"dir="`pwd`/fz_ip"for j in `seq 1 171`do{ sum=`wc -l $dir/${j}.txt |awk '{print $1}'` sum_uniq=`cat $dir/${j}.txt | sort | uniq | wc -l `...原创 2021-09-10 15:36:33 · 261 阅读 · 0 评论