centos 下查看本机公网IP
curl ifconfig.me
nslookup查询DNS命令
nslookup www.baidu.com
安装相应软件包 yum install -y bind-utils
查看DNS地址
cat /etc/resolv.conf
Tomcat xml配置
<Context path="" docBase="/home/yixue/webapps/yixue-service" reloadable="false" />
webapps
send命令使用
http://man.linuxde.net/sed
sed -i 's/172.21.3.196/172.21.3.153/g' *.zone
Centos7下安装netstat
yum install net-tools
error while loading shared libraries: libevent-2.0.so.5解决办法
ldd * //监测当前目录动态类
http://blog.sina.com.cn/s/blog_6d09b5750100vqow.html
完全同步
rsync -av --delete /root/test/test1/ /root/test/test2/
rsync -av --delete /root/test/test2/ /root/test/test1/
yum源出现无法解析的问题:
File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:
解决方法:
cd /usr/bin/python 查看系统有几个python版本
vim /usr/bin/yum
修改/usr/bin/yum文件中的第一行为#!/usr/bin/python2.6
(二)yum源配置方法一(阿里云源)
1) 安装wget
yum install -y wget
2) 备份/etc/yum.repos.d/CentOS-Base.repo文件
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.back
3) 下载阿里云的Centos-6.repo文件
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
4) 重新加载yum
yum clean all
yum makecache
name=Description#一个描述,随意。
baseurl=#设置资源库的地址,可以写阿里云也可以是自己的yum
ftp://
http://
file:///
enabled={1|0}#enabled=1开启本地更新模式
gpgcheck={1|0}# gpgcheck=1表示检查;可以不检查gpgcheck=0
gpgkey=#检查的key;如果上面不检查这一行可以不写。
yum repolist
ssh连接缓慢的处理方法:
修改下面两个参数,并重启服务
vim /etc/ssh/sshd_config
GSSAPIAuthentication no
UseDNS no
service sshd restart