yum
yum --showduplicates list ansible | expand //列出可用的版本
ansible.noarch 2.3.1.0-3.el7 extras ansible.noarch 2.3.2.0-2.el7 extras ansible.noarch 2.4.0.0-5.el7 extras ansible.noarch 2.4.1.0-1.el7 extras
yum install ansible
yum install ansible-2.3.1.0-3.el7
yum -y remove ansible
network
cd /etc/sysconfig/network-scripts
vi ifcfg-ens33 //编辑该网卡设置
firewalld
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
firewall-cmd --zone= public --query-port=80/tcp
firewall-cmd --zone= public --remove-port=80/tcp --permanent
与windows互拷文件
rz,sz
system/user
passwd
system/LANG
echo $LANG //查看系统字符集
env |grep LANG //查看系统字符集
LANG=UTF-8 //修改字符集为UTF-8
cp -r test1/. test2 //复制test1下的所有内容到test2下
SSH
server: $ ssh-keygen -t rsa
local: $ ssh-keygen
$ ssh-copy-id -i .ssh/id_rsa.pub user@server
$ ssh user@server
history | grep ss 查看历史命令
ss -tupln 查看运行端口
安装pip
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rp
yum install python-pip
添加sudoer
root : visudo
解压tar.gz
tar -zxf test.tar.gz