摘要: AWS 选择centos 6.5 系统全部安装好后,重启实例,默认根目录只有8G 所以我们需要做些操作 AWS 磁盘挂载 fdisk -l 查看磁盘情况 resize2fs /dev/xvde 挂载根目录 mkfs.ext4 /dev/xvdj 格式化数据盘 mount /dev/xvdj /dat 阅读全文
posted @ 2018-06-11 10:03 Van_建 阅读(963) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash #系统分配的区总量 mem_total=`free -m | awk 'NR==2' | awk '{print $2}'` #当前剩余的大小 mem_free=`free -m | awk 'NR==3' | awk '{print $4}'` #当前已使用的used大小 阅读全文
posted @ 2018-03-27 10:29 Van_建 阅读(1231) 评论(0) 推荐(0) 编辑
摘要: 配置tomcat的时候 发现了一个问题,tomcat启动的时候,8005端口未启动,故无法关闭tomcat,后经查询解决了,记录一下子 tomcat启动的时候看不出异常,关闭的时候回报错类似: Jul 17, 2015 9:47:54 AM org.apache.catalina.startup.C 阅读全文
posted @ 2018-03-27 09:19 Van_建 阅读(854) 评论(0) 推荐(0) 编辑
摘要: Linux常用命令大全100条: 1,echo “aa” 》 test.txt 和 echo “bb” 》》 test.txt//》将原文件清空,并且内容写入到文件中,》》将内容放到文件的尾部 2,chmod go+w -R /home/zhangy //给组用户和其他用户添加写的权限 3,tar 阅读全文
posted @ 2018-03-21 16:30 Van_建 阅读(4168) 评论(0) 推荐(0) 编辑
摘要: 转载自 https://www.cnblogs.com/mrlapulga/p/6857294.html 阅读全文
posted @ 2018-03-20 18:39 Van_建 阅读(152) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf-8 -*-__author__ = 'colin' #!/usr/bin/env python#-*- coding:utf-8 -*-import os,commandsimport MySQLdbimport timeimport subprocessimpor 阅读全文
posted @ 2017-12-07 14:58 Van_建 阅读(363) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python########################################################### Created date: 2017/12/7# Last modified: 201712/7# Tested with : Python 2. 阅读全文
posted @ 2017-12-07 14:57 Van_建 阅读(587) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash#主机信息每日巡检 IPADDR=$(ifconfig eth0|grep 'inet addr'|awk -F '[ :]' '{print $13}')#环境变量PATH没设好,在cron里执行时有很多命令会找不到export PATH=/usr/local/sbin:/u 阅读全文
posted @ 2017-11-08 10:05 Van_建 阅读(1987) 评论(0) 推荐(2) 编辑
摘要: 准备篇:一、配置防火墙,开启80端口、3306端口CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。1、关闭firewall:systemctl stop firewalld.service #停止firewallsystemctl disable fire 阅读全文
posted @ 2017-11-08 09:59 Van_建 阅读(1054) 评论(0) 推荐(0) 编辑