摘要: #!/usr/bin/expect set user [lindex $argv 0] #参数1:用户名 set ip [lindex $argv 1] #参数2:ip set password [lindex $argv 2] #参数3:密码 spawn ssh ${user}@$ip expec 阅读全文
posted @ 2017-03-08 16:46 puer633 阅读(543) 评论(0) 推荐(0) 编辑
摘要: ###安装###脚本:#!/bin/bash #命令运行环境的指定virt-install \ #安装虚拟机--name $1 \ #虚拟机名称指定,$1表示脚本后的第一串字符--ram 1024 \ #内存--file /var/lib/libvirt/images/$1.img \ #硬盘文件 阅读全文
posted @ 2017-01-24 14:03 puer633 阅读(110) 评论(0) 推荐(0) 编辑
摘要: ####设备的访问####1.设备识别/dev/xdxn #硬盘设备/dev/sda1/dev/cdrom #光驱/dev/mapper/* #虚拟设备###设备的发现###fdisk -l #查看真实存在的设备 cat /proc/partitions #系统能够识别的设备 blkid #系统能够 阅读全文
posted @ 2017-01-23 15:44 puer633 阅读(120) 评论(0) 推荐(0) 编辑
摘要: ###软件名称识别###[abrt-addon-ccpp]-[2.1.11-19].[el7].[x86_64].rpm #rpm结尾的适用与redhat操作系统 || || || || 软件名称 软件版本 软件适用系统 64位###如何安装软件###*rpmrpm -ivh name.rpm #安 阅读全文
posted @ 2017-01-22 21:19 puer633 阅读(123) 评论(0) 推荐(0) 编辑
摘要: ###文件归档###文件归档:把多个文件变成一个归档文件 归档方法: “tar cf 指定的文件名.tar 归档的文件“ tar c #创建 f #指定归档文件名称 (打包/etc,打包文件名etc.tar) t #显示归档文件中的内容 r #向归档文件中添加文件 --get #取出单个文件 --d 阅读全文
posted @ 2017-01-22 17:24 puer633 阅读(147) 评论(0) 推荐(0) 编辑
摘要: ####ip####ipv4:互联网协议第4版表示方式:2进制32位/10进制例如: 192.168.10.13/255.255.255.0192.168.10.13:ip地址255.255.255.0:子网掩码子网掩码255位对应的ip位为网络位子网掩码0对应的ip位为主机位,若掩码为255.25 阅读全文
posted @ 2017-01-22 01:59 puer633 阅读(142) 评论(0) 推荐(0) 编辑
摘要: ###系统日志默认分类###/var/log/messages #系统服务及日志,包括服务的信息,报错等等/var/log/secure #系统认证信息日志/var/log/maillog #系统邮件服务信息/var/log/cron #系统定时任务信息/var/log/boot.log #系统启动 阅读全文
posted @ 2017-01-22 00:27 puer633 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 在系统中创建set-ip-tool命令,要求如下: 当在系统中执行set-ip-tool 172.25.254.x 后 *)会自动显示ifconfig命令输出; *)系统ip被设定为172.25.254.x *)系统网关被设定为 172.25.254.250 *)系统dns被设定为172.25.25 阅读全文
posted @ 2017-01-19 19:10 puer633 阅读(114) 评论(0) 推荐(0) 编辑
摘要: ####openssh-server####功能描述:让远程主机可以通过网络访问sshd服务,开启一个安全shell ####客户端连接方式#### 连接方式:ssh 远程主机用户@远程主机ip ssh 远程主机用户@远程主机ip -X #调用远程主机图形工具ssh 远程主机用户@远程主机ip co 阅读全文
posted @ 2017-01-19 16:27 puer633 阅读(199) 评论(0) 推荐(0) 编辑
摘要: ###systemctl 命令###systemctl list-units #列出当前系统服务的状态 systemctl list-unit-files #列出服务的开机状态 systemctl status sshd #查看sshd的状态 systemctl stop sshd #关闭指定服务( 阅读全文
posted @ 2017-01-19 15:26 puer633 阅读(90) 评论(0) 推荐(0) 编辑