- 博客(8)
- 收藏
- 关注
原创 linux硬盘组合为raid0挂载
1 查看硬盘信息fdisk -l......这里省略Disk /dev/nvme1n1: 7.28 TiB, 8001563222016 bytes, 15628053168 sectorsDisk model: INTEL SSDPE2KX080T8 Units: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (m
2021-08-31 12:06:59
1513
原创 linux时间同步
1 时间同步主服务器,主服务器最好与北京时间同步如果没有网络连接那就设置好本地时间# 设置东八区timedatectl set-timezone Asia/Shanghai# 安装ntp服务apt install ntpvim /etc/ntp.conf# Local users may interrogate the ntp server more closely.restrict 127.0.0.1restrict ::1# 添加这一行,允许内网同步restrict 192.168
2021-08-30 16:41:37
232
原创 linux安装代理服务器
1 安装squidcentos:yum install -y squidubuntu:apt install -y squid2 配置squidvim /etc/squid/squid.conf找到如下内容添加一行,表示允许内网ip段访问acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)acl localnet src 10.0.0.0/8 # RFC 1918 loc
2021-08-30 15:14:18
1045
原创 linux服务器免密登录
1 环境192.168.0.10 d1192.168.0.11 d22 设置d1 登录d2免密码2.1 在 d1 机器上生成秘钥ssh-keygen -t rsa三个回车2.2 将rsa公钥分配到d2ssh-copy-id -p 22 -i ~/.ssh/id_rsa.pub d2输入d2的密码如果是Ubuntu系统,默认用户是useroot可以使用ssh-copy-id -p 22 -i ~/.ssh/id_rsa.pub useroot@d22.3 测试配置结果ssh roo
2021-08-30 11:58:16
785
原创 centos 防火墙配置 firewall
# 启动防火墙systemctl start firewalld# 关闭防火墙systemctl stop firewalld# 下次系统重启系统会默认大开防火墙,如果想永久关闭防火墙,使用一下命令,不推荐systemctl disable firewalld# 重启防火墙,如果只是想重新加载防火墙规则,请使用 firewall-cmd --reloadsystemctl restart firewalld# 放行一个端口firewall-cmd --permanent --zon
2020-06-15 15:44:05
1526
原创 linux 磁盘占用监控,自动发微信通知
1 编写脚本vim /home/monitor/disk_monitor.shserver=`ip addr|grep inet|grep -v 127.0.0.1|grep -v inet6|grep -v docker|awk '{print $2}'|head -n 1`for num in `df -h | grep /dev | grep -v /snap/ | awk '{pr...
2020-03-09 18:17:07
556
转载 postgresql冷备份
每日冷备份,并自动删除 7 日以前的备份,建议对热备份数据进行备份环境:centos7192.168.0.20:15432 ( 备份库,读库)1 创建备份目录mkdir -p /home/data/backup/2 编写备份脚本vim /home/data/backup/backup_script.shcur_time=$(date '+%Y-%m-%d')sevendays_t...
2020-03-09 16:48:40
547
原创 postgresql 12 安装,热备份,读写分离
主备需要数据库版本一致环境:192.168.0.21:5432 (主库)192.168.0.20:15432 ( 备份库)centos71 postgresql 安装yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.r...
2020-03-06 16:19:35
1711
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人