liunx
liunx
kaiqiu666
这个作者很懒,什么都没留下…
展开
-
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 · 1321 阅读 · 0 评论 -
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 · 179 阅读 · 0 评论 -
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 · 974 阅读 · 0 评论 -
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 · 599 阅读 · 0 评论 -
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 · 1439 阅读 · 0 评论 -
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 · 424 阅读 · 0 评论